06.10.2012, 07:53
pawn Код:
if(strcmp(cmd, "/equiparg", true) == 0)
{
new org = GetPlayerOrg(playerid);
if(org == 5 || org == 14 || org == 17 || org == 18 || org == 19 || org == 20 || org == 21)
{
if(CofreOrg[org][Materiais] < 50)
{
SendClientMessage(playerid,COLOR_GREY," O cofre de sua HQ tem menos de 50 materiais, compre mais com a mбfia ou deposite!");
return true;
}
if(org == 5 && !PlayerToPoint(3, playerid, 2811.7102,-1166.1824,1025.5703))
{
SendClientMessage(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org de sua HQ!");
return true;
}
if(org == 14 && !PlayerToPoint(3, playerid, 2514.1301,-1691.2979,14.0460))
{
SendClientMessage(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org de sua HQ!");
return true;
}
if(org == 17 && !PlayerToPoint(3, playerid, 1074.7671,-1204.1219,18.1446))
{
SendClientMessage(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org de sua HQ!");
return true;
}
if(org == 18 && !PlayerToPoint(3, playerid, 296.2728,1489.4459,1080.2578))
{
SendClientMessage(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org de sua HQ!");
return true;
}
if(org == 19 && !PlayerToPoint(3, playerid, 2556.7903,-882.4303,92.4701))
{
SendClientMessage(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org de sua HQ!");
return true;
}
if(org == 20 && !PlayerToPoint(3, playerid, 681.3650,-445.1725,16.3359))
{
SendClientMessage(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org de sua HQ!");
return true;
}
if(org == 21 && !PlayerToPoint(3, playerid, 2768.6760,-1626.2833,10.9272))
{
SendClientMessage(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org de sua HQ!");
return true;
}
new dorgas = CofreOrg[org][Materiais];
if(PlayerInfo[playerid][pLider] >= 1)
{
CofreOrg[org][Materiais] = dorgas-50;
GivePlayerWeapon(playerid, 4, 1);
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100.0);
GivePlayerWeapon(playerid, 24, 800);
GivePlayerWeapon(playerid, 25, 400);
GivePlayerWeapon(playerid, 29, 400);
GivePlayerWeapon(playerid, 31, 600);
format(string, sizeof(string), "* Gangster %s pega seus equipamentos de lнder.", PlayerName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return true;
}
else if(PlayerInfo[playerid][pCargo] <= 1)
{
CofreOrg[org][Materiais] = dorgas-50;
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100.0);
GivePlayerWeapon(playerid, 24, 120);
GivePlayerWeapon(playerid, 25, 140);
GivePlayerWeapon(playerid, 29, 130);
GivePlayerWeapon(playerid, 31, 250);
format(string, sizeof(string), "* Gangster %s pega seus equipamentos.", PlayerName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return true;
}
else if(PlayerInfo[playerid][pCargo] == 2)
{
CofreOrg[org][Materiais] = dorgas-50;
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100.0);
GivePlayerWeapon(playerid, 24, 120);
GivePlayerWeapon(playerid, 25, 140);
GivePlayerWeapon(playerid, 29, 130);
GivePlayerWeapon(playerid, 31, 250);
format(string, sizeof(string), "* Gangster %s pega seus equipamentos.", PlayerName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return true;
}
else if(PlayerInfo[playerid][pCargo] == 3)
{
CofreOrg[org][Materiais] = dorgas-50;
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100.0);
GivePlayerWeapon(playerid, 24, 170);
GivePlayerWeapon(playerid, 25, 200);
GivePlayerWeapon(playerid, 29, 180);
GivePlayerWeapon(playerid, 31, 320);
format(string, sizeof(string), "* Gangster %s pega seus equipamentos.", PlayerName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return true;
}
else if(PlayerInfo[playerid][pCargo] == 4)
{
CofreOrg[org][Materiais] = dorgas-50;
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100.0);
GivePlayerWeapon(playerid, 24, 230);
GivePlayerWeapon(playerid, 25, 230);
GivePlayerWeapon(playerid, 29, 210);
GivePlayerWeapon(playerid, 31, 380);
format(string, sizeof(string), "* Gangster %s pega seus equipamentos.", PlayerName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return true;
}
else if(PlayerInfo[playerid][pCargo] == 5)
{
CofreOrg[org][Materiais] = dorgas-50;
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100.0);
GivePlayerWeapon(playerid, 24, 500);
GivePlayerWeapon(playerid, 25, 300);
GivePlayerWeapon(playerid, 29, 300);
GivePlayerWeapon(playerid, 31, 500);
format(string, sizeof(string), "* Gangster %s pega seus equipamentos.", PlayerName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return true;
}
}
return true;
}