|
Author
|
Message
|
|
Junior Member
|

12-05-2007
, 15:19
code to .amxx
|
#1
|
hi i got this code for slash only but how do i make it an .amxx file?
Quote:
#include <amxmodx>
#include <fakemeta>
#define PLUGIN "Force Attack2"
#define VERSION "1.0"
#define AUTHOR "Alka"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_forward(FM_PlayerPreThink,"Fwd_Playe rPreThink");
}
public Fwd_PlayerPreThink(id)
{
static temp, weapon;
weapon = get_user_weapon(id, temp, temp);
if(weapon == CSW_KNIFE && get_user_team(id) == 2)
{
static button;
button = pev(id, pev_button);
if(button & IN_ATTACK)
{
button = (button & ~IN_ATTACK ) | IN_ATTACK2;
set_pev(id, pev_button, button);
}
}
}
|
-Mazi
|
|
|
|