Raised This Month: $ Target: $400
 0% 

pev_button


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-09-2013 , 09:41   Re: pev_button
Reply With Quote #1

No, make sure you have code after my edition.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Randomize
BANNED
Join Date: May 2012
Location: in your heart
Old 06-09-2013 , 10:35   Re: pev_button
Reply With Quote #2

Something like this?
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <acg>

#define PLUGIN "Crouch"
#define VERSION "1.0"
#define AUTHOR "DavidJr"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
// Add your code here...
}
public 
plugin_precache()
{    
    
precache_generic("gfx/csf/crouch.tga")
    
precache_generic("gfx/csf/stand.tga")
}
public 
client_PreThink(id)
{
    if( 
is_user_aliveid ) )
    {
        new 
button entity_get_int(idEV_INT_button);
        new 
buttonsChanged button entity_get_int(idEV_INT_oldbuttons);

        if( 
buttonsChanged IN_DUCK )
        {
            if( 
button IN_DUCK )
            {
                
//acg_drawtga(id, "gfx/csf/crouch.tga", 255, 255, 255, 50, 0.1375, 0.065, 0, FX_NONE, 0.0, 0.0, 0.0, 0.0, 0, ALIGN_RIGHT | ALIGN_BOTTOM, 2)
                
client_print(idprint_chat"Duck")
            }
            else
            {
                
//acg_drawtga(id, "gfx/csf/stand.tga", 255, 255, 255, 50,  0.1375, 0.065, 0, FX_NONE, 0.0, 0.0, 0.0, 0.0, 0, ALIGN_RIGHT |  ALIGN_BOTTOM, 2)
                
client_print(idprint_chat"Stand")
            }
        }
    }

and sorry, I typed 1 line code wrong from the first post.
PHP Code:
if( pev(idpev_button) & IN_DUCK )
        {
            
client_print(idprint_chat"Jongkok")
            
        }
        if( !(
pev(idpev_oldbuttons) & IN_DUCK) )
        {
            
client_print(idprint_chat"Berdiri")
        } 

Last edited by Randomize; 06-09-2013 at 10:36.
Randomize 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 16:22.


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