16.08.2011, 05:42
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;
}