Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // =======================================================
- // Player Max Speed
- // by DarkMind
- // Original Code by {HOJ} Batman
- // =======================================================
- new const PLUGIN[] = "amx_speed"
- new const VERSION[] = "0.4"
- new const AUTHOR[] = "DarkMind"
- new gCurrentWeapon[33]
- new wtf[33]
- #include <amxmod>
- #include <amxmisc>
- // =======================================================
- // Plugin Information
- // =======================================================
- public plugin_init() {
- register_plugin(PLUGIN,VERSION,AUTHOR)
- register_cvar(PLUGIN,VERSION,FCVAR_SERVER|FCVAR_SPONLY)
- register_cvar("amx_speed","325.0")
- register_event("CurWeapon","weapon_switch","be","1=1")
- register_logevent("round_start",2,"0=World triggered","1=Round_Start")
- return PLUGIN_CONTINUE
- }
- // =======================================================
- // 'Weapon Switch'
- // =======================================================
- public weapon_switch(id) {
- new Float:maxSpeed = get_cvar_float("amx_speed")
- new weaponid = read_data(2)
- if(gCurrentWeapon[id] != weaponid) {
- gCurrentWeapon[id] = weaponid
- set_user_maxspeed(id,maxSpeed)
- }
- }
- // =======================================================
- // 'Round Start'
- // =======================================================
- public round_start(id) {
- new Float:maxSpeed = get_cvar_float("amx_speed")
- new maxplayers = get_maxplayers()+1
- for (new a=1; a<maxplayers; a++){
- if(wtf[a] == 1){
- set_user_rendering(a,kRenderFxNone,255,255,255,kRenderNormal,16)
- wtf[a] = 0
- }
- set_user_maxspeed(id,maxSpeed)
- }
- return PLUGIN_CONTINUE
- }
- Note!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement