3DTextLabel - Attaching to player
#1

Here's my script/command,

When I do /aduty it doesn't show the text label, I've tried a string and just text but neither work:

pawn Код:
if(!strcmp(cmdtext, "/aduty", true)) // By Ellis & Scorcher
    {
        if(IsPlayerConnected(playerid))
        {
          if(gPlayerLogged[playerid] == 0)
          {
            SendClientMessage(playerid, COLOR_GREY, "  You need to login first !");
                return 1;
          }
          new Text3D:admname[MAX_PLAYERS];
          if(PlayerInfo[playerid][pAdmin] > 0)
          {
            if(AdminDuty[playerid] == 0)
            {
              AdminDuty[playerid] = 1;
              SetPlayerArmourEx(playerid, 100000);
                    SetPlayerHealthEx(playerid, 100000);
                    SetPlayerColor(playerid,TEAM_VAGOS_COLOR);
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    GiveNameSpace(sendername);
                    if(PlayerInfo[playerid][pAdmin] == 11) { sendername = "Hidden Admin"; }
                    format(string, sizeof(string), "BS-RP Administrator %s is now on-duty as an Admin", sendername);
                    ABroadCast(COLOR_YELLOW,string,1);
                    HidePM[playerid] = 0;
                    new admstring[128];
                    format(admstring, sizeof(admstring), "%d",PlayerInfo[playerid][pAdmName]);
                    admname[playerid] = Create3DTextLabel(adminstring,TEAM_VAGOS_COLOR,30.0,40.0,50.0,40.0,0);
                    Attach3DTextLabelToPlayer(admname[playerid], playerid, 0.0, 0.0, 0.7);
                    return 1;
            }
            else if(AdminDuty[playerid] == 1)
            {
              AdminDuty[playerid] = 0;
              SetPlayerArmourEx(playerid, 0);
                    SetPlayerHealthEx(playerid, 100);
                    SetPlayerColor(playerid,TEAM_HIT_COLOR);
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    GiveNameSpace(sendername);
                    if(PlayerInfo[playerid][pAdmin] == 11) { sendername = "Hidden Admin"; }
                    format(string, sizeof(string), "BS-RP Administrator %s is now off-duty as an Admin", sendername);
                    ABroadCast(COLOR_YELLOW,string,1);
                    Delete3DTextLabel(admname[playerid]);
                    return 1;
            }
          }
          else
          {
            SendClientMessage(playerid, COLOR_GREY, "  your not an Administrator !");
            return 1;
          }
        }
      return 1;
    }
Reply


Messages In This Thread
3DTextLabel - Attaching to player - by acade - 23.06.2010, 13:03
Re: 3DTextLabel - Attaching to player - by Jofi - 23.06.2010, 15:02
Re: 3DTextLabel - Attaching to player - by acade - 23.06.2010, 18:01
Re: 3DTextLabel - Attaching to player - by Jofi - 23.06.2010, 18:07
Re: 3DTextLabel - Attaching to player - by acade - 23.06.2010, 20:17

Forum Jump:


Users browsing this thread: 3 Guest(s)