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(PLUGIN, VERSION, AUTHOR)
// 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_alive( id ) )
{
new button = entity_get_int(id, EV_INT_button);
new buttonsChanged = button ^ entity_get_int(id, EV_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(id, print_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(id, print_chat, "Stand")
}
}
}
}
and sorry, I typed 1 line code wrong from the first post.
PHP Code:
if( pev(id, pev_button) & IN_DUCK )
{
client_print(id, print_chat, "Jongkok")
}
if( !(pev(id, pev_oldbuttons) & IN_DUCK) )
{
client_print(id, print_chat, "Berdiri")
}