AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Bug code (https://forums.alliedmods.net/showthread.php?t=183969)

DavidJr 04-29-2012 05:10

Bug code
 
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..

GordonFreeman (RU) 04-29-2012 05:19

Re: Bug code
 
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 */     } }

DavidJr 04-29-2012 05:32

Re: Bug code
 
oh okay :D thanks.. i'll try :) but do you know how to fix the ammo?

GordonFreeman (RU) 04-29-2012 05:39

Re: Bug code
 
use pdata offset to decrease it

DavidJr 04-29-2012 05:44

Re: Bug code
 
okay, btw, the code doesn't work at all.. :/


All times are GMT -4. The time now is 21:10.

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