[Pomoc] 3d label imaju svi a trebaju imati admin i gs samo

Započeo [GU:RP] ivica 156, Februar 14, 2012, 13:20:05 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:cyber
Detaljan opis problema:napravio sam label i sada label imaju svi igraci a ne adm i gsovi kako da rijesim to da sam adm i gsovi imaju svi igraci
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):



Napraviš komandu i u njoj provjeru da li je igrac admin ili gs i onda ako je stavis mu label ..
http://wiki.sa-mp.com/wiki/Attach3DTextLabelToPlayer

evo komande:
if(strcmp(cmd, "/gson", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
         if (PlayerInfo[playerid][pGameMaster] >= 1)
         {
                //new sMsg[ 128 ];
                //GetPlayerName( playerid, sMsg, MAX_PLAYER_NAME );
                SetPVarInt(playerid, "Izbegavanje", 1);
                gslabel[playerid] = Create3DTextLabel("Na GS Duznosti! (Ne ometaj!)",ZELEENA,30.0,40.0,50.0,40.0,0);
                SendClientMessage(playerid, ZELEENA, "Ukljucili ste GameSage Duznost.Da iskljucite /gsoff!");
                SetPlayerHealth(playerid, 1000);
              SetPlayerArmour(playerid, 1000);
               format(string, 256, "GameSage %s je sada na Duznosti",ImeIgraca(playerid));
            PorukaAdminima(   ZELEENA,string,1);
            Attach3DTextLabelToPlayer(gslabel[playerid], playerid, 0.0, 0.0, 0.5);
            GMporuke(ZELEENA,string,1);

            return 1;
         }
         else
         {
            SendClientMessage(playerid, COLOR_GRAD1, "{FFFFFF}[{F81414}G-Unit{FFFFFF}] {C3C3C3}Samo GS-ovi!");
         }
      }
      return 1;
   }
   if(strcmp(cmd, "/gsoff", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
         if (PlayerInfo[playerid][pGameMaster] >= 1)
         {
                //new sMsg[ 128 ];
                //GetPlayerName( playerid, sMsg, MAX_PLAYER_NAME );
                SetPVarInt(playerid, "Izbegavanje", 0);
                SetPlayerColor( playerid, BELA );
                Delete3DTextLabel(gslabel[playerid]);
                SendClientMessage(playerid, ZELENA, "Iskljucili ste  GS Duznost!");
                SetPlayerHealth(playerid, 1000);
                SetPlayerArmour(playerid, 0);
                format(string, 256, "GameSage %s vise nije na Duznosti",ImeIgraca(playerid));
            PorukaAdminima(   ZELEENA,string,1);
            GMporuke(ZELEENA,string,1);
                return 1;
         }
         else
         {
            SendClientMessage(playerid, COLOR_GRAD1, "{FFFFFF}[{F81414}G-Unit{FFFFFF}] {C3C3C3}Samo GS-ovi!");
         }
      }
      return 1;
   }
za gsove
evo za adm
CMD:aon(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);
               SetPVarInt(playerid, "Izbegavanje", 1);
               label[playerid] = Create3DTextLabel("Na Admin Duznosti! (Ne ometaj!)",COLOR_LIGHTBLUE,30.0,40.0,50.0,40.0,0);
               SendClientMessage(playerid, 0x0080FFFF, "Sada ste na Admin Duznosti!");
               format(string, 256, "Admin %s je sada na Duznosti",ImeIgraca(playerid));
               PorukaAdminima(0x0080FFFF,string,1);
               Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.5);
               GetPlayerName(playerid, sendername, sizeof(sendername));
               format(string, sizeof(string), "", sendername);
               SendClientMessageToAll(0xFF00EBFF,string);
               }
              else if(OnDuty[playerid] == 1)
              {
                  OnDuty[playerid] = 0;
                  SetPlayerArmour(playerid, 0);
               SetPlayerHealth(playerid, 100);
               SetPlayerColor(playerid,TEAM_HIT_COLOR);
               SetPVarInt(playerid, "Izbegavanje", 0);
               Delete3DTextLabel(label[playerid]);
               SendClientMessage(playerid, 0x0080FFFF, "Iskljucili ste Admin Duznost!");
               format(string, 256, "Admin %s vise nije na Duznosti",ImeIgraca(playerid));
               PorukaAdminima(0x0080FFFF,string,1);
               GetPlayerName(playerid, sendername, sizeof(sendername));
               format(string, sizeof(string), "", sendername);
               SendClientMessageToAll(BELA,string);
               return 1;
              }
          }
          else
          {
              SendClientMessage(playerid, SIVA, "{FFFFFF}[{F81414}G-Unit{FFFFFF}] {C3C3C3}Samo Admini!");
              return 1;
          }
       return 1;
}