hlmod.hu
https://hlmod.hu/

Adminnak Bunny
https://hlmod.hu/viewtopic.php?f=29&t=7701
Oldal: 1 / 1

Szerző:  Lacer.cfg [ 2013.03.13. 19:15 ]
Hozzászólás témája:  Adminnak Bunny

Sziasztok

Nekem egy olyan plugin kellene ,hogy csak admin tud bunnyhoppolni...Címről is értetődik...
Előre is köszönöm...

Szerző:  JoGoBeLLa [ 2013.03.13. 19:20 ]
Hozzászólás témája:  Re: Adminnak Bunny

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <engine>
  3.  
  4. #define FL_WATERJUMP (1<<11) // player jumping out of water
  5. #define FL_ONGROUND (1<<9) // At rest / on the ground
  6. #define ACCESS_LEVEL ADMIN_LEVEL_B
  7. #define ADMIN_LISTEN ADMIN_BAN
  8.  
  9. public plugin_init() {
  10. register_plugin("Super Bunny Hopper", "1.2", "Cheesy Peteza")
  11. register_cvar("sbhopper_version", "1.2", FCVAR_SERVER)
  12.  
  13. register_cvar("bh_enabled", "1")
  14. register_cvar("bh_autojump", "1")
  15. register_cvar("bh_showusage", "1")
  16. }
  17.  
  18. public client_PreThink(id) {
  19. if (!get_cvar_num("bh_enabled"))
  20. return PLUGIN_CONTINUE
  21.  
  22. entity_set_float(id, EV_FL_fuser2, 0.0) // Disable slow down after jumping
  23.  
  24. if (!get_cvar_num("bh_autojump"))
  25. return PLUGIN_CONTINUE
  26.  
  27. // Code from CBasePlayer::Jump (player.cpp) Make a player jump automatically
  28. if (entity_get_int(id, EV_INT_button) & 2) { // If holding jump
  29. new flags = entity_get_int(id, EV_INT_flags)
  30.  
  31. if (flags & FL_WATERJUMP)
  32. return PLUGIN_CONTINUE
  33. if ( entity_get_int(id, EV_INT_waterlevel) >= 2 )
  34. return PLUGIN_CONTINUE
  35. if ( !(flags & FL_ONGROUND) )
  36. return PLUGIN_CONTINUE
  37.  
  38. new Float:velocity[3]
  39. entity_get_vector(id, EV_VEC_velocity, velocity)
  40. velocity[2] += 250.0
  41. entity_set_vector(id, EV_VEC_velocity, velocity)
  42.  
  43. entity_set_int(id, EV_INT_gaitsequence, 6) // Play the Jump Animation
  44. }
  45. return PLUGIN_CONTINUE
  46. }
  47.  
  48. public client_authorized(id)
  49. set_task(30.0, "showUsage", id)
  50.  
  51. public showUsage(id) {
  52. if ( !get_cvar_num("bh_enabled") || !get_cvar_num("bh_showusage") )
  53. return PLUGIN_HANDLED
  54.  
  55. if ( !get_cvar_num("bh_autojump") ) {
  56. client_print(id, print_chat, "[AMXX] A nyulugras be van kapcsolva a szerveren. Ugras utan nem lassulsz le.")
  57. } else {
  58. client_print(id, print_chat, "[AMXX] Automatikus nyulugras be van kapcsolva a szerveren.Az ugras lenyomva tartasaval tudod hasznalni.")
  59. }
  60. return PLUGIN_HANDLED
  61. }

Szerző:  Lacer.cfg [ 2013.03.13. 19:54 ]
Hozzászólás témája:  Re: Adminnak Bunny

JoGoBeLLa írta:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <engine>
  3.  
  4. #define FL_WATERJUMP (1<<11) // player jumping out of water
  5. #define FL_ONGROUND (1<<9) // At rest / on the ground
  6. #define ACCESS_LEVEL ADMIN_LEVEL_B
  7. #define ADMIN_LISTEN ADMIN_BAN
  8.  
  9. public plugin_init() {
  10. register_plugin("Super Bunny Hopper", "1.2", "Cheesy Peteza")
  11. register_cvar("sbhopper_version", "1.2", FCVAR_SERVER)
  12.  
  13. register_cvar("bh_enabled", "1")
  14. register_cvar("bh_autojump", "1")
  15. register_cvar("bh_showusage", "1")
  16. }
  17.  
  18. public client_PreThink(id) {
  19. if (!get_cvar_num("bh_enabled"))
  20. return PLUGIN_CONTINUE
  21.  
  22. entity_set_float(id, EV_FL_fuser2, 0.0) // Disable slow down after jumping
  23.  
  24. if (!get_cvar_num("bh_autojump"))
  25. return PLUGIN_CONTINUE
  26.  
  27. // Code from CBasePlayer::Jump (player.cpp) Make a player jump automatically
  28. if (entity_get_int(id, EV_INT_button) & 2) { // If holding jump
  29. new flags = entity_get_int(id, EV_INT_flags)
  30.  
  31. if (flags & FL_WATERJUMP)
  32. return PLUGIN_CONTINUE
  33. if ( entity_get_int(id, EV_INT_waterlevel) >= 2 )
  34. return PLUGIN_CONTINUE
  35. if ( !(flags & FL_ONGROUND) )
  36. return PLUGIN_CONTINUE
  37.  
  38. new Float:velocity[3]
  39. entity_get_vector(id, EV_VEC_velocity, velocity)
  40. velocity[2] += 250.0
  41. entity_set_vector(id, EV_VEC_velocity, velocity)
  42.  
  43. entity_set_int(id, EV_INT_gaitsequence, 6) // Play the Jump Animation
  44. }
  45. return PLUGIN_CONTINUE
  46. }
  47.  
  48. public client_authorized(id)
  49. set_task(30.0, "showUsage", id)
  50.  
  51. public showUsage(id) {
  52. if ( !get_cvar_num("bh_enabled") || !get_cvar_num("bh_showusage") )
  53. return PLUGIN_HANDLED
  54.  
  55. if ( !get_cvar_num("bh_autojump") ) {
  56. client_print(id, print_chat, "[AMXX] A nyulugras be van kapcsolva a szerveren. Ugras utan nem lassulsz le.")
  57. } else {
  58. client_print(id, print_chat, "[AMXX] Automatikus nyulugras be van kapcsolva a szerveren.Az ugras lenyomva tartasaval tudod hasznalni.")
  59. }
  60. return PLUGIN_HANDLED
  61. }


