複製程式
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "123"
new cvar_speed
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
cvar_speed = register_cvar("CT_speed", "你想的數值")
register_forward(FM_PlayerPreThink, "fw_playerprethink")
}
public fw_playerprethink(id)
{
if (cs_get_user_team(id) == CS_TEAM_T)
return FMRES_IGNORED;
if (cs_get_user_team(id) == CS_TEAM_CT)
{
set_pev(id, pev_maxspeed, get_pcvar_float(cvar_speed))
}
return FMRES_IGNORED;
}
第一次用AMXX_Studio寫的..
試看看吧