[Help] Mask command (zcmd)
#1

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?
Reply
#2

~Bump, help please.
Reply
#3

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)