Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Pawn Scripting [Pawn] insert line as much as the amount.

 
  • 0 Vote(s) - 0 Average
Pawn insert line as much as the amount.
Axitz
Offline

Burgershot Member
Posts: 24
Threads: 11
Joined: Apr 2021
Reputation: 0
Location: Malaysia
#1
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.


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;
}
Axitz
Offline

Burgershot Member
Posts: 24
Threads: 11
Joined: Apr 2021
Reputation: 0
Location: Malaysia
#2
2022-05-13, 12:22 PM
bump.
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode