HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <engine>
  4.  
  5. new semiclip = 1
  6.  
  7. public plugin_init() {
  8. register_plugin("Semiclip", "1.0", "Crusher918")
  9. register_concmd("amx_semiclip","cmd_semiclip",ADMIN_LEVEL_A,"<1|0>")
  10. register_clcmd("fullupdate", "clcmd_fullupdate")
  11. register_event("ResetHUD", "ResetHUD", "b")
  12. register_event("HLTV", "new_round", "a", "1=0", "2=0")
  13. }
  14.  
  15. public clcmd_fullupdate() {
  16. return PLUGIN_HANDLED_MAIN
  17. }
  18.  
  19. public cmd_semiclip(id,level,cid) {
  20. if(!cmd_access(id,level,cid,2))
  21. return PLUGIN_HANDLED
  22.  
  23. new name[32]
  24. new arg1[32]
  25. read_argv(1,arg1,31)
  26. new cvarnum = str_to_num(arg1)
  27. semiclip = cvarnum
  28. get_user_name(id,name,31)
  29.  
  30. new players[32], pnum
  31. get_players(players,pnum,"a")
  32.  
  33. if(semiclip) {
  34. for(new i=0;i<pnum;++i) {
  35. entity_set_int(i, EV_INT_solid, SOLID_TRIGGER)
  36. }
  37. client_print(0,print_chat,"[AMXX] ADMIN %s: bekapcsolta a blokkmentesitot",name)
  38. }
  39. else if(!semiclip) {
  40. for(new i=0;i<pnum;++i) {
  41. entity_set_int(i, EV_INT_solid, SOLID_BBOX)
  42. }
  43. client_print(0,print_chat,"[AMXX] ADMIN %s: kikapcsolta a blokkmentesitot",name)
  44. }
  45. return PLUGIN_HANDLED
  46. }
  47.  
  48. public ResetHUD(id) {
  49. if(semiclip)
  50. entity_set_int(id, EV_INT_solid, SOLID_TRIGGER)
  51. else if(!semiclip)
  52. entity_set_int(id, EV_INT_solid, SOLID_BBOX)
  53. }
  54.  
  55. public new_round() {
  56. new players[32], pnum
  57. get_players(players,pnum,"a")
  58.  
  59. if(semiclip) {
  60. for(new i=0;i<pnum;++i) {
  61. entity_set_int(i, EV_INT_solid, SOLID_TRIGGER)
  62. }
  63. }
  64. else if(!semiclip) {
  65. for(new i=0;i<pnum;++i) {
  66. entity_set_int(i, EV_INT_solid, SOLID_BBOX)
  67. }
  68. }
  69. return PLUGIN_HANDLED
  70. }
  71.