/maskon
#10

pawn Код:
foreach (Player, i)
            {
                ShowPlayerNameTagForPlayer(i, playerid, 0);
            }
Instead of the above do:
pawn Код:
new maskedstr[50];
format(maskedstr, sizeof(maskedstr), "(%d)(Masked)", playerid);
GetPlayerName(playerid, pname[playerid], sizeof(pname[playerid]));
SetPlayerName(playerid, maskedstr);
Remember to create a global variable (in the above example 'pname[MAX_PLAYERS]') in which you save the persons name, otherwise you wont be able to set it back.

For the maskoff:
pawn Код:
SetPlayerName(pname[playerid]);
Also, remember to unset the variable if OnPlayerDisconnect gets called, or else someone may get another persons name
Reply


Messages In This Thread
/maskon - by ZeroCools - 03.03.2013, 23:25
Re: /maskon - by Mmartin - 03.03.2013, 23:31
Re: /maskon - by ZeroCools - 03.03.2013, 23:37
Re: /maskon - by Mmartin - 03.03.2013, 23:39
Re: /maskon - by nickstar - 03.03.2013, 23:41
Re: /maskon - by ZeroCools - 04.03.2013, 11:40
Re: /maskon - by Smikkeltoetje - 04.03.2013, 13:45
Re: /maskon - by ZeroCools - 04.03.2013, 14:15
Re: /maskon - by ZeroCools - 05.03.2013, 07:59
Re: /maskon - by mamorunl - 05.03.2013, 08:09

Forum Jump:


Users browsing this thread: 1 Guest(s)