[FilterScript] Toggle nametags
#9

Whats the point of using sscanf for such simple thing?

pawn Code:
new bool:tagset = false;
CMD:togglenametags(playerid, params[])
{
    new ID = strval(params);
    if(!IsPlayerAdmin(playerid)) return 0;
    if(isnull(params)) return 0;
    if(tagset == true) tagset = false, ToggleNameTags(0), SendClientMessage(playerid, -1, "Unset");
    if(!IsNumeric(params)) return 0; // You may need this func
    if(ID > 1 || < 0) return 0;
    ToggleNameTags(ID);
    tagset = true;
    SendClientMessage(playerid, -1, "set");
    return 1;
}
Untested, though should work I suppose
Reply


Messages In This Thread
Toggle nametags ON/OFF - by Lenny the Cup - 20.07.2011, 12:36
Re: Toggle nametags - by Famalamalam - 20.07.2011, 12:42
Re: Toggle nametags - by Mariooo - 20.07.2011, 14:35
Re: Toggle nametags - by Virtual1ty - 20.07.2011, 15:07
Re: Toggle nametags - by Lenny the Cup - 20.07.2011, 15:46
Re: Toggle nametags - by Famalamalam - 20.07.2011, 16:23
Re: Toggle nametags - by System64 - 20.07.2011, 20:04
Re: Toggle nametags - by SpiderWalk - 21.07.2011, 10:38
Re: Toggle nametags - by Lorenc_ - 21.07.2011, 12:02

Forum Jump:


Users browsing this thread: 3 Guest(s)