GitHunt
LU

luis-rei97/-ZR-Zombie-Rank

A Rank Plugin System destinated for Zombie Escape or Zombie Mod servers, which have the Zombie Reloaded Plugin!

[ZR/ZP] Rank System

A simple rank system destined to servers with any plugins related to the Zombie Gamemode (that is supported currently).

Requirements:

MySQL

Add this to your databases.cfg in addons/sourcemod/configs and change it as you need.

"zr_rank"
{
  "driver"    "mysql"
  "host"      "YOUR_HOST_ADDRESS"
  "database"  "YOUR_DATABASE_NAME"
  "user"      "DATABASE_USERNAME"
  "pass"      "USERNAME_PASSWORD"
}

Installation

  1. Put the file zr_rank.smx in addons/sourcemod/plugins;
  2. Put the file zr_rank.phrases.txt in addons/sourcemod/translations

Commands

  • sm_rank - It shows your positions in the rank and your total points;
  • sm_top NUMBER - It shows the Top NUMBER players listed in the database, order by Points;
  • sm_topkills NUMBER - It shows the Top NUMBER players listed in the database, order by Zombies Killed;
  • sm_topinfects NUMBER - It shows the Top NUMBER players listed in the database, order by Infected Humans;
  • sm_humanwins NUMBER - It shows the Top NUMBER players listed in the database, order by Round Wins as Human;
  • sm_zombiewins NUMBER - It shows the Top NUMBER players listed in the database, order by Round Wins as Zombie;
  • sm_resetrank_all - It will reset all the players in the database (needs ROOT FLAG to have access);
  • sm_mystats - Show every stat that you the player has in the database;
  • sm_resetmyrank - It lets a player delete his rank by himself;

ConVars

  • zr_rank_startpoints (Default: 100) - Number of points that a new player starts;
  • zr_rank_infecthuman (Default: 1) - Number of points that you get when you infect an human (0 will disable it)
  • zr_rank_killzombie (Default: 1) - Number of points that you get when you kill a zombie (0 will disable it)
  • zr_rank_killzombie_headshot (Default: 2) - Number of points that you get when you kill a zombie with an headshot (0 will disable it);
  • zr_rank_killzombie_knife (Default: 5) - Number of points that you get when you kill a zombie with a knife (0 will disable it);
  • zr_rank_killzombie_he (Default: 3) - Number of points that you get when you kill a zombie with a He Grenade (0 will disable it);
  • zr_rank_killzombie_smokeflashbang (Default: 20) - Number of points that you get when you kill a zombie with a Smoke/Flashbang (0 will disable it);
  • zr_rank_stabzombie_left (Default: 1) - Number of points that you get when you stab a zombie with left mouse button (0 will disable it);
  • zr_rank_stabzombie_right (Default: 1) - Number of points that you get when you stab a zombie with right mouse button (0 will disable it);
  • zr_rank_maxplayers_top (Default: 50) - Max number of players that are shown in the top commands;
  • zr_rank_minplayers (Default: 4) - Minimum players for activating the rank system (0 will disable this function);
  • zr_rank_beinginfected (Default: 1) - How many points you lost if you got infected by a zombie;
  • zr_rank_beingkilled (Default: 1) - How many points you lost if you get killed by an human;
  • zr_rank_allow_warmup (Default: 0) - Allow players to get or lose points during Warmup;
  • zr_rank_prefix (Default: [{green}ZR Rank{default}] - Prefix to be used in every chat's plugin (You can use ColorVariables colors code);
  • zr_rank_suicide (Default: 0) - How many points a player lose when he suicides;
  • zr_rank_roundwin_human (Default: 1) - How many points a player gets when he wins the round as an human;
  • zr_rank_roundwin_zombie (Default: 1) - How many points a player gets when he wins the round as an zombie;
  • zr_rank_inactive_days (Default: 30) - It resets a player database when he is not connected from at least X days;
/*********************************************************
 * Get's the number of a player's points
 *
 * @param client		The client to get the points
 * @return				The number of points		
 *********************************************************/
native int ZR_Rank_GetPoints(int client);

/*********************************************************
 * Get's the number of a player's Zombie Kills
 *
 * @param client		The client to get the zombie kills
 * @return				The number of points		
 *********************************************************/
native int ZR_Rank_GetZombieKills(int client);

/*********************************************************
 * Get's the number of a player's Human Infects
 *
 * @param client		The client to get the zombie kills
 * @return				The number of points		
 *********************************************************/
native int ZR_Rank_GetHumanInfects(int client);

/*********************************************************
 * Get's the number of a player's Round Wins as Zombie
 *
 * @param client		The client to get the round wins
 * @return				The number of round wins		
 *********************************************************/
native int ZR_Rank_GetRoundWins_Zombie(int client);

/*********************************************************
 * Get's the number of a player's Round Wins as Human
 *
 * @param client		The client to get the round wins
 * @return				The number of round wins		
 *********************************************************/
native int ZR_Rank_GetRoundWins_Human(int client);

/*********************************************************
 * Sets points to a certain player
 *
 * @param client		The client to get the points
 * @param points		Number of points to set
 * @return				The number of points	
 *********************************************************/
native bool ZR_Rank_SetPoints(int client, int points);

/*********************************************************
 * Reset a Player's Stats
 *
 * @param client		The client to reset the data
 * @noreturn
 *********************************************************/
native bool ZR_Rank_ResetPlayer(int client);

Changelog

To see the full changelog, check the CHANGELOG.md file -> https://github.com/hallucinogenic/-ZR-Zombie-Rank/blob/master/CHANGELOG.md

To-Do List

  • Translations -> DONE;
  • Support for more than 10 players in the sm_top command; -> DONE
  • Lose points by being infected or killed; -> DONE
  • Better checker for left and right mouse buttons when you stab a zombie;
  • A simple API for another sub-plugins; - Partialy DONE
  • A WebPage to show the rank of any player;
  • Optimize the code (A LOT);
  • Other suggestions given to me;

I hope you enjoyed, and I'll keep this repository updated as soon as I update the plugin!

My Steam Profile if you have any questions -> http://steamcommunity.com/id/HallucinogenicTroll/

My Website -> http://HallucinogenicTrollConfigs.com/

Languages

SourcePawn100.0%

Contributors

GNU General Public License v3.0
Created May 23, 2018
Updated February 3, 2026
luis-rei97/-ZR-Zombie-Rank | GitHunt