Raised This Month: $ Target: $400
 0% 

pev_button, i dont understand very well...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
_lol_
Senior Member
Join Date: Apr 2009
Old 04-13-2009 , 12:50   Re: pev_button, i dont understand very well...
Reply With Quote #1

so...whats bad now...the debug client_print IS working, but there is no model, ducking or not doing it...


Code:
public client_PreThink(id) 
{
    if (!is_user_alive(id))
        return;
        
    if(zp_get_user_zombie(id) && zp_get_user_zombie_class(id) == g_invisible)
    {
        // Get currently pressed buttons
        static buttons
        buttons = pev(id, pev_button)
        
        
        if(!(buttons & IN_DUCK))
        {
            client_print(id, print_chat, "[DEBUG] unducking.");
            set_pev(id, pev_viewmodel, zclass_clawmodel)
        }
        if(buttons & IN_DUCK)
        {
            client_print(id, print_chat, "[DEBUG] ducking");
            set_pev(id, pev_viewmodel, 0)
        }
        
    }
}
EDIT:this is the constant...
Code:
new const zclass_clawmodel[] = { "v_knife_zombie.mdl" } // claw model

Last edited by _lol_; 04-13-2009 at 15:21. Reason: forgot to show the constant
_lol_ 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 02:20.


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