16.08.2011, 10:26
pawn Код:
CMD:takebizmoney(playerid, params[])
{
new kiek;
new msg[68];
new bizid = GetPlayerBusinessID(playerid);
format(bizfile,sizeof(bizfile),"Business/%i.ini",bizid);
if(sscanf(params, "i", kiek)) return SendClientMessage(playerid,COLOR_GREY,"[Naudojimas]: /takebizmoney [how much]");
if(BusinessInfo[bizid][Bizmoney] < kiek)
{
SendClientMessage(playerid, COLOR_GREY, "ur biz dont have so much money");
return 1;
}
BusinessInfo[bizid][Bizmoney]-=kiek;
GivePlayerMoney(playerid,kiek);
dini_IntSet(bizfile, "Bizmoney", BusinessInfo[bizid][Bizmoney]);
format(msg,sizeof(msg),"tooked %i$",kiek);
SendClientMessage(playerid, COLOR_WHITE, msg);
return 1;
}