18.08.2015, 20:58
PHP код:
CMD:mask(playerid,params[])
{
//new string[256];
//new sendername[MAX_PLAYER_NAME];
if(IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][pMask] == 1 || Mask[playerid] == 1)
{
if(MaskOn[playerid] == 0)
{
//new vehicleid = GetPlayerVehicleID(playerid);
MaskOn[playerid] = 1;
GameTextForPlayer(playerid, "~p~MASK ON", 5000, 3);
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(playerid, i, 0); //ShowPlayerNameTagForPlayer(i, playerid, false);
}
}
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
{
SCM(playerid, COLOR_LIGHTRED, "Nu ai o masca.");
}
}
if(!IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][pMask] == 1 || Mask[playerid] == 1)
{
if(MaskOn[playerid] == 0)
{
//new vehicleid = GetPlayerVehicleID(playerid);
MaskOn[playerid] = 1;
GameTextForPlayer(playerid, "~p~MASK ON", 5000, 3);
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(playerid, i, 0); //ShowPlayerNameTagForPlayer(i, playerid, false);
}
}
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
{
SCM(playerid, COLOR_LIGHTRED, "Nu ai o masca.");
}
}
return 1;
}