29.02.2016, 14:32
So i had an idea to make a script that could deactivate a player's nametag once said player types a command.
As it turned out, i'm not the only one who's had this idea and plenty of people have been making this script, so i pasted some bits of it over to my own.
The problem is: it doesn't work. The command attaches a mask to the player's head, but it won't hide his nametag to other players.
Can someone help? Thanks.
As it turned out, i'm not the only one who's had this idea and plenty of people have been making this script, so i pasted some bits of it over to my own.
The problem is: it doesn't work. The command attaches a mask to the player's head, but it won't hide his nametag to other players.
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/mask", true)) { SetPlayerAttachedObject(playerid, 0, 19036, 2, 0.1, 0.05, 0, 90, 90, 0); for(new i = 0; i < MAX_PLAYERS; i++) { ShowPlayerNameTagForPlayer(i, playerid, false); } return 1; } if(!strcmp(cmdtext, "/maskoff", true)) { RemovePlayerAttachedObject(playerid, 0); for(new i = 0; i < MAX_PLAYERS; i++) { ShowPlayerNameTagForPlayer(i, playerid, true); } return 1; }