kenzake powah! Posted February 25, 2017 Posted February 25, 2017 Descriere: : Acest plugin va arata toate kill-urile in hud , plus ca va arata si un grad care se schimba la un anumit nr. de frage/kill-uriDescarcare: #include <amxmodx>#include <amxmisc>#include <csstats>#define HUD_INTERVAL 1.0#define RANK_NOTHING 0#define RANK_PRIVATE 1#define RANK_PRIVATE_FIRST_CLASS 2#define RANK_CORPORAL 3#define RANK_SERGEANT 4#define RANK_STAFF_SERGEANT 5#define RANK_GUNNERY_SERGEANT 6#define RANK_MASTER_SERGEANT 7#define RANK_COMMAND_SERGEANT 8#define RANK_SECOND_LIEUTENANT 9#define RANK_FIRST_LIEUTENANT 10#define RANK_COLONEL 11#define RANK_BRIGADIER_GENERAL 12#define RANK_MAJOR_GENERAL 13#define RANK_LIEUTENANT_GENERAL 14#define RANK_GENERAL 15#define RANK_GENERAL_OF_THE_ARMY 16#define MAXRANKS 17new PlayerRank[33]new const rankNames[MAXRANKS][] ={"None","Private","Private First Class","Corporal","Sergeant","Staff Sergeant","Gunnery Sergeant","Master Sergeant","Command Sergeant","Second Lieutenant","First Lieutenant","Colonel","Brigadier General","Major General","Lietenant General","General","General of the Army"}new const rankXP[MAXRANKS] ={0, 100, 200, 400, 800,1000,2000,4000, 8000, 10000, 12000, 15000, 20000, 40000, 50000, 80000, 100000}public plugin_init(){register_plugin("Rank Display", "1.1","GaBy @ CServers Gaming")}public client_putinserver(id){set_task(HUD_INTERVAL, "ShowHUD", id)return PLUGIN_HANDLED}public ShowHUD(id){if(!is_user_connected(id))return 0static stats[8], hits[8], name[33]get_user_stats(id, stats, hits)get_user_name(id, name, 32)new currentPlayerRank = 0;while(currentPlayerRank < (MAXRANKS - 1)){if(stats[0] >= rankXP[currentPlayerRank + 1])++currentPlayerRank;elsebreak;}new leftkills = rankXP[currentPlayerRank + 1] - stats[0];//I have no idea why you are storing the rank here, maybe you're planning to use it laterPlayerRank[id] = currentPlayerRank;set_hudmessage(237, 245, 9, 0.0, 0.6, 0, 6.0, 12.0)show_hudmessage(id, "[%s - %s] Kills: %i", name, rankNames[currentPlayerRank], leftkills)set_task(HUD_INTERVAL, "ShowHUD", id)return PLUGIN_HANDLED} Nume: rank_displayVersiune: 1.0Autor:Instalare:1. Fisierul rank_display.sma il puneti in addons/amxmodx/scripting2. Fisierul rank_display.amxx il puneti in addons/amxmodx/plugins3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:rank_display.amxxCvaruri:Module necesare:amxmisccsstatsImagini:
Recommended Posts