28.09.2015, 20:51
Try this:
PHP код:
CMD:hidename(playerid, params[])
{
if(PlayerInfo[playerid][VipLevel] == 1) return SendClientMessage(playerid, COLOR_RED, "Error: You must be an V.I.P player level 2!");
if(PlayerInfo[playerid][VipLevel] < 2) return SendClientMessage(playerid, COLOR_RED, "Error: You must be a V.I.P player!");
for(new i = 0; i < MAX_PLAYERS; i++)
{
// IsPlayerConnected(i); This should give an error.
if (IsPlayerConnected(i))
{
ShowPlayerNameTagForPlayer(i, playerid, 0); // I and playerid should be changed check the wiki!
GameTextForPlayer(playerid, "You have hidden your name for others", 4000, 3);
}
}
return 1;
}