[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(playerid, params[])
{
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", 5000, 5);
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(i, playerid, 0);
}
MaskOn[playerid] = 1;
}
else
{
GameTextForPlayer(playerid, "~p~REMOVED YOUR MASK", 5000, 5);
MaskOn[playerid] = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(i, playerid, 1);
}
}
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.