if(strcmp(cmd, "/swat", true) == 0)
{
if(OnDuty[playerid] == 0)
{
GetPlayerName(playerid, pname, sizeof(pname));
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
if(PlayerInfo[playerid][pRank] > 3)
{
if(PlayerToPoint(6, playerid,253.9974,78.0809,1003.6406) || PlayerToPoint(6,playerid,325.9385,306.9067,999.1484) || PlayerToPoint(3,playerid,199.4482,168.2397,1003.0234) || PlayerToPoint(3,playerid,199.4482,168.2397,1003.0234)|| PlayerToPoint(3,playerid,-1256.3896,447.9114,7.1875) || PlayerToPoint(3,playerid,217.5392,184.4155,1003.0313) || PlayerInfo[playerid][pLocal] != 255)
{
format(string, sizeof(string), "*Officer %s holt seine SWAT Ausrüstung aus dem Spint.", pname);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerWeapon(playerid, 3, 500);
GivePlayerWeapon(playerid, 22, 500);
GivePlayerWeapon(playerid, 25, 250);
GivePlayerWeapon(playerid, 41, 1500);
GivePlayerWeapon(playerid, 24, 500);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
//SetPlayerColor(playerid, COLOR_LIGHTBLUE);
SetPlayerSkin(playerid, 285);
OnDuty[playerid] = 1;
}
}
}
}
if(OnDuty[playerid] == 1 && IsACop(playerid))
{
if (PlayerToPoint(6, playerid,253.9974,78.0809,1003.6406) || PlayerToPoint(6,playerid,325.9385,306.9067,999.1484) || PlayerToPoint(3,playerid,199.4482,168.2397,1003.0234) || PlayerToPoint(3,playerid,199.4482,168.2397,1003.0234)|| PlayerToPoint(3,playerid,217.5392,184.4155,1003.0313) || PlayerInfo[playerid][pLocal] != 255)
{
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "*Officer %s legt seine SWAT Ausrüstung in den Spint.", pname);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerSkin(playerid, PreviousSkin[playerid]);
ResetPlayerWeapons(playerid);
//SetPlayerToTeamColor(playerid);
SetPlayerArmour(playerid, 0);
OnDuty[playerid] = 0;
}
}
return 1;
}