Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
621 B
1
Indexable
Never
new bool: Masked[MAX_PLAYERS];

stock hideNametag()
{
    ShowNameTags(0);
    return 1;
}

forward masked_onplayerconnect(playerid);
public masked_onplayerconnect(playerid) {
    Masked[playerid] = true;
    return 1;
}

task UpdateNametag[500]()
{
	foreach(new playerid : Player) {
		for(new i = GetPlayerPoolSize(); i != -1; --i) {
	        ShowPlayerNameTagForPlayer(playerid, i, Masked[playerid]);
	    }
	}
}

CMD:nametag(playerid, params[]) {
    if(Masked[playerid] == true) {
        Masked[playerid] = false;
    }
    else {
        Masked[playerid] = true;
    }
    return 1;
}
Leave a Comment