Burgershot
[Pawn] insert line as much as the amount. - Printable Version

+- Burgershot (https://www.burgershot.gg)
+-- Forum: SA-MP (https://www.burgershot.gg/forumdisplay.php?fid=3)
+--- Forum: Pawn Scripting (https://www.burgershot.gg/forumdisplay.php?fid=10)
+--- Thread: [Pawn] insert line as much as the amount. (/showthread.php?tid=2294)



insert line as much as the amount. - Axitz - 2022-05-11

hi,

for now, this line is inserting only 1 by 1 since i used People++; but I want to multiply it by the amount.

so when i put like /test 10
it will create 10 lines.

example code as below.


Code:
COMMAND:test(playerid, params[])
{
new  iAmount;
if( sscanf ( params, "d", iAmount)) return SendClientMessage(playerid,-1, "[amount]");
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
People++;
Pool+=LOTTERY_PRICE;
dini_IntSet("lottery.ini", "money", Pool);
GivePlayerMoney(playerid, -LOTTERY_PRICE);
new string[128];
format(string, sizeof(string), "%d", People);
dini_Set("lottery.ini", string, PlayerName);
return 1;
}



RE: insert line as much as the amount. - Axitz - 2022-05-13

bump.