Raised This Month: $ Target: $400
 0% 

I need compile this hud plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 12-25-2023 , 22:29   Re: I need compile this hud plugin
Reply With Quote #2

Visit https://spider.limetech.io/ and select AMX MOD X
PHP Code:
#include <amxmodx>
#include <fun>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN "Win HUD."
#define VERSION "0.1"
#define AUTHOR "SNAFFY"

#pragma semicolon 0

new g_winh g_winz count g_roundhud

native zp_is_nemesis_round
()
native zp_is_survivor_round()
native zp_has_round_started()
native zp_get_user_zombie(id)
forward zp_round_ended(winteam)

const 
WIN_ZOMBIES 1

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
register_event("HLTV""event_roundstart""a""1=0""2=0")

    
set_task (0.6,"showhud",_,_,_,"b");

    
g_roundhud 1
}

public 
plugin_precache()
{
    
precache_sound("Premium_plague/count/1.wav")
    
precache_sound("Premium_plague/count/2.wav")
    
precache_sound("Premium_plague/count/3.wav")
    
precache_sound("Premium_plague/count/4.wav")
    
precache_sound("Premium_plague/count/5.wav")
    
precache_sound("Premium_plague/count/6.wav")
    
precache_sound("Premium_plague/count/7.wav")
    
precache_sound("Premium_plague/count/8.wav")
    
precache_sound("Premium_plague/count/9.wav")
    
precache_sound("Premium_plague/count/10.wav")
    
precache_sound("Premium_plague/count/start1.mp3")
    
precache_sound("Premium_plague/count/start2.mp3")
    
precache_sound("Premium_plague/count/start3.mp3")
}

public 
event_roundstart()
{
    
set_task(9.0,"start_countdown",1499)

    new 
players[32], numid
    get_players
(playersnum"ach")

    for (new 
0numi++)
    {
        
id players[i]
        
        switch (
random(2))
        {
            case 
0client_cmd(id"mp3 play sound/Premium_plague/count/start1.mp3")
            case 
1client_cmd(id"mp3 play sound/Premium_plague/count/start2.mp3")
            case 
2client_cmd(id"mp3 play sound/Premium_plague/count/start3.mp3")
        }
    }

    
g_roundhud g_winh g_winz 1
    count 
10
}

public 
start_countdown()
{
    
remove_task(1499)
    
remove_task(1500)
    
set_task(1.0,"countdown",1500)
}

public 
countdown()
{
    if(
count == 0
    {
        
set_dhudmessage(0150255, -1.00.22,  01.01.0,1.0,1.0)
        
show_dhudmessage(0,"<<•>> Infection Has begiN <<•>>")
    }
    if(
count 0
    {
        
set_dhudmessage(random_num(1255), random_num(1255), random_num(1255), -1.00.22,  00.50.5,0.5,0.5)
        if(
count 11client_cmd(0,"spk  Premium_plague/count/%d"count
        
show_dhudmessage(0,"/---------------------\^n • Infection in: %d •^n\---------------------/",count)
    }
    
count count 1
    
if(count >= 0set_task(1.0,"countdown",1500)
}

public 
showhud()
{
    new 
red green blue
    
    
if(zp_is_nemesis_round())
    {
     
red 0
    green 
150
    blue 
255
    
}else if(zp_is_survivor_round())
    {
    
red 0
    green 
150
    blue 
255
    
}else if(!zp_has_round_started())
    {
    
red 0
    green 
150
    blue 
255
    
}else{
    
red 0
    green 
150
    blue 
255
    
}

    
set_dhudmessage(redgreenblue, -1.00.000.00.01)
    
show_dhudmessage(0"• |** [ZM]-Premuim-Plague Zombies **| •^n• |Zombies: %d [%d]|-|[%d] %d :Humans| •^n• | Round: %d | •" ,fn_get_zombies(), g_winzg_winhfn_get_humans() ,g_roundhud)  
}

public 
zp_round_ended(winteam)
{
    if(
winteam == WIN_ZOMBIES)
    {
        
g_winz += 
    
}else{
        
g_winh += 1
    
}    
}


fn_get_humans()
{
    static 
iAliveid
    iAlive 
0
    
    
for (id 1id <= 32id++)
    {
        if (
is_user_alive(id) && !zp_get_user_zombie(id))
            
iAlive++
    }
    
    return 
iAlive;
}

fn_get_zombies()
{
    static 
iAliveid
    iAlive 
0
    
    
for (id 1id <= 32id++)
    {
        if (
is_user_alive(id) && zp_get_user_zombie(id))
            
iAlive++
    }
    
    return 
iAlive;

__________________
bigdaddy424 is offline
 



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 00:33.


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