AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   code to .amxx (https://forums.alliedmods.net/showthread.php?t=64000)

mazi 12-05-2007 15:19

code to .amxx
 
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

ConnorMcLeod 12-05-2007 15:50

Re: code to .amxx
 
paste the code there : http://www.amxmodx.org/webcompiler.cgi


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

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