Raised This Month: $51 Target: $400
 12% 

Help / Support |help| hud stats !!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dr.Mohammad
Senior Member
Join Date: Jan 2016
Location: CSGO Servers
Old 07-17-2016 , 12:26   |help| hud stats !!
Reply With Quote #1

hi guys !
plz add modes nightcrawler , knifer , plasma and dragon .
how i can add modes to plagin??
plz help!!
PHP Code:
#include <amxmodx>
#include <zombieplague>
#include <zp50_core_const>

#define PLUGIN_VERSION_STR "1.0.1"

#define TASK_SHOW_STATS 100
#define ID_SHOW_STATS (taskid - TASK_SHOW_STATS)

const Float:HUD_GAME_X = -1.0
const Float:HUD_GAME_Y 0.02

const HUD_GAME_STATS_R 250
const HUD_GAME_STATS_G 0
const HUD_GAME_STATS_B 0

const MODE_NONE 0

new ZombieScore;
new 
HumanScore;

new 
g_MsgGameStats;

new 
g_Mode;

new 
szDescription[32];

public 
plugin_init()
{
    
register_plugin("[ZP] Game Stats"PLUGIN_VERSION_STR"funkyfresh")
    
    
register_event("TextMsg""event_restart_round""a""2&#Game_C""2&#Game_w")
    
register_event("HLTV""event_start_round""a""1=0""2=0")
    
    
g_MsgGameStats CreateHudSyncObj()
}

public 
zp_round_started(gamemodeid)
{
    
g_Mode gamemode;
}

public 
zp_round_ended(winteam)
{
    switch(
winteam)
    {
        case 
WIN_ZOMBIESZombieScore++
        case 
WIN_HUMANSHumanScore++
    }
    
    
g_Mode MODE_NONE;
}

public 
client_putinserver(id)
{
    if(!
is_user_bot(id))
        
set_task(1.0"task_show_info"id+TASK_SHOW_STATS__"b")
}

public 
client_disconnect(id)
{
    
remove_task(id+TASK_SHOW_STATS)
}

public 
event_restart_round()
{
    
ZombieScore 0;
    
HumanScore 0;
    
    
g_Mode MODE_NONE;
}

public 
event_start_round()
{
    
g_Mode MODE_NONE;
}

public 
task_show_info(taskid)
{
    switch(
g_Mode)
    {
        case 
MODE_NONEformatex(szDescriptioncharsmax(szDescription), "No infection.. Yet..")
        case 
MODE_INFECTIONformatex(szDescriptioncharsmax(szDescription), "Infection Mode")
        case 
MODE_NEMESISformatex(szDescriptioncharsmax(szDescription), "Nemesis Mode")
        case 
MODE_SURVIVORformatex(szDescriptioncharsmax(szDescription), "Survivor Mode")
        case 
MODE_SWARMformatex(szDescriptioncharsmax(szDescription), "Swarm Mode")
        case 
MODE_MULTIformatex(szDescriptioncharsmax(szDescription), "Multi Infection Mode")
        case 
MODE_PLAGUEformatex(szDescriptioncharsmax(szDescription), "Plague Mode")
        case 
MODE_ASSASSINformatex(szDescriptioncharsmax(szDescription), "Assassin Mode")
        case 
MODE_SNIPERformatex(szDescriptioncharsmax(szDescription), "Sniper Mode")
        case 
MODE_ARMAGEDDONformatex(szDescriptioncharsmax(szDescription), "Armageddon Mode")
    }    
    
    
set_hudmessage(HUD_GAME_STATS_RHUD_GAME_STATS_GHUD_GAME_STATS_BHUD_GAME_XHUD_GAME_Y06.01.10.00.0, -1)
    
ShowSyncHudMsg(ID_SHOW_STATSg_MsgGameStats"Zombie Plague %s^nGamemod: %s^nZombies Score [%d] - Humans Score [%d]"ZP_VERSION_STRINGszDescriptionZombieScoreHumanScore)

Dr.Mohammad is offline
Reply



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 18:03.


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