Thread: Bug code
View Single Post
Author Message
DavidJr
Senior Member
Join Date: Apr 2012
Old 04-29-2012 , 05:10   Bug code
Reply With Quote #1

Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <engine>
#include <fakemeta_util>
#include <cstrike>
#include <hamsandwich>
#include <fun>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init()
{
    register_forward(FM_PlayerPreThink, "PlayerPreThink")
}
public client_PreThink(id)
{
    new clip, ammo, weapid = get_user_weapon(id, clip, ammo);
    new button = get_user_button(id);
    entity_set_int(id,EV_INT_button,IN_RUN);
    {
        set_animation(id, 7);
    }
}
public set_animation(id, anim) 
{
    entity_set_int(id, EV_INT_weaponanim, anim);
    message_begin(MSG_ONE, SVC_WEAPONANIM, {0,0,0}, id);
    write_byte(7);
    write_byte(entity_get_int(id, EV_INT_body));
    message_end();
}
I have make another plugin.. this is work but the animation play everytime, it doesn't decrease the ammo, can't reload again..
DavidJr is offline