Cmd not working well
#1

pawn Код:
CMD:takebizmoney(playerid, params[])
{
new kiek;
new msg[68];

format(bizfile,sizeof(bizfile),"Business/%i.ini",GetPlayerBusinessID(playerid));


for(new i = 0;i<MAX_BUSS;i++)
{

if(sscanf(params, "i", kiek)) return SendClientMessage(playerid,COLOR_GREY,"[Naudojimas]: /takebizmoney [how much]");


if(dini_Int(bizfile, "Bizmoney") < kiek)
{
   SendClientMessage(playerid, COLOR_GREY, "ur biz dont have so much money");
   return 1;
}

if(!IsNumeric(params))
{
   SendClientMessage(playerid, COLOR_GREY, "wrong letters");
   return 1;
}

BusinessInfo[i][Bizmoney]-=kiek;
GivePlayerMoney(playerid,kiek);

format(msg,sizeof(msg),"tooked %i$",kiek);
SendClientMessage(playerid, COLOR_WHITE, msg);
}
return 1;
}
Whats wrong? When i type /takebiz money amount, server spams to me that amount and gives bad amount... I think something is with new i. This command should take player biz money
Reply


Messages In This Thread
Cmd not working well - by jaksimaksi - 16.08.2011, 05:42
Re: Cmd not working well - by MadeMan - 16.08.2011, 10:19
AW: Cmd not working well - by jaksimaksi - 16.08.2011, 10:23
Re: Cmd not working well - by MadeMan - 16.08.2011, 10:26
AW: Cmd not working well - by jaksimaksi - 16.08.2011, 10:36
Re: AW: Cmd not working well - by MadeMan - 16.08.2011, 10:46
AW: Cmd not working well - by jaksimaksi - 16.08.2011, 10:48

Forum Jump:


Users browsing this thread: 1 Guest(s)