Raised This Month: $12 Target: $400
 3% 

Bug code


Post New Thread Reply   
 
Thread Tools Display Modes
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
GordonFreeman (RU)
Veteran Member
Join Date: Jan 2010
Location: Uzbekistan
Old 04-29-2012 , 05:19   Re: Bug code
Reply With Quote #2

wtf
Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <hamsandwich> #include <fakemeta> #define PLUGIN "Test" #define VERSION "0.1" #define AUTHOR "[LF] | Dr.Freeman" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_forward(FM_PlayerPostThink,"fw_PlayerPostThink",1) } public fw_PlayerPostThink(this){     if((pev(this,pev_button)&IN_RUN)){         /* code to do when player run */     } }
__________________
The functional way is the right way
GordonFreeman (RU) is offline
DavidJr
Senior Member
Join Date: Apr 2012
Old 04-29-2012 , 05:32   Re: Bug code
Reply With Quote #3

oh okay thanks.. i'll try but do you know how to fix the ammo?

Last edited by DavidJr; 04-29-2012 at 05:32.
DavidJr is offline
GordonFreeman (RU)
Veteran Member
Join Date: Jan 2010
Location: Uzbekistan
Old 04-29-2012 , 05:39   Re: Bug code
Reply With Quote #4

use pdata offset to decrease it
__________________
The functional way is the right way
GordonFreeman (RU) is offline
DavidJr
Senior Member
Join Date: Apr 2012
Old 04-29-2012 , 05:44   Re: Bug code
Reply With Quote #5

okay, btw, the code doesn't work at all.. :/
DavidJr is offline
Reply


Thread Tools
Display Modes

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 03:07.


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