18.04.2014, 17:36
PHP код:
if(strcmp(cmd, "/equiparg", true) == 0)
{
new org = GetPlayerOrg(playerid);
if(org == 5 || org == 6 || org == 10 || org == 11 || org == 12 || org == 13 || org == 15 || org == 16 || org == 17 || org == 18 || org == 19 || org == 20 )
if(IsAGang(playerid))
{
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, 323.1665,1117.5167,1083.8828))
{
SendClientMessage(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org de sua HQ!");
return true;
}
if(org == 6 && !PlayerToPoint(3, playerid, 2497.8489,-1703.2598,1014.7422))
{
SendClientMessage(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org de sua HQ!");
return true;
}
if(org == 10 && !PlayerToPoint(3, playerid, 1141.5215,-10.6199,1000.6719))
{
SendClientMessage(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org de sua HQ!");
return true;
}
if(org == 11 && !PlayerToPoint(3, playerid, 451.3770,-83.9226,999.5547))//
{
SendClientMessage(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org de sua HQ!");
return true;
}
if(org == 12 && !PlayerToPoint(3, playerid, 2173.2478,-2256.5645,13.3048))
{
SendClientMessage(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org de sua HQ!");
return true;
}
if(org == 13 && !PlayerToPoint(3, playerid, 2345.5767,-1184.8669,1027.9766))
{
SendClientMessage(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org de sua HQ!");
return true;
}
if(org == 15 && !PlayerToPoint(3, playerid, 508.4756,-80.5316,998.9609))
{
SendClientMessage(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org de sua HQ!");
return true;
}
if(org == 16 && !PlayerToPoint(3, playerid, 2811.7351,-1171.3318,1025.5703))
{
SendClientMessage(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org de sua HQ!");
return true;
}
if(org == 17 && !PlayerToPoint(3, playerid, 1266.1218,-780.0120,1084.0078))
{
SendClientMessage(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org de sua HQ!");
return true;
}
if(org == 18 && !PlayerToPoint(3, playerid, -225.7658,1400.3685,27.7656))
{
SendClientMessage(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org de sua HQ!");
return true;
}
if(org == 19 && !PlayerToPoint(3, playerid, 414.4804,2536.6851,10.0000))
{
SendClientMessage(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org de sua HQ!");
return true;
}
if(org == 20 && !PlayerToPoint(3, playerid, 2551.3342,-1290.7883,1060.9844))
{
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][pRank] <= 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][pRank] == 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][pRank] == 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][pRank] == 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][pRank] == 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);
GivePlayerWeapon(playerid, 34, 150);
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;
}