17.04.2013, 11:05
Try this:
Question: Why you enter %d for each bomb's price? A single bomb costs a specific value doesn't it?
pawn Код:
format(message, sizeof(message), "You bought %d bombs for %d CSCash each - Total Spent: %d CSCash", bombs,BOMBPRICE,BOMBPRICE * bombs);
SCM(playerid, 0x33CCFFAA, message);
pInfo[playerid][Bombs] += bombs;
new OldCash=GetCash(playerid); //I added this
GiveCash(playerid, -BOMBPRICE * bombs);
new Year, Month, Day, Hour, Minute, Second;
getdate(Year, Month, Day);
gettime(Hour, Minute, Second);
new pname[MAX_PLAYER_NAME];
new msg[400];
new ok[400];
GetPlayerName(playerid, pname, 24);
format(msg, sizeof(msg), "%s (%d) bought %d bombs for 15.000$ CSCash each - Total Spent: %d CSCash - CSCash Left: %i - %02d/%02d/%02d - %02d:%02d:%02d", pname,playerid,bombs,BOMBPRICE * bombs,OldCash-(BOMBPRICE * bombs),Day,Month,Year,Hour,Minute,Second);
format(ok, sizeof(ok), "1,7%s (%d) bought %d bombs for 15.000$ CSCash each - Total Spent: %d CSCash - CSCash Left: %i - %02d/%02d/%02d - %02d:%02d:%02d", pname,playerid,bombs,BOMBPRICE * bombs,OldCash-(BOMBPRICE * bombs),Day,Month,Year,Hour,Minute,Second);
SendMessageToAdmins(0xA86EFC77, msg);
IRC_Say(gGroupID, IRC_ACHANNEL, ok);
ShopLog(msg);