05.10.2012, 01:53
Olб, meu /equiparg ta bugado, eu coloco ele para equipar depois de 2 minutos, mais ele equipa e primeira vez, e depois sempre aparece a mensagem que eu botei.
Aqui estб o cуdigo, eu sу botei para [pLider]
Obrigado.
Aqui estб o cуdigo, eu sу botei para [pLider]
pawn Код:
if(strcmp(cmd, "/equiparg", true) == 0)
{
if(equipargtempo[playerid] == 1)
{
MSGPLAYER(playerid, COLOR_GREY, "Espere 2 minutos para equipar novamente");
return 1;
}
new org = GetPlayerOrg(playerid);
if(org == 5 || org == 14 || org == 17 || org == 18 || org == 19 || org == 20 || org == 21 || org == 23 || org == 22 || org == 24 || org == 25 || org == 27)
{
if(BancoDasOrgs[org][Materiais] < 100)
{
MSGPLAYER(playerid,COLOR_GREY,"E Preciso ter 100 de Materiais E 50 De Maconha No Cofre Para equipar!");
return 1;
}
if(org == 5 && !PlayerToPoint(3, playerid, 2811.7102,-1166.1824,1025.5703))
{
MSGPLAYER(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org dos Aztecas!");
return 1;
}
if(org == 14 && !PlayerToPoint(3, playerid, 2514.1301,-1691.2979,14.0460))
{
MSGPLAYER(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org dos Groove!");
return 1;
}
if(org == 17 && !PlayerToPoint(3, playerid, 1074.7671,-1204.1219,18.1446))
{
MSGPLAYER(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org dos Ballas!");
return 1;
}
if(org == 18 && !PlayerToPoint(3, playerid, 2341.6677,-1186.3137,1027.9766))
{
MSGPLAYER(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org dos Vagos!");
return 1;
}
if(org == 19 && !PlayerToPoint(3, playerid, 2151.3218,-1789.1669,13.5097))
{
MSGPLAYER(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org do CV!");
return 1;
}
if(org == 20 && !PlayerToPoint(3, playerid, 1327.2062,-877.5867,39.5781))
{
MSGPLAYER(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org do P.C.C!");
return 1;
}
if(org == 21 && !PlayerToPoint(3, playerid, 961.7298,-1544.0291,13.5960))
{
MSGPLAYER(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org dos O.S.Loko!");
return 1;
}
if(org == 23 && !PlayerToPoint(3, playerid, 1025.0548,-2020.7316,45.1003))
{
MSGPLAYER(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org dos Drifters!");
return 1;
}
if(org == 22 && !PlayerToPoint(3, playerid, 1028.4290,-1102.8259,23.8281))
{
MSGPLAYER(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org dos Sons Of Anarchy!");
return 1;
}
if(org == 24 && !PlayerToPoint(3, playerid, 2788.9832,-1628.0317,10.9272))
{
MSGPLAYER(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org dos T.C.Puro!");
return 1;
}
if(org == 25 && !PlayerToPoint(3, playerid, 2469.8074,-1943.4243,16.8859))
{
MSGPLAYER(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org dos A.D.A!");
return 1;
}
if(org == 27 && !PlayerToPoint(3, playerid, 152.9094,1371.9668,1083.8594))
{
MSGPLAYER(playerid,COLOR_GREY," Vocк sу pode equipar no cofre org dos G-Unit!");
return 1;
}
new dorgas = BancoDasOrgs[org][Materiais];
if(PlayerInfo[playerid][pLider] >= 1)
{
BancoDasOrgs[org][Materiais] = dorgas-100;
BancoDasOrgs[org][Maconha] = dorgas-50;
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 500);
GivePlayerWeapon(playerid, 30, 900);
GivePlayerWeapon(playerid, 29, 900);
GivePlayerWeapon(playerid, 25, 500);
GivePlayerWeapon(playerid, 5, 1);
GivePlayerWeapon(playerid, 1, 1);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string, sizeof(string), " O Lider %s pega seus equipamentos.", sendername, playerid);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
equipargtempo[playerid] = 1;
SetTimerEx("equiparg",12000,0,"d",playerid);
return 1;
}
else if(PlayerInfo[playerid][pCargo] <= 1)
{
BancoDasOrgs[org][Materiais] = dorgas-100;
BancoDasOrgs[org][Maconha] = dorgas-50;
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 500);
GivePlayerWeapon(playerid, 30, 900);
GivePlayerWeapon(playerid, 29, 900);
GivePlayerWeapon(playerid, 25, 500);
GivePlayerWeapon(playerid, 5, 1);
GivePlayerWeapon(playerid, 1, 1);
SetPlayerArmour(playerid, 20);
SetPlayerHealth(playerid, 100);
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string, sizeof(string), " O Membro %s pega seus equipamentos.", sendername, playerid);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
else if(PlayerInfo[playerid][pCargo] == 2)
{
BancoDasOrgs[org][Materiais] = dorgas-100;
BancoDasOrgs[org][Maconha] = dorgas-50;
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 500);
GivePlayerWeapon(playerid, 30, 900);
GivePlayerWeapon(playerid, 29, 900);
GivePlayerWeapon(playerid, 25, 500);
GivePlayerWeapon(playerid, 5, 1);
GivePlayerWeapon(playerid, 1, 1);
SetPlayerArmour(playerid, 40);
SetPlayerHealth(playerid, 100);
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string, sizeof(string), " O Membro %s pega seus equipamentos.", sendername, playerid);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
else if(PlayerInfo[playerid][pCargo] == 3)
{
BancoDasOrgs[org][Materiais] = dorgas-100;
BancoDasOrgs[org][Maconha] = dorgas-50;
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 500);
GivePlayerWeapon(playerid, 30, 900);
GivePlayerWeapon(playerid, 29, 900);
GivePlayerWeapon(playerid, 25, 500);
GivePlayerWeapon(playerid, 5, 1);
GivePlayerWeapon(playerid, 1, 1);
SetPlayerArmour(playerid, 60);
SetPlayerHealth(playerid, 100);
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string, sizeof(string), " O Membro %s pega seus equipamentos.", sendername, playerid);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
else if(PlayerInfo[playerid][pCargo] == 4)
{
BancoDasOrgs[org][Materiais] = dorgas-100;
BancoDasOrgs[org][Maconha] = dorgas-50;
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 500);
GivePlayerWeapon(playerid, 30, 900);
GivePlayerWeapon(playerid, 29, 900);
GivePlayerWeapon(playerid, 25, 500);
GivePlayerWeapon(playerid, 5, 1);
GivePlayerWeapon(playerid, 1, 1);
SetPlayerArmour(playerid, 80);
SetPlayerHealth(playerid, 100);
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string, sizeof(string), " O Membro %s pega seus equipamentos.", sendername, playerid);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
else if(PlayerInfo[playerid][pCargo] == 5)
{
BancoDasOrgs[org][Materiais] = dorgas-100;
BancoDasOrgs[org][Maconha] = dorgas-50;
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 500);
GivePlayerWeapon(playerid, 30, 900);
GivePlayerWeapon(playerid, 29, 900);
GivePlayerWeapon(playerid, 25, 500);
GivePlayerWeapon(playerid, 5, 1);
GivePlayerWeapon(playerid, 1, 1);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string, sizeof(string), " O Membro %s pega seus equipamentos.", sendername, playerid);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
}
return 1;
}