2022-05-11, 12:28 PM
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.
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;
}