15.08.2015, 10:20
PHP код:
CMD:mask(playerid,params[])
{
if(!IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][pMask] == 1 || Mask[playerid] == 1)
{
if(MaskOn[playerid] == 0)
{
MaskOn[playerid] = 1;
GameTextForPlayer(playerid, "~p~MASK ON", 5000, 3);
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(playerid, i, 0);
}
}
else if(MaskOn[playerid] == 1)
{
MaskOn[playerid] = 0;
GameTextForPlayer(playerid, "~p~MASK OFF", 5000, 3);
for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, 1);
}
return 1;
}
else return SCM(playerid, COLOR_LIGHTRED, "Nu ai o masca.");
}
else return SCM(playerid, COLOR_LIGHTRED, "You cannot do this inside a vehicle.");
}