pawn Код:
if(strcmp(cmd, "/equipar", true) == 0)
{
if(PlayerToPoint(1.0,playerid,-1616.1294,681.1594,7.1875) || PlayerToPoint(1.0,playerid,230.1107,165.2237,1003.0234) || PlayerToPoint(1.0,playerid,240.7396,112.9709,1003.2188) || PlayerToPoint(1.0,playerid,1530.5187,-1702.5320,6.2252) || PlayerToPoint(1.0,playerid,302.7606,-1529.7537,24.9219)
|| PlayerToPoint(1.0,playerid,1405.8651,415.0729,19.7578) || PlayerToPoint(1.0,playerid,-1609.0100,699.3026,-4.9063) || PlayerToPoint(1.0,playerid,-1345.8823,492.5301,11.2027))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsACop(playerid))
{
if(OnEquipado[playerid] == 1)
{
ResetPlayerWeapons(playerid);
OnEquipado[playerid] = 0;
return 1;
}
if (PlayerInfo[playerid][pLider] == 1 || PlayerInfo[playerid][pMembro] == 1) // Policia Militar
{
if (PlayerInfo[playerid][pCargo] == 0)
{
format(string, sizeof(string), "* Oficial %s pega sua farda , e suas armas.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerWeapon(playerid, 25, 50);
GivePlayerWeapon(playerid, 24, 80);
GivePlayerWeapon(playerid, 3, 0);
GivePlayerWeapon(playerid, 31, 100);
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100.0);
OnEquipado[playerid] = 1;
return 1;
}
if (PlayerInfo[playerid][pCargo] == 1)
{
format(string, sizeof(string), "* Oficial %s pega sua farda , e suas armas.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerWeapon(playerid, 25, 50);
GivePlayerWeapon(playerid, 24, 80);
GivePlayerWeapon(playerid, 3, 0);
GivePlayerWeapon(playerid, 31, 150);
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100.0);
OnEquipado[playerid] = 1;
return 1;
}
if (PlayerInfo[playerid][pCargo] == 2)
{
format(string, sizeof(string), "* Oficial %s pega sua farda , e suas armas.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerWeapon(playerid, 25, 70);
GivePlayerWeapon(playerid, 24, 100);
GivePlayerWeapon(playerid, 3, 0);
GivePlayerWeapon(playerid, 31, 200);
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100.0);
OnEquipado[playerid] = 1;
return 1;
}
if (PlayerInfo[playerid][pCargo] == 3)
{
format(string, sizeof(string), "* Oficial %s pega sua farda , e suas armas.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerWeapon(playerid, 25, 100);
GivePlayerWeapon(playerid, 24, 150);
GivePlayerWeapon(playerid, 29, 150);
GivePlayerWeapon(playerid, 31, 250);
GivePlayerWeapon(playerid, 3, 0);
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100.0);
OnEquipado[playerid] = 1;
return 1;
}
if (PlayerInfo[playerid][pCargo] == 4)
{
format(string, sizeof(string), "* Oficial %s pega sua farda , e suas armas.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerWeapon(playerid, 25, 120);
GivePlayerWeapon(playerid, 24, 160);
GivePlayerWeapon(playerid, 29, 190);
GivePlayerWeapon(playerid, 31, 300);
GivePlayerWeapon(playerid, 34, 50);
GivePlayerWeapon(playerid, 17, 50);
GivePlayerWeapon(playerid, 3, 0);
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100.0);
OnEquipado[playerid] = 1;
return 1;
}
if (PlayerInfo[playerid][pCargo] == 5)
{
format(string, sizeof(string), "* Oficial %s pega sua farda , e suas armas.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerWeapon(playerid, 25, 140);
GivePlayerWeapon(playerid, 24, 170);
GivePlayerWeapon(playerid, 29, 210);
GivePlayerWeapon(playerid, 31, 350);
GivePlayerWeapon(playerid, 34, 80);
GivePlayerWeapon(playerid, 17, 100);
GivePlayerWeapon(playerid, 3, 0);
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100.0);
OnEquipado[playerid] = 1;
return 1;
}
if (PlayerInfo[playerid][pCargo] == 6)
{
format(string, sizeof(string), "* Oficial %s pega sua farda , e suas armas.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerWeapon(playerid, 25, 190);
GivePlayerWeapon(playerid, 24, 180);
GivePlayerWeapon(playerid, 29, 350);
GivePlayerWeapon(playerid, 31, 400);
GivePlayerWeapon(playerid, 34, 100);
GivePlayerWeapon(playerid, 17, 150);
GivePlayerWeapon(playerid, 3, 0);
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100.0);
OnEquipado[playerid] = 1;
return 1;
}
}