PHP код:
CMD:facmask(playerid, params[])
{
new name[MAX_PLAYER_NAME];
new string[42];
if((!IsACop(playerid) || !IsALVMPDCop(playerid))) return SendClientMessageEx(playerid, COLOR_GREY, " You are not a member of L.E.O !");
if(HasBoughtMask[playerid] != 1) return SendClientMessage(playerid, COLOR_GREY, "You don't have a mask.");
if(PlayerInfo[playerid][pMask] == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
ShowPlayerNameTagForPlayer(i, playerid, 0);
}
}
PlayerInfo[playerid][pMask] = 1;
SetPlayerAttachedObject(playerid, 1, 19037, 2, 10, 4.7, 0.0, 90, 90, 0);
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "* Stranger has put a mask on.");
ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(PlayerInfo[playerid][pMask] == 1)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
ShowPlayerNameTagForPlayer(i, playerid, 1);
}
}
PlayerInfo[playerid][pMask] = 0;
RemovePlayerAttachedObject(playerid, 1);
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "* Stranger has put their mask away.");
ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
return 1;
}
Once i /facmask it send me that first return > You are not a member of L.E.O ! . Even i am a leo.