Raised This Month: $ Target: $400
 0% 

allow display hud/dhus messages in hideweapon event


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
faggetpls
New Member
Join Date: Oct 2013
Old 10-26-2013 , 23:15   allow display hud/dhus messages in hideweapon event
Reply With Quote #1

^title (while i remove hud it should allow display hud/dhud), also which one method is better, commented one or should i use default taken from connors plugin?

PHP Code:
#include <amxmodx> 
#include <fakemeta>
#include <hamsandwich>

#define    offset_hide_hud                361
#define    offset_client_hide_hud            362
#define    offset_client_active_item        374
#define HideWeapon                94    // get_user_msgid("HideWeapon")

new bool:enabled[33] = false

public plugin_init() { 
    
//register_plugin("HUD Customizer", "0.6", "Igoreso/ConnorMcLeod") 
    
register_clcmd("say test""x")
}

public 
client_disconnect(idenabled[id] = false

public x(id) {
    if (
enabled[id] == false) {
        
enabled[id] = true
        
// Don't know use of it
        //set_pdata_int(id, offset_client_hide_hud, 0)
        // Removes hud
        
set_pdata_int(idoffset_hide_hud4)
        
        
        
//message_begin(MSG_ONE_UNRELIABLE, HideWeapon, _, id) 
        //write_byte(4)
        //message_end()
    
}
    
    else {
        
enabled[id] = false
        
// Don't know use of it
        //set_pdata_int(id, offset_client_hide_hud, 1)
        // Shows hud
        
set_pdata_int(idoffset_hide_hud0)
        
// Removes ugly spectator crosshair
        
set_pdata_cbase(idoffset_client_active_itemFM_NULLENT)
        
        
        
        
//message_begin(MSG_ONE_UNRELIABLE, HideWeapon, _, id)
        //write_byte(0)
        //message_end()
    
}

faggetpls is offline
lein
Junior Member
Join Date: Mar 2013
Location: China
Old 10-27-2013 , 14:08   Re: allow display hud/dhus messages in hideweapon event
Reply With Quote #2

Sure,using fakemeta module is more high-efficiency!
And you can search the example.
lein 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 23:13.


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