[Pedido] Duvida sobre o erro Sem equipamentos de venda
#1

Obs sou iniciante no pawno .. gostaria de saber como que eu faзo pra arrumar este erro
Estб dando quando eu vo comprar alguma arma nas lojas de armas, fala que estб ''Sem Equipamento de Venda.''
Obs: Eu efetuei algumas mudanзas de localizхes delas.. Movi elas para outros lugares..


Quote:

if (strcmp(cmd, "/comprararma", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(GetPlayerMoneyEx(playerid) < 1)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo tem todo esse dinheiro estrupнcio!");
return 1;
}
new gun;
new gunid[16];
new gunstring1[256];
new gunstring2[256];
new gunstring3[256];
new infostring[256];
new guncharge;
new ammocharge;
new location = PlayerInfo[playerid][pLocal];
if(PlayerInfo[playerid][pConnectTime] < 2)
{
SendClientMessage(playerid, COLOR_GREY, "Й preciso ter 2+ horas jogadas para poder comprar armas !");
return 1;
}
if(location == 99 || location == 100 || location == 102)
{
new mod = 100;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GREEN,"_____________________________________ __");
SendClientMessage(playerid, COLOR_WHITE,"*** Armas ***");
format(string, sizeof(string), "USE: /comprararma [nomedaarma] [quantidade] - Obs: O preзo й por bala de cada arma !");
SendClientMessage(playerid, COLOR_GREEN, string);
SendClientMessage(playerid, COLOR_GRAD2,string);
format(gunstring1, 256, "Armas: parachute (R$[%d]) golfclub (R$[%d]) nightstick (R$[%d]) baseballbat (R$[%d]) shovel (R$[%d]) poolcue (R$[%d])",
GunPrice[0][0]/100*mod,GunPrice[1][0]/100*mod,GunPrice[2][0]/100*mod,GunPrice[3][0]/100*mod,GunPrice[4][0]/100*mod,GunPrice[5][0]/100*mod,GunPrice[6][0]/100*mod);
SendClientMessage(playerid, COLOR_GRAD3, gunstring1);
format(gunstring2, 256, "Armas: purpledildo (R$[%d]) whitedildo (R$[%d]) longwhitedildo (R$[%d]) whitedildo2 (R$[%d]) flowers (R$[%d]) cane",
GunPrice[7][0]/100*mod,GunPrice[8][0]/100*mod,GunPrice[9][0]/100*mod,GunPrice[10][0]/100*mod,GunPrice[11][0]/100*mod,GunPrice[12][0]/100*mod);
SendClientMessage(playerid, COLOR_GRAD3, gunstring2);
format(gunstring3, 256, "Armas: eagle (R$[%d]) pistolas (R$[%d]) mp5 (R$[%d]) shotgun (R$[%d]) ak47 (R$[%d]) m4 (R$[%d]) rifle (R$[%d])",
GunPrice[13][0]/100*mod,GunPrice[14][0]/100*mod,GunPrice[15][0]/100*mod,GunPrice[16][0]/100*mod,GunPrice[17][0]/100*mod,GunPrice[18][0]/100*mod,GunPrice[19][0]/100*mod,GunPrice[20][0]/100*mod,GunPrice[21][0]/100*mod,GunPrice[22][0]/100*mod,GunPrice[23][0]/100*mod,GunPrice[24][0]/100*mod);
SendClientMessage(playerid, COLOR_GRAD3, gunstring3);
SendClientMessage(playerid, COLOR_GREEN,"_____________________________________ __");
return 1;
}
strmid(gunid, tmp, 0, strlen(cmdtext), 255);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
format(string, sizeof(string), "USE: /comprararma [nomedaarma] [quantidade]");
return 1;
}
new ammo = strval(tmp);
if(ammo < 1 || ammo > 999) { SendClientMessage(playerid, COLOR_GREY, "Balas tem que ser entre 1 e 999 !"); return 1; }
if (strcmp(gunid, "parachute", true, strlen(gunid)) == 0)
{
gun = 46;
guncharge = GunPrice[0][0]/100*mod;
ammocharge = 0;
}
else if (strcmp(gunid, "golfclub", true, strlen(gunid)) == 0)
{
gun = 2; guncharge = GunPrice[1][0]/100*mod; ammocharge = 0;
}
else if (strcmp(gunid, "nightstick", true, strlen(gunid)) == 0)
{
gun = 3; guncharge = GunPrice[2][0]/100*mod; ammocharge = 0;
}
else if (strcmp(gunid, "baseballbat", true, strlen(gunid)) == 0)
{
gun = 5; guncharge = GunPrice[4][0]/100*mod; ammocharge = 0;
}
else if (strcmp(gunid, "shovel", true, strlen(gunid)) == 0)
{
gun = 6; guncharge = GunPrice[5][0]/100*mod; ammocharge = 0;
}
else if (strcmp(gunid, "poolcue", true, strlen(gunid)) == 0)
{
gun = 7; guncharge = GunPrice[6][0]/100*mod; ammocharge = 0;
}
else if (strcmp(gunid, "purpledildo", true, strlen(gunid)) == 0)
{
gun = 10; guncharge = GunPrice[7][0]/100*mod; ammocharge = 0;
}
else if (strcmp(gunid, "whitedildo", true, strlen(gunid)) == 0)
{
gun = 11; guncharge = GunPrice[8][0]/100*mod; ammocharge = 0;
}
else if (strcmp(gunid, "longwhitedildo", true, strlen(gunid)) == 0)
{
gun = 12; guncharge = GunPrice[9][0]/100*mod; ammocharge = 0;
}
else if (strcmp(gunid, "whitedildo2", true, strlen(gunid)) == 0)
{
gun = 13; guncharge = GunPrice[10][0]/100*mod; ammocharge = 0;
}
else if (strcmp(gunid, "flowers", true, strlen(gunid)) == 0)
{
gun = 14; guncharge = GunPrice[11][0]/100*mod; ammocharge = 0;
}
else if (strcmp(gunid, "cane", true, strlen(gunid)) == 0)
{
gun = 15; guncharge = GunPrice[12][0]/100*mod; ammocharge = 0;
}
else if (strcmp(gunid, "eagle", true, strlen(gunid)) == 0)
{
gun = 24; guncharge = GunPrice[15][0]/100*mod; ammocharge = GunPrice[25][0]*ammo;
}
else if (strcmp(gunid, "mp5", true, strlen(gunid)) == 0)
{
gun = 29; guncharge = GunPrice[18][0]/100*mod; ammocharge = GunPrice[27][0]*ammo;
}
else if (strcmp(gunid, "shotgun", true, strlen(gunid)) == 0)
{
gun = 25; guncharge = GunPrice[19][0]/100*mod; ammocharge = GunPrice[26][0]*ammo;
}
else if (strcmp(gunid, "ak47", true, strlen(gunid)) == 0)
{
gun = 30; guncharge = GunPrice[22][0]/100*mod; ammocharge = GunPrice[28][0]*ammo;
}
else if (strcmp(gunid, "m4", true, strlen(gunid)) == 0)
{
gun = 31; guncharge = GunPrice[23][0]/100*mod; ammocharge = GunPrice[28][0]*ammo;
}
else if (strcmp(gunid, "rifle", true, strlen(gunid)) == 0)
{
gun = 33; guncharge = GunPrice[24][0]/100*mod; ammocharge = GunPrice[29][0]*ammo;
}
else if (strcmp(gunid, "eagle", true, strlen(gunid)) == 0)
{
gun = 24; guncharge = GunPrice[15][0]/100*mod; ammocharge = 0;
}
else
{
SendClientMessage(playerid, COLOR_GRAD6, "Traficante: Nunca ouvi falar dessa arma.");
return 1;
}
if((guncharge+ammocharge) > GetPlayerMoneyEx(playerid))
{
format(infostring, 256, " Vocк nгo tem R$%d !",guncharge+ammocharge);
SendClientMessage(playerid, COLOR_GRAD3, infostring);
return 1;
}
if(GetPlayerMoneyEx(playerid) < (guncharge+ammocharge))
{
SendClientMessage(playerid, COLOR_GREY, " Nгo pode se permitir isso !");
return 1;
}
new payout = guncharge + ammocharge;
if(location == 102 && IsACop(playerid)) { }
else { GivePlayerMoneyEx(playerid, - payout); }
BizzInfo[6][bTill] += payout;
ExtortionBiz(6, payout);
BizzInfo[0][bTill] += payout;
ExtortionBiz(0, 2000);
BizzInfo[1][bTill] += payout;
ExtortionBiz(1, payout);
CofreGov += payout;
SaveCofreGov();
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
if(formadinheiro[playerid] == 1)
{
GivePlayerWeapon(playerid, gun, ammo);
format(gstring, 128, "Vocк comprou um(a) %s com %d bala(s) por R$[%d] com seu dinheiro.",gunid,ammo,payout);
SendClientMessage(playerid, COLOR_GRAD1, gstring);
}
else if(formacartao[playerid] == 1)
{
PlayerInfo[playerid][pConta] -= ammo;
PlayerInfo[playerid][pConta] -= gun;
format(gstring, 128, "Vocк comprou um(a) %s com %d bala(s) por R$[%d] com seu cartгo de dйbito.",gunid,ammo,payout);
SendClientMessage(playerid, COLOR_GRAD1, gstring);
}
formacartao[playerid] = 0;
formadinheiro[playerid] = 0;
GivePlayerWeapon(playerid, gun, ammo);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s comprou armas por R$%d na empresa %d", sendername, payout, location-99);
printf("%s", string);
GranaLog(string);
}
else
{
SendClientMessage(playerid, COLOR_WHITE,"Sem Equipamento de Venda.");
return 1;
}
}
return 1;
}

Reply
#2

Alguйm pra ajudar?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)