SA-MP Forums Archive
[Help] Mask command (zcmd) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Help] Mask command (zcmd) (/showthread.php?tid=304019)



[Help] Mask command - xRandomGuy - 16.12.2011

PHP код:
CMD:mask(playeridparams[])
{
if(
Logged[playerid] == 0) return 0;
if(
Info[playerid][Mask] == 0) return SendClientMessage(playerid,COLOR_RED,"[ERROR]: "COL_WHITE"You don't have a mask.");
if(
MaskOn[playerid] == 0)
{
GameTextForPlayer(playerid"~p~YOU HAVE PLACED A MASK ON"50005);
for(new 
0MAX_PLAYERSi++)
{
ShowPlayerNameTagForPlayer(iplayerid0);
}
MaskOn[playerid] = 1;
}
else
{
GameTextForPlayer(playerid"~p~REMOVED YOUR MASK"50005);
MaskOn[playerid] = 0;
for(new 
0MAX_PLAYERSi++)
{
ShowPlayerNameTagForPlayer(iplayerid1);
}
}
return 
1;

That's the command I'm using for masks on my server, and it works fine but when someone is far away from me and then he sees me I'm unmasked for him, help please?


Re: [Help] Mask command - xRandomGuy - 16.12.2011

~Bump, help please.


Re: [Help] Mask command (zcmd) - xRandomGuy - 17.12.2011

Just incase anyone will see this while looking for the answer, you'll need to make a timer, probably in the OnPlayerUpdate callback, works fine for me.