[Help] Attach3DTextLabelToPlayer
#1

I give the command below (entering duty mode), and it creates the 3DLabel normally, and appears on top of the administrator name "Admin" in blue, but when I give the command again (to exit duty mode) the 3DLabel does not exit, someone know why?

PHP код:
ACMD:admin[1](playeridparams[])
{    
    if(
GetPlayerAdminLevel(playerid) < 2)
        return 
Msg(playeridRED"[ > ] Vocк nгo tem permissгo para usar este comando.");
    new 
name[MAX_PLAYER_NAME];
    new 
Text3D:adminindicitor[MAX_PLAYERS];
    
GetPlayerName(playeridnamesizeof(name));
    if(
GetPlayerState(playerid) == PLAYER_STATE_SPECTATING)
    {
        
Msg(playeridRED"[ > ] Vocк nгo pode fazer isso enquanto estб espiando!");
        return 
1;
    }
    if(!
IsPlayerOnAdminDuty(playerid))
    {    
        
adminindicitor[playerid] = Create3DTextLabel("Admin"0x33CCFFFF30.040.050.010.00);
        
TogglePlayerAdminDuty(playeridtrue);
        
MsgAdminsF(1NovoA"[ > ] O(a) Administrador(a){FFFFFF} %s {00c0ff}saiu do modo jogador!"name);
        
Attach3DTextLabelToPlayer(adminindicitor[playerid], playerid0.00.00.2);
    }
    else
    {    
        
TogglePlayerAdminDuty(playeridfalse);
        
MsgAdminsF(1NovoA"[ > ] O(a) Administrador(a){FFFFFF} %s {00c0ff}entrou no modo jogador!"name);
           
Delete3DTextLabel(adminindicitor[playerid]);
    }
    return 
1;

Reply


Messages In This Thread
[Help] Attach3DTextLabelToPlayer - by ApolloScripter - 03.12.2018, 01:17
Re: [Help] Attach3DTextLabelToPlayer - by Kaliber - 03.12.2018, 09:20
Re: [Help] Attach3DTextLabelToPlayer - by ApolloScripter - 03.12.2018, 13:23

Forum Jump:


Users browsing this thread: 1 Guest(s)