sajna nemcsak adminok használhatják hanem mindenki...

Szerző:  pocok5 [ 2013.03.13. 20:01 ]
Hozzászólás témája:  Re: Adminnak Bunny

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <engine>
  3.  
  4. #define FL_WATERJUMP (1<<11)
  5. #define FL_ONGROUND (1<<9)
  6.  
  7. public plugin_init() {
  8. register_plugin("Admin Bhop", "1.0", "Nero")
  9. register_cvar("bhop_enabled", "1")
  10. register_cvar("bhop_onlyadmin", "1")
  11. register_cvar("bhop_autojump", "1")
  12. }
  13.  
  14. public client_PreThink(id) {
  15. if ((get_cvar_num("bhop_onlyadmin") == 0)||(get_user_flags(id)&ADMIN_LEVEL_B)) {
  16. if (!get_cvar_num("bhop_enabled"))
  17. return PLUGIN_CONTINUE
  18.  
  19. entity_set_float(id, EV_FL_fuser2, 0.0)
  20.  
  21. if (!get_cvar_num("bhop_autojump"))
  22. return PLUGIN_CONTINUE
  23.  
  24. if (entity_get_int(id, EV_INT_button) & 2) {
  25. new flags = entity_get_int(id, EV_INT_flags)
  26.  
  27. if (flags & FL_WATERJUMP)
  28. return PLUGIN_CONTINUE
  29. if ( entity_get_int(id, EV_INT_waterlevel) >= 2 )
  30. return PLUGIN_CONTINUE
  31. if ( !(flags & FL_ONGROUND) )
  32. return PLUGIN_CONTINUE
  33.  
  34. new Float:velocity[3]
  35. entity_get_vector(id, EV_VEC_velocity, velocity)
  36. velocity[2] += 250.0
  37. entity_set_vector(id, EV_VEC_velocity, velocity)
  38.  
  39. entity_set_int(id, EV_INT_gaitsequence, 6)
  40. }
  41. return PLUGIN_CONTINUE
  42. }
  43. }
  44.  


probald ezt

