Help with this commands
#2

You need a variable, to see if the player has nametags on or off:
pawn Код:
new bool: pNames[MAX_PLAYERS];

CMD:name(playerid, params[])
{
    if(pNames[playerid] == false)
    {
        for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, false);
        GameTextForPlayer(playerid, "~W~Nametag ~g~On", 5000, 5);
        pNames[playerid] = true; // which means the player can see names now
    }
    else
    {
        for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, false);
        GameTextForPlayer(playerid, "~W~Nametags ~R~OFF", 5000, 5);
        pNames[playerid] = false; // Which means the player can't see name tags now.
    }
    return 1;
}
Don't forget about:
pawn Код:
public OnPlayerStreamIn(playerid, forplayerid)
Reply


Messages In This Thread
Help with this commands - by Face9000 - 24.03.2012, 10:24
Re: Help with this commands - by antonio112 - 24.03.2012, 10:28
Re: Help with this commands - by Face9000 - 24.03.2012, 10:29
AW: Help with this commands - by peugeot - 24.03.2012, 10:32
Re: AW: Help with this commands - by antonio112 - 24.03.2012, 10:38
AW: Help with this commands - by peugeot - 24.03.2012, 11:48

Forum Jump:


Users browsing this thread: 1 Guest(s)