pawn Код:
if(strcmp(cmd, "/serviзo", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new Skin;
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
if (PlayerToPoint(3, playerid,255.3,77.4,1003.6) || PlayerToPoint(3,playerid,-1616.1294,681.1594,7.1875) || PlayerInfo[playerid][pLocal] != 255)
{
if(OnDuty[playerid]==0)
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
format(string, sizeof(string), "* Oficial %s tirou um distintivo e uma arma do armбrio.", sendername);
}
else if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
format(string, sizeof(string), "* Argente %s tirou um distintivo e uma arma do armбrio.", sendername);
}
Skin = GetPlayerSkin(playerid);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
SafeGivePlayerWeapon(playerid, 24, 50);
SafeGivePlayerWeapon(playerid, 26, 0);
SetPlayerArmour(playerid, 100);
SetPlayerSkin(playerid, 281)
SetPlayerColor(playerid,0x008EFFFF);
OnDuty[playerid] = 1;
}
else if(OnDuty[playerid]==1)
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
format(string, sizeof(string), "* Oficial %s coloca seu distintivo e arma no seu armбrio.", sendername);
}
else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
format(string, sizeof(string), "* Argente %s coloca seu distintivo e arma no seu armбrio.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
SafeResetPlayerWeapons(playerid);
SetPlayerSkin(playerid, Skin);
SetPlayerArmour(playerid, 0);
SetPlayerColor(playerid,0x008EFFFF);
OnDuty[playerid] = 0;
}
}
else