Szerző:  crazy` [ 2013.03.13. 20:02 ]
Hozzászólás témája:  Re: Adminnak Bunny

sokkal egyszerűbb, teszteld, ha már megírtam posztolom:
SMA Forráskód: [ Mindet kijelol ]
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <engine>
  5. #include <hamsandwich>
  6.  
  7. #define PLUGIN "AdminoknakBunny"
  8. #define VERSION "1.0"
  9. #define AUTHOR "crazy"
  10.  
  11. new elo[33]
  12. new admin[33]
  13.  
  14. public plugin_init()
  15. {
  16. register_plugin(PLUGIN, VERSION, AUTHOR)
  17.  
  18. RegisterHam(Ham_Player_Jump, "player", "ugralas")
  19.  
  20. register_event("Health", "ellenoriz", "b")
  21. register_event("ResetHUD", "ellenoriz", "b")
  22. }
  23.  
  24. public client_putinserver(id)
  25. {
  26. elo[id] = false
  27. admin[id] = get_user_flags(id) & ADMIN_KICK
  28. }
  29.  
  30. public ellenoriz(id)
  31. {
  32. elo[id] = is_user_alive(id)
  33. }
  34.  
  35. public ugralas(id)
  36. {
  37. if( elo[id] && admin[id] )
  38. {
  39. static iOldButtons ; iOldButtons = entity_get_int(id, EV_INT_oldbuttons)
  40. if( iOldButtons & IN_JUMP )
  41. {
  42. entity_set_int(id, EV_INT_oldbuttons, iOldButtons & ~IN_JUMP)
  43. return HAM_HANDLED
  44. }
  45. }
  46. return HAM_IGNORED
  47. }

Szerző:  Lacer.cfg [ 2013.03.13. 20:28 ]
Hozzászólás témája:  Re: Adminnak Bunny

crazy` írta:
sokkal egyszerűbb, teszteld, ha már megírtam posztolom:
SMA Forráskód: [ Mindet kijelol ]
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <engine>
  5. #include <hamsandwich>
  6.  
  7. #define PLUGIN "AdminoknakBunny"
  8. #define VERSION "1.0"
  9. #define AUTHOR "crazy"
  10.  
  11. new elo[33]
  12. new admin[33]
  13.  
  14. public plugin_init()
  15. {
  16. register_plugin(PLUGIN, VERSION, AUTHOR)
  17.  
  18. RegisterHam(Ham_Player_Jump, "player", "ugralas")
  19.  
  20. register_event("Health", "ellenoriz", "b")
  21. register_event("ResetHUD", "ellenoriz", "b")
  22. }
  23.  
  24. public client_putinserver(id)
  25. {
  26. elo[id] = false
  27. admin[id] = get_user_flags(id) & ADMIN_KICK
  28. }
  29.  
  30. public ellenoriz(id)
  31. {
  32. elo[id] = is_user_alive(id)
  33. }
  34.  
  35. public ugralas(id)
  36. {
  37. if( elo[id] && admin[id] )
  38. {
  39. static iOldButtons ; iOldButtons = entity_get_int(id, EV_INT_oldbuttons)
  40. if( iOldButtons & IN_JUMP )
  41. {
  42. entity_set_int(id, EV_INT_oldbuttons, iOldButtons & ~IN_JUMP)
  43. return HAM_HANDLED
  44. }
  45. }
  46. return HAM_IGNORED
  47. }


Nem működik sajnos nemtud bhoppolni se admin se player :/

Szerző:  pocok5 [ 2013.03.13. 20:43 ]
Hozzászólás témája:  Re: Adminnak Bunny

es az enyém??

Szerző:  Puma [ 2013.03.14. 13:13 ]
Hozzászólás témája:  Re: Adminnak Bunny

pocok5 írta:
es az enyém??


Forras mentese sikeres. (ID: 5141bec9905a6)

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

5141bec9905a6.sma(1) : error 010: invalid function or declaration
/var/www/dave/amxxcompiler/include/engine.inc(16) : error 017: undefined symbol "AMXX_VERSION_NUM"
5141bec9905a6.sma(43) : warning 209: function "client_PreThink" should return a value

2 Errors.
Could not locate output file 5141bec9905a6.amx (compile failed).

Hiba! - Az atalakitas sikertelen. (Forras fajlok torolve.)

Szerző:  Pele [ 2013.03.15. 15:26 ]
Hozzászólás témája:  Re: Adminnak Bunny

Kick jogra.
SMA Forráskód: [ Mindet kijelol ]
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <engine>
  5.  
  6. #define PLUGIN "New Plug-In"
  7. #define VERSION "1.0"
  8. #define AUTHOR "Peter"
  9.  
  10.  
  11. public plugin_init() {
  12. register_plugin(PLUGIN, VERSION, AUTHOR)
  13.  
  14. #define FL_ONGROUND (1<<9)
  15. #define FL_WATERJUMP (1<<11)
  16.  
  17. new bool:g_Vip[33];
  18.  
  19. public plugin_init(){
  20. register_plugin("VIP Ultimate", "12.0.0.2", "benio101 & speedkill");
  21. }
  22. public client_authorized(id){
  23. if(get_user_flags(id) & 4 == 4){
  24. client_authorized_vip(id);
  25. }
  26. }
  27. public client_authorized_vip(id){
  28. g_Vip[id]=true;
  29. }
  30. public client_disconnect(id){
  31. if(g_Vip[id]){
  32. client_disconnect_vip(id);
  33. }
  34. }
  35. public client_disconnect_vip(id){
  36. g_Vip[id]=false;
  37. }
  38. public client_PreThink(id){
  39. if(g_Vip[id] && is_user_alive(id)){
  40. client_PreThinkVip(id);
  41. }
  42. }
  43. public client_PreThinkVip(id){
  44. entity_set_float(id, EV_FL_fuser2, 0.0);
  45.  
  46. if(entity_get_int(id, EV_INT_button) & 2){
  47. new flags = entity_get_int(id, EV_INT_flags);
  48.  
  49. if(flags & FL_WATERJUMP || entity_get_int(id, EV_INT_waterlevel) >= 2 || !(flags & FL_ONGROUND)){
  50. return PLUGIN_CONTINUE;
  51. }
  52. new Float:velocity[3];
  53. entity_get_vector(id, EV_VEC_velocity, velocity);
  54.  
  55. velocity[2] += 250.0;
  56. entity_set_vector(id, EV_VEC_velocity, velocity);
  57.  
  58. entity_set_int(id, EV_INT_gaitsequence, 6);
  59. }
  60. return PLUGIN_CONTINUE;
  61. }
  62. }
  63.  
  64.  

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