Raised This Month: $ Target: $400
 0% 

Plugin's commands and hud messages arent shown


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
AnimalMonster
Senior Member
Join Date: May 2020
Old 08-03-2020 , 05:32   Re: Plugin's commands and hud messages arent shown
Reply With Quote #5

Quote:
Originally Posted by Black Rose View Post
Look at other plugins you know of that are hooking those buttons and see how they do it.
i already did, i did it as a sma smilar to mine but made by HoRRoR

and now watching this sma
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>

#define heal_sound        "heal.wav"

new const zclass_name[] = "Heal"
new const zclass_info[] = "Zombie"
new const zclass_model[] = "heal"
new const zclass_clawmodel[] = "v_heal_knife.mdl"
const zclass_health 4500
const zclass_speed 250
const Float:zclass_gravity 0.8
const Float:zclass_knockback 0.0

new g_zclass_heal;
new 
Float:last_use[33];

public 
plugin_init()
{
    
register_plugin("[ZP] Zombie Class: Heal Zombie""0.1""WPMG Team")
    
register_clcmd("drop""use_skill")
}

public 
plugin_precache()
{
    
g_zclass_heal zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback)

    
precache_sound(heal_sound)
}

public 
zp_user_infected_post(idinfector)
{
    if(
zp_get_user_zombie_class(id) == g_zclass_heal)
    {
        
client_printcolor(id"^4[ZP] ^1Press ^4^"G^" ^1for cure all your health.")
        
last_use[id] = 0.0
    
}
}

public 
use_skill(id)
{
    if(
is_user_alive(id) && !zp_get_user_nemesis(id) && zp_get_user_zombie(id) && (zp_get_user_zombie_class(id) == g_zclass_heal))
    {
        if((
pev(idpev_health) < float(zp_get_zombie_maxhealth(id))) && (last_use[id] + 20.0 <= get_gametime()))
        {
            
last_use[id] = get_gametime();

            
set_pev(idpev_healthfloat(zp_get_zombie_maxhealth(id)))
            
emit_sound(idCHAN_ITEMheal_sound1.0ATTN_NORM0PITCH_NORM)

            
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("ScreenFade"), { 00}, id)
            
write_short(1<<10)
            
write_short(1<<12)
            
write_short(0x0000
            
write_byte(50
            
write_byte(150)    
            
write_byte(50
            
write_byte(200)
            
message_end()

            return 
PLUGIN_HANDLED;
        }
    }
    return 
PLUGIN_CONTINUE;
}

stock client_printcolor(const id, const input[], any:...)
{
    new 
iCount 1iPlayers[32]
    static 
szMsg[191]

    
vformat(szMsgcharsmax(szMsg), input3)
    
replace_all(szMsg190"/g""^4")
    
replace_all(szMsg190"/y""^1")
    
replace_all(szMsg190"/t""^3")
    
replace_all(szMsg190"/w""^0")

    if(
idiPlayers[0] = id
    
else get_players(iPlayersiCount"ch")

    for(new 
0iCounti++)
    {
        if(
is_user_connected(iPlayers[i]))
        {
            
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _iPlayers[i])
            
write_byte(iPlayers[i])
            
write_string(szMsg)
            
message_end()
        }
    }

and yeah, you're right afterall, can't hook on +drop or +reload or i think that on any +<command> since i tested and with drop works perfectly. but with + drop nope.

Edit : What About hUdMeSSaGes?

Nevermind , imma go code another things then try again code zombies..

Last edited by AnimalMonster; 08-03-2020 at 06:39.
AnimalMonster 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 13:49.


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