hlmod.hu
https://hlmod.hu/

bhop
https://hlmod.hu/viewtopic.php?f=10&t=4774
Oldal: 1 / 1

Szerző:  majomcica [2012.06.17. 16:37 ]
Hozzászólás témája:  bhop

kene nekem egy olyan bhop ami szinesen irja az uzeneteket
ty

Szerző:  oroszrulett [2012.06.17. 16:38 ]
Hozzászólás témája:  Re: bhop

Kód:
  1. #include <amxmodx>

  2. #include <engine>

  3. #include <colorchat>

  4.  

  5. #define FL_WATERJUMP    (1<<11) // player jumping out of water

  6. #define FL_ONGROUND     (1<<9)  // At rest / on the ground

  7.  

  8. public plugin_init() {

  9.         register_plugin("Super Bunny Hopper", "1.2", "Cheesy Peteza")

  10.         register_cvar("sbhopper_version", "1.2", FCVAR_SERVER)

  11.  

  12.         register_cvar("bh_enabled", "1")

  13.         register_cvar("bh_autojump", "1")

  14.         register_cvar("bh_showusage", "1")

  15. }

  16.  

  17. public client_PreThink(id) {

  18.         if (!get_cvar_num("bh_enabled"))

  19.                 return PLUGIN_CONTINUE

  20.  

  21.         entity_set_float(id, EV_FL_fuser2, 0.0)         // Disable slow down after jumping

  22.  

  23.         if (!get_cvar_num("bh_autojump"))

  24.                 return PLUGIN_CONTINUE

  25.  

  26. // Code from CBasePlayer::Jump (player.cpp)             Make a player jump automatically

  27.         if (entity_get_int(id, EV_INT_button) & 2) {    // If holding jump

  28.                 new flags = entity_get_int(id, EV_INT_flags)

  29.  

  30.                 if (flags & FL_WATERJUMP)

  31.                         return PLUGIN_CONTINUE

  32.                 if ( entity_get_int(id, EV_INT_waterlevel) >= 2 )

  33.                         return PLUGIN_CONTINUE

  34.                 if ( !(flags & FL_ONGROUND) )

  35.                         return PLUGIN_CONTINUE

  36.  

  37.                 new Float:velocity[3]

  38.                 entity_get_vector(id, EV_VEC_velocity, velocity)

  39.                 velocity[2] += 250.0

  40.                 entity_set_vector(id, EV_VEC_velocity, velocity)

  41.  

  42.                 entity_set_int(id, EV_INT_gaitsequence, 6)      // Play the Jump Animation

  43.         }

  44.         return PLUGIN_CONTINUE

  45. }

  46.  

  47. public client_authorized(id)

  48.         set_task(30.0, "showUsage", id)

  49.  

  50. public showUsage(id) {

  51.         if ( !get_cvar_num("bh_enabled") || !get_cvar_num("bh_showusage") )

  52.                 return PLUGIN_HANDLED

  53.  

  54.         if ( !get_cvar_num("bh_autojump") ) {

  55.                 ColorChat(id, RED, "[BHOP]^x04 Bunnyhop bekapcsolva! Csak nyomd fojamatosan az ugra'st!")

  56.         } else {

  57.                 ColorChat(id, RED, "[BHOP]^x04 Bunnyhop bekapcsolva!Csak nyomd fojamatosan az ugra'st!")

  58.         }

  59.         return PLUGIN_HANDLED

  60. }

  61.  

Szerző:  majomcica [2012.06.17. 16:42 ]
Hozzászólás témája:  Re: bhop

kosz. azt meg tod csinni h a [BHOP]-oit pirosan irja?

Szerző:  oroszrulett [2012.06.17. 16:44 ]
Hozzászólás témája:  Re: bhop

Átírva. Nem láttam olyat, hogy [BHOP], de gondolom az [AMX]-re gondoltál.

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/