Advertisement
Guest User

Untitled

a guest
Jan 30th, 2015
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. // =======================================================
  2. // Player Max Speed
  3. // by DarkMind
  4. // Original Code by {HOJ} Batman
  5. // =======================================================
  6.  
  7. new const PLUGIN[] = "amx_speed"
  8. new const VERSION[] = "0.4"
  9. new const AUTHOR[] = "DarkMind"
  10. new gCurrentWeapon[33]
  11. new wtf[33]
  12.  
  13. #include <amxmod>
  14. #include <amxmisc>
  15.  
  16. // =======================================================
  17. // Plugin Information
  18. // =======================================================
  19.  
  20. public plugin_init() {
  21. register_plugin(PLUGIN,VERSION,AUTHOR)
  22. register_cvar(PLUGIN,VERSION,FCVAR_SERVER|FCVAR_SPONLY)
  23. register_cvar("amx_speed","325.0")
  24. register_event("CurWeapon","weapon_switch","be","1=1")
  25. register_logevent("round_start",2,"0=World triggered","1=Round_Start")
  26. return PLUGIN_CONTINUE
  27. }
  28.  
  29. // =======================================================
  30. // 'Weapon Switch'
  31. // =======================================================
  32.  
  33. public weapon_switch(id) {
  34. new Float:maxSpeed = get_cvar_float("amx_speed")
  35. new weaponid = read_data(2)
  36. if(gCurrentWeapon[id] != weaponid) {
  37. gCurrentWeapon[id] = weaponid
  38. set_user_maxspeed(id,maxSpeed)
  39. }
  40. }
  41.  
  42. // =======================================================
  43. // 'Round Start'
  44. // =======================================================
  45.  
  46. public round_start(id) {
  47. new Float:maxSpeed = get_cvar_float("amx_speed")
  48. new maxplayers = get_maxplayers()+1
  49. for (new a=1; a<maxplayers; a++){
  50. if(wtf[a] == 1){
  51. set_user_rendering(a,kRenderFxNone,255,255,255,kRenderNormal,16)
  52. wtf[a] = 0
  53. }
  54. set_user_maxspeed(id,maxSpeed)
  55. }
  56. return PLUGIN_CONTINUE
  57. }
  58. Note!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement