Rank system - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Rank system (
/showthread.php?tid=320473)
Rank system -
[LHT]Bally - 23.02.2012
hi was wondering if anyonecan help me with making a rank system
that works off the score inmy game mode
say 100 score is newbie
200+is experienced noob etc ?
but would also like it that when a player reaches the score to next rank it says to all players
such player is now a newbie
Re: Rank system -
JamesC - 23.02.2012
Have a go at creating this yourself. If you have any issues, come back here and post them. All you have to do is look at the wiki and find the GetPlayerScore function.
Re: Rank system -
[LHT]Bally - 23.02.2012
thanksyou im going to try create it myself .
Re: Rank system -
MP2 - 23.02.2012
Create an array of the score needed for each rank, a variable to store the player's current rank, and make a GivePlayerScore function to handle levelling up and because it's easier than using SetPlayerScore.
Re: Rank system -
[LHT]Bally - 23.02.2012
ok thankyou, also i need help to stop the vehicles blowing up, i want them to turn off the engine instead, i just cant think where to put it the code i have
Re: Rank system -
MP2 - 23.02.2012
Have you worked out how to do this levelling system? I just whipped this up:
http://pastebin.com/KxA5Xf2E
Tested it only with prints in the console. Let me know if there are any issues.
Current player rank is pRank[playerid] + 1. Set their rank to 0 on register, and it will be 1. They start at rank 1.
NOTE: pScore needs to be replaced with Get/SetPlayerScore. I did this as I never went in-game and tested it via OnRconCommand. I'll do it if you want but I'm sure you can manage. Also pName needs properly doing with GetPlayerName.
Re: Rank system -
[LHT]Bally - 23.02.2012
im new to scripting so i willmost probably struggle to do it , do u have team viewer
Re: Rank system -
MP2 - 23.02.2012
Didn't I just give you the code?