12.04.2012, 20:54
pawn Код:
if(strcmp(cmd, "/colocarmascara", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(pMask[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo tem uma mascara");
return 1;
}
for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, false);
PlayerInfo[playerid][pMaskuse] = 1;
SendClientMessage(playerid, COLOR_WHITE, "Vocк colocou sua mascara! [/tirarmascara - para tirar].");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s colocou sua mascara.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
return 1;
}
if(strcmp(cmd, "/tirarmascara", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(pMask[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб usando uma mascara");
return 1;
}
for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, true);
PlayerInfo[playerid][pMaskuse] = 0;
SendClientMessage(playerid, COLOR_WHITE, "Vocк tirou sua mascara [/colocarmascara - para usar].");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s tirou sua mascara.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
return 1;
}