pawn Код:
if(strcmp(cmd, "/abastecerhq", true) == 0)
{
new org = GetPlayerOrg(playerid);
if(org != 12 && org != 13)
{
SendClientMessage(playerid,COLOR_GREY," Vocк nгo й um mafioso!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USE: /abastecerhq [materiais]");
return 1;
}
new ammount = strval(tmp);
new price;
if(PlayerToPoint(3, playerid, 2811.7102,-1166.1824,1025.5703))
{
price = ammount*100;
format(string, 128, " Vocк abasteceu a HQ Aztecas com %d materiais por $%d!", ammount, price);
CofreOrg[5][Materiais] = CofreOrg[5][Materiais]+ammount;
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
return 1;
}
return 1;
}
if(strcmp(cmd, "/equiparg", true) == 0)
{
new org = GetPlayerOrg(playerid);
if(org == 5 || org == 14 || org == 17 || org == 18 || org == 19 || org == 20)
{
if(CofreOrg[org][Materiais] < 150)
{
SendClientMessage(playerid,COLOR_GREY," O cofre de sua HQ tem menos de 150 materiais, compre mais com a mбfia ou deposite!");
return 1;
}
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 1;
}
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 1;
}
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 1;
}
if(org == 18 && !PlayerToPoint(3, playerid, 2341.6677,-1186.3137,1027.9766))
{
SendClientMessage(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org de sua HQ!");
return 1;
}
if(org == 19 && !PlayerToPoint(3, playerid, 2151.3218,-1789.1669,13.5097))
{
SendClientMessage(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org de sua HQ!");
return 1;
}
if(org == 20 && !PlayerToPoint(3, playerid, 1327.2062,-877.5867,39.5781))
{
SendClientMessage(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org de sua HQ!");
return 1;
}
new dorgas = CofreOrg[org][Materiais];
if(PlayerInfo[playerid][pLider] >= 1)
{
CofreOrg[org][Materiais] = dorgas-150;
GivePlayerWeapon(playerid, 4, 1);
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.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
else if(PlayerInfo[playerid][pCargo] <= 1)
{
CofreOrg[org][Materiais] = dorgas-150;
GivePlayerWeapon(playerid, 24, 50);
GivePlayerWeapon(playerid, 25, 70);
GivePlayerWeapon(playerid, 29, 100);
GivePlayerWeapon(playerid, 31, 150);
format(string, sizeof(string), "* Gangster %s pega seus equipamentos.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
else if(PlayerInfo[playerid][pCargo] == 2)
{
CofreOrg[org][Materiais] = dorgas-150;
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.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
else if(PlayerInfo[playerid][pCargo] == 3)
{
CofreOrg[org][Materiais] = dorgas-150;
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.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
else if(PlayerInfo[playerid][pCargo] == 4)
{
CofreOrg[org][Materiais] = dorgas-150;
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.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
else if(PlayerInfo[playerid][pCargo] == 5)
{
CofreOrg[org][Materiais] = dorgas-150;
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.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
}
return 1;
}