17.08.2012, 19:33
Hello, I just want to ask how I can hide players names so they look like Single player people.
thanks a lot
thanks a lot
public OnGameModeInit()
{
// We're creating a sniper-based gamemode now, so we don't want players to
// see any nametags. Fully disable them:
ShowNameTags(0);
}
new bool:Masked[MAX_PLAYERS] = false; new OldName[MAX_PLAYER_NAME][MAX_PLAYERS];
CMD:mask(playerid, params[]) { if(IsPlayerConnected(playerid)) { if(Masked[playerid] == false) { new pname[24]; GetPlayerName(playerid, pname, sizeof(pname)); Masked[playerid] = true; strmid(OldName[playerid], pname, 0, strlen(pname), 64); SetPlayerName(playerid, "The Stranger"); SendClientMessage(playerid, COLOR_GREEN, "* You have put on your mask."); for(new i=0;i<MAX_PLAYERS;i++) { ShowPlayerNameTagForPlayer(i, playerid, 0); } } else { SetPlayerName(playerid, OldName[playerid]); Masked[playerid] = false; SendClientMessage(playerid, COLOR_GREEN, "* You have removed your mask."); for(new i=0;i<MAX_PLAYERS;i++) { ShowPlayerNameTagForPlayer(i, playerid, 1); } } } return 1; }