• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] How does one make a top5?
#4
(2021-02-26, 02:22 AM)Z3fRaN Wrote: more like top 5 killers of all time, i'm using yini so..



There is no need for loops. All you need is already there for you to use:



https://open.mp/docs/scripting/callbacks...Disconnect

https://open.mp/docs/scripting/callbacks/OnPlayerDeath



You make an enum that holds top5 players information (player names, number of kills, maybe time when they moved up in the top and so on...). On?OnPlayerDeath callback you just make the checks if the player has more kills than top5 player or top4 player and so on. On that callback you do the checks and would be a good idea to save the top list after the top changes. Of course you will need to use Y_INI to load the top5 on OnGameModeInit also.
  Reply


Messages In This Thread
How does one make a top5? - by Z3fRaN - 2021-02-26, 01:37 AM
RE: How does one make a top5? - by Virsenas - 2021-02-26, 02:18 AM
RE: How does one make a top5? - by Z3fRaN - 2021-02-26, 02:22 AM
RE: How does one make a top5? - by Virsenas - 2021-02-26, 04:24 AM
RE: How does one make a top5? - by Kwarde - 2021-02-26, 05:22 AM
RE: How does one make a top5? - by Virsenas - 2021-02-26, 11:54 AM
RE: How does one make a top5? - by Kwarde - 2021-02-27, 02:26 PM
RE: How does one make a top5? - by Virsenas - 2021-02-27, 08:43 PM
RE: How does one make a top5? - by arber - 2021-02-27, 11:30 PM
RE: How does one make a top5? - by Radical - 2021-02-27, 11:45 PM
RE: How does one make a top5? - by Z3fRaN - 2021-02-27, 11:55 PM

Forum Jump: