Help with text labels!
#3

PHP код:
new Text3D:labela[MAX_PLAYERS];
public 
OnPlayerDisconnect(playeridreason)
{
Delete3DTextLabel(labela[playerid]);
}
return 
1;
CMD:aod(playerid)
{
    if(
pInfo[playerid][pLogged] == 1)
    {
        if(
pInfo[playerid][pAdminLevel] >= 1)
        {
            if(
pInfo[playerid][pAdminDuty] == 0)
            {
            
pInfo[playerid][pAdminDuty] = 1;
            new 
adutyonstring[128];
            
format(adutyonstringsizeof(adutyonstring), "{DC143C}Administrator %s is now On Duty!" ,PlayerName(playerid));
            
SendClientMessageToAll(-1,adutyonstring);
            
SetPlayerColor(playerid,0xFFFFFF00);
            
SetPlayerSkin(playerid217);
            
SetPlayerHealth(playerid,999999.0);
            
//labela[playerid] = Create3DTextLabel("Admin On Duty", 0x00FF00FF, 30.0, 40.0, 50.0, 40.0, 0);
            //Attach3DTextLabelToPlayer(labela[playerid], playerid, 0.0, 0.0, 0.7);
            
SendClientMessage(playerid,COLOR_RED,""chat" Remember to /aod when you play as a regular player.");
            }
            else
            {
                if(
pInfo[playerid][pAdminDuty] == 1)
                {
                
pInfo[playerid][pAdminDuty] = 0;
                new 
adutyoffstring[128];
                
Delete3DTextLabel(labela[playerid]);
                
ResetPlayerWeaponsEx(playerid23,25);
                
format(adutyoffstringsizeof(adutyoffstring), "{DC143C}Administrator %s is now Off Duty." ,PlayerName(playerid));
                
SendClientMessageToAll(-1,adutyoffstring);
                if(
team[playerid] == TEAM_ZOMBIE)
                {
                    
SetPlayerColor(playerid,COLOR_ZOMBIE);
                }
                if(
team[playerid] == TEAM_HUMAN)
                {
                    
SetPlayerColor(playerid,COLOR_HUMAN);
                }
                
SetPlayerHealth(playerid,100);
                }
            }
        }
    }
    else if(
pInfo[playerid][pLogged] == 0)
    {
        
//SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" Nice try , KICKED!");
        
printf("%s has been kicked for trying to use a command without being logged in!"PlayerName(playerid));
        
Kick(playerid);
    }
    return 
1;
}
public 
OnPlayerConnect(playerid)
{
    if(
pInfo[playerid][pAdminDuty] == 1)
    {
        
pInfo[playerid][pAdminDuty] = 0;
    } 
Reply


Messages In This Thread
Help with text labels - by D1am0nd - 29.10.2015, 05:49
Re: Help with text labels! - by iKarim - 29.10.2015, 06:47
Re: Help with text labels! - by D1am0nd - 29.10.2015, 08:38

Forum Jump:


Users browsing this thread: 2 Guest(s)