[Pomoc]/adminduty

Započeo caupton, Maj 17, 2011, 19:32:55 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim:Balkan Dossier|Edit FG|
Detaljan opis problema:Ovako imam jedno pitanje da li mi moze neko dati komandu /adminduty kada admin ukuca i onda kada kuca to da mi pise iznad glave "Sredjuje Server"Ne Ometaj!...
Dio skripte://
Neke slike/video za lakse dobivanje pomoci(neobavezno)://

Ps.Znam da postoji negde ova tema ali sve sam pretrazio i nema

PS.Hvala puno onome ko pomogne

CMD:

if(!strcmp(cmdtext, "/adminduty", true) || !strcmp(cmdtext, "/da", true)) // By Gagi
   {
      if(IsPlayerConnected(playerid))
      {
          if(gPlayerLogged[playerid] == 0)
          {
              SendClientMessage(playerid, COLOR_GREY, "   Morate se prvo prijaviti !");
            return 1;
          }
          if(PlayerInfo[playerid][pAdmin] > 0)
          {
              if(AdminDuty[playerid] == 0)
              {
                  AdminDuty[playerid] = 1;
                  SetPlayerArmour(playerid, 999);
               SetPlayerHealth(playerid, 999);
               SetPlayerColor(playerid,TEAM_VAGOS_COLOR);
               GetPlayerName(playerid, sendername, sizeof(sendername));
               format(string, sizeof(string), "[ADMIN] [ID:%d]%s je on duty, koristite /p [text] ako imate pitanja", playerid, sendername);
               ABroadCast(COLOR_YELLOW,string,1);
               if(PlayerInfo[playerid][pAdmin] >= 1337)
               {
                   for(new i = 0; i < sizeof(CarInfo); i++)
                  {
                     SetVehicleParamsForPlayer(i,playerid,0,0);
                  }
               }
               return 1;
              }
              else if(AdminDuty[playerid] == 1)
              {
                  AdminDuty[playerid] = 0;
                  SetPlayerArmour(playerid, 0);
               SetPlayerHealth(playerid, 100);
               SetPlayerColor(playerid,TEAM_HIT_COLOR);
               GetPlayerName(playerid, sendername, sizeof(sendername));
               format(string, sizeof(string), "[ADMIN] [ID:%d]%s je sada off duty", playerid, sendername);
               ABroadCast(COLOR_YELLOW,string,1);
               return 1;
              }
          }
          else
          {
              SendClientMessage(playerid, COLOR_GREY, "   Niste Admin !");
              return 1;
          }
      }
       return 1;
   }


new Text3D:adminnaduznosti[MAX_PLAYERS];

adminnaduznosti[playerid] = Create3DTextLabel("text",BOJA,0,0,0,50,-1,1);
Attach3DTextLabelToPlayer(adminnaduznosti[playerid], playerid, 0,0,0);


Delete3DTextLabel(adminnaduznosti[playerid]); // brisanje 3d labela..

Patrick

evo imas tu samo si moras prvo dodat
Citatnew Text3D:label[MAX_PLAYERS];

i evo ti cjela komanda pa si zamjeni

CitatCMD:adminduty(playerid,params[])
{
   new
   sendername[MAX_PLAYER_NAME],
   string[128];
    if(gPlayerLogged[playerid] == 0)
          {
              SendClientMessage(playerid, SIVA, "Moras biti ulogiran");
            return 1;
          }
          if(PlayerInfo[playerid][Admin] > 0)
          {
              if(OnDuty[playerid] == 0)
              {
                  OnDuty[playerid] = 1;
                  SetPlayerArmour(playerid, 999);
               SetPlayerHealth(playerid, 999);
               SetPlayerColor(playerid,0x33CCFFAA);
               GetPlayerName(playerid, sendername, sizeof(sendername));
               format(string, sizeof(string), "[Admin]: %s je sada admin na duznosti.", sendername);
               SendClientMessageToAll(0x33CCFFAA,string);
               label[playerid] = Create3DTextLabel("ADMIN na Duznosti!! Ne Ometaj!!",0x33CCFFAA,30.0,40.0,50.0,40.0,0);
             Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);

            }
              else if(OnDuty[playerid] == 1)
              {
                 OnDuty[playerid] = 0;
                 SetPlayerArmour(playerid, 0);
               SetPlayerHealth(playerid, 100);
               SetPlayerColor(playerid,TEAM_BLUE_COLOR);
               GetPlayerName(playerid, sendername, sizeof(sendername));
               format(string, sizeof(string), "[Admin]: %s vise nije na duznosti.", sendername);
               SendClientMessageToAll(0xFF00EBFF,string);
               Delete3DTextLabel(label[playerid]);
               return 1;
              }
          }
          else
          {
              SendClientMessage(playerid, SIVA, "[BenoAS]: Moras biti administrator");
              return 1;
          }
       return 1;
}