Raised This Month: $202 Target: $400
 50% 

Rank System [ Ranks | Levels | EXP ]


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   General Purpose       
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 09-07-2020 , 10:52   Rank System [ Ranks | Levels | EXP ]
Reply With Quote #1

Rank System 1.2
Release: September, 07,2020 | Last Update: May, 24, 2021


Table of Contents
Description top

Give players something to play for!
Images top
Spoiler


Installation top

To install the plugin:
  1. Download the zip file..
  2. Put RankSystem.amxx in cstrike/addons/amxmodx/plugins
  3. Open addons/amxmodx/configs/plugins.ini and add at the end of this file RankSystem.amxx
  4. Restart the server/change map.
Cvars top
  • save_type: Saving data using steam id, name, ip. Default 1
    • 2 = Name | 3 = IP | Default(0, 1, 4, 5, etc) = Steam .
  • hud_rank: Enable / Disable Hud. Default 1
  • kill_xp: EXP Bouns. Default 15
  • hs_xp: Head Shot Bouns. Default 5
  • he_xp: HE Granade Bouns. Default 5
  • knife_xp: Knife Bouns. Default 10
Access's top
Spoiler


Commands top
  • /xplist: Opens a menu that show online players for checking them rank data.
  • /resetdata: Opens a menu that show online players for reset them rank data.
  • /managa: Opens a menu that show online players for changing them rank.
  • amx_givelvl: Console commands that can let you give players more levels.
  • amx_givexp: Console commands that can let you give players more xp.
Credits top
  • CrazY.: for exmple: how to combine the menus Link.
ChangeLog top
  • Version: 1.0 (September, 05,2020 ):
    • Initial release.
  • Version: 1.1 (May, 17,2021 ):
    • Fixed a bug when player get more than max level, hud get bug.
    • Added give level cmd.
    • Added give xp cmd.
    • Added reset user data menu.
    • Added forward level up.
    • Added native get_max_levels.
  • Version: 1.2 ( May, 24, 2021 ):
    • Fixed a bug When using give xp cmd showing error log msg.
    • Fixed a bug When reset data of player the first rank get disable.
    • Fixed a bug name doesn't get update.
    • Support 1.8.3+ & Any mode.
    • Improved Load / Save checks against bots or hltv proxies.
    • Added native get_user_next_rank.
    • Less hard coded.
    • Optimizied Code.
Downloads top
  • Version 1.0: 423 Downloads.
  • Version 1.1: 10 Downloads.
Attached Files
File Type: inc RankSystem.inc (1.7 KB, 70 views)
File Type: sma Get Plugin or Get Source (RankSystem.sma - 137 views - 19.9 KB)

Last edited by Supremache; 06-06-2021 at 06:20. Reason: Update v1.2
Supremache is offline
ZaKaRiAMaGh
Junior Member
Join Date: Apr 2020
Location: Morocco
Old 09-07-2020 , 11:21   Re: Rank System [ Ranks | Levels | EXP ]
Reply With Quote #2

i will try it
ZaKaRiAMaGh is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 09-07-2020 , 15:14   Re: Rank System [ Ranks | Levels | EXP ]
Reply With Quote #3

So basically it's the same as mine, only hardcoded and much less options. :\
__________________


Dear admins. If somehow you managed to read this, plz fix.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Old 09-07-2020, 15:40
Supremache
This message has been deleted by Supremache.
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 10-10-2020 , 15:04   Re: Rank System [ Ranks | Levels | EXP ]
Reply With Quote #4

Quote:
Originally Posted by OciXCrom View Post
So basically it's the same as mine, only hardcoded and much less options. :\
__________________
Napoleon_be is online now
Send a message via Skype™ to Napoleon_be
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 10-10-2020 , 22:53   Re: Rank System [ Ranks | Levels | EXP ]
Reply With Quote #5

So, what i have to do ??
__________________
Supremache is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 10-11-2020 , 04:38   Re: Rank System [ Ranks | Levels | EXP ]
Reply With Quote #6

Quote:
Originally Posted by Supremache View Post
So, what i have to do ??
1) Don't hardcode (didn't check your code but if OciXCrom says there's some hardcoding in there, he's probably right)

2) If you release a plugin that already exists, make sure it has more features than the other plugin(s).

3) There are already a lot of plugins simular to this one, i would just suggest coming up with an idea that no one has ever had before.
__________________
Napoleon_be is online now
Send a message via Skype™ to Napoleon_be
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 10-11-2020 , 06:37   Re: Rank System [ Ranks | Levels | EXP ]
Reply With Quote #7

Quote:
Originally Posted by Napoleon_be View Post
1) Don't hardcode (didn't check your code but if OciXCrom says there's some hardcoding in there, he's probably right)

2) If you release a plugin that already exists, make sure it has more features than the other plugin(s).

3) There are already a lot of plugins simular to this one, i would just suggest coming up with an idea that no one has ever had before.
Well, It's beta version and started to learn the scripting before some months but it's okay i learning everyday new thing and i'm happy when some one support me and provide me some suggestions..
__________________

Last edited by Supremache; 10-11-2020 at 06:44.
Supremache is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 10-11-2020 , 06:47   Re: Rank System [ Ranks | Levels | EXP ]
Reply With Quote #8

Quote:
Originally Posted by Supremache View Post
Well, It's beta version and started to learn the scripting before some months but it's okay i learning everyday new thing and i'm happy when some one support me and provide me some suggestions..

But i want to ask about what do you mean about hardcoded ? I think my plugin is so easy and I have put "Rank Name" beside "EXP" for being easy for who want to editing them.
For example this is hardcoding your array size:

PHP Code:
new szName[32];
get_user_name(idszName31); 
This is just a simple example, if you declare your arrays globaly and need to retrieve the array size multiple times, you should use charsmax() instead of hardcoding the array size everytime. When using charsmax(), you only have to change the array size (if u ever have to) and everything will be fine.

For example, if szName[32] ever becomes szName[64], you have to redo every single line where you used that array.

charsmax() fixes this problem.

PHP Code:
new szName[32];
get_user_name(idszNamecharsmax(szName)); 
charsmax is the same as sizeof() - 1. The function itself says it, maximum characters available for the array.
__________________
Napoleon_be is online now
Send a message via Skype™ to Napoleon_be
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 10-11-2020 , 07:21   Re: Rank System [ Ranks | Levels | EXP ]
Reply With Quote #9

Quote:
Originally Posted by Napoleon_be View Post
For example this is hardcoding your array size:

PHP Code:
new szName[32];
get_user_name(idszName31); 
This is just a simple example, if you declare your arrays globaly and need to retrieve the array size multiple times, you should use charsmax() instead of hardcoding the array size everytime. When using charsmax(), you only have to change the array size (if u ever have to) and everything will be fine.

For example, if szName[32] ever becomes szName[64], you have to redo every single line where you used that array.

charsmax() fixes this problem.

PHP Code:
new szName[32];
get_user_name(idszNamecharsmax(szName)); 
charsmax is the same as sizeof() - 1. The function itself says it, maximum characters available for the array.
Well, thanks i understand but what is better sizeof() -1 or charsmax()
__________________
Supremache is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 10-11-2020 , 07:24   Re: Rank System [ Ranks | Levels | EXP ]
Reply With Quote #10

charsmax = sizeof - 1

Also, those small hardcoded details are nothing compared to the entire ranks and XP being hardcoded, lacking a configuration file.
__________________


Dear admins. If somehow you managed to read this, plz fix.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:47.


Powered by vBulletin®
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Theme made by Freecode