|
发表于 2009-8-22 02:47:22
|
显示全部楼层
来自 中国–广东–惠州
本帖最后由 zwfgdlc 于 2009-8-22 17:24 编辑
试下这个
- #include <amxmodx>
- #include <amxmisc>
- #include <fakemeta>
- #define PLUGIN_NAME "test"
- #define PLUGIN_VERSION "1.0"
- #define PLUGIN_AUTHOR "zwfgdlc"
- new const Float: g_fMaxSpeed[] =
- {
- 0.0,
- 250.0, //p228
- 0.0, //shield
- 260.0, //scout
- 250.0, //hegrenade
- 240.0, //xm1014
- 250.0, //c4
- 250.0, //mac10
- 240.0, //aug
- 250.0, //smoke
- 250.0, //elite
- 250.0, //fiveseven
- 250.0, //ump45
- 210.0, //sg550
- 240.0, //galil
- 240.0, //famas
- 250.0, //usp
- 250.0, //glock
- 210.0, //awp
- 250.0, //mp5navy
- 220.0, //m249
- 230.0, //m3
- 230.0, //m4a1
- 250.0, //tmp
- 210.0, //g3sg1
- 250.0, //flash
- 250.0, //deagle
- 235.0, //sg552
- 221.0, //ak47
- 250.0, //knife
- 245.0 //p90
- };
- public plugin_init()
- {
- register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
- register_forward(FM_UpdateClientData,"fwd_UpdateClientData",1);
- }
- public fwd_UpdateClientData(id,weapon,cd_handle)
- {
- static Float:fMaxSpeed;
-
- if(!is_user_alive(id))
- return FMRES_IGNORED;
- get_cd(cd_handle,CD_MaxSpeed,fMaxSpeed)
-
- if((get_user_flags(id)&ADMIN_RESERVATION ) && fMaxSpeed == 1.0)
- set_pev(id,pev_maxspeed,g_fMaxSpeed[get_user_weapon(id)]);
-
- return FMRES_HANDLED
- }
复制代码 |
|