hlmod.hu
https://hlmod.hu/

VIP SZERKESZTÉS!
https://hlmod.hu/viewtopic.php?f=29&t=19464
Oldal: 1 / 1

Szerző:  Danesz [2015.02.13. 17:52 ]
Hozzászólás témája:  VIP SZERKESZTÉS!

Sziasztok
ebbe valaki beleirná,hogy a vip tudjon zölden irni,és hogy "i" jogra legyen kötve? előre is köszi
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <cstrike>
  4. #include <engine>
  5. #include <fun>
  6. #include <hamsandwich>
  7.  
  8. #define PLUGIN "VIP"
  9. #define VERSION "1.0"
  10. #define AUTHOR "Demon"
  11.  
  12. #define JOG ADMIN_LEVEL_H
  13. #define MAX_HP 130
  14. #define HS 25
  15. #define KILL 15
  16.  
  17. new bool:dojump[33] = false
  18. new jumpnum[33] = 0
  19.  
  20. public plugin_init() {
  21. register_plugin(PLUGIN, VERSION, AUTHOR)
  22.  
  23. RegisterHam(Ham_Spawn, "player", "HSpawn", 1);
  24. register_event("ResetHUD", "resetModel", "b")
  25. }
  26.  
  27. public plugin_precache() {
  28. precache_model("models/player/vip_ct/vip_ct.mdl")
  29. precache_model("models/player/vip_te/vip_te.mdl")
  30.  
  31. return PLUGIN_CONTINUE
  32. }
  33.  
  34. public resetModel(id, level, cid) {
  35. if (get_user_flags(id) & JOG) {
  36. new CsTeams:userTeam = cs_get_user_team(id)
  37. if (userTeam == CS_TEAM_T) {
  38. cs_set_user_model(id, "vip_te")
  39. }
  40. else if(userTeam == CS_TEAM_CT) {
  41. cs_set_user_model(id, "vip_ct")
  42. }
  43. else {
  44. cs_reset_user_model(id)
  45. }
  46. }
  47.  
  48. return PLUGIN_CONTINUE
  49. }
  50.  
  51. public client_death(killer, victim, wpnid, hitplace, TK)
  52. {
  53. if(!TK && (get_user_flags(killer) & JOG))
  54. {
  55. if(hitplace != HIT_HEAD)
  56. {
  57. if(get_user_health(killer)<=MAX_HP-HS)
  58. set_user_health(killer, get_user_health(killer) +HS);
  59. }
  60. else
  61. {
  62. if(get_user_health(killer)<=MAX_HP-KILL)
  63. set_user_health(killer, get_user_health(killer) +KILL);
  64. }
  65. }
  66. }
  67.  
  68. public HSpawn(id){
  69. if(get_user_flags(id) & JOG)
  70. set_user_health(id, MAX_HP);
  71. }
  72.  
  73. public client_putinserver(id)
  74. {
  75. jumpnum[id] = 0
  76. dojump[id] = false
  77. }
  78.  
  79. public client_disconnect(id)
  80. {
  81. jumpnum[id] = 0
  82. dojump[id] = false
  83. }
  84.  
  85. public client_PreThink(id)
  86. {
  87. if(!is_user_alive(id)) return PLUGIN_CONTINUE
  88. if(!(get_user_flags(id) & JOG)) return PLUGIN_CONTINUE
  89. new nbut = get_user_button(id)
  90. new obut = get_user_oldbutton(id)
  91. if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
  92. {
  93. if(jumpnum[id] < 2)
  94. {
  95. dojump[id] = true
  96. jumpnum[id]++
  97. return PLUGIN_CONTINUE
  98. }
  99. }
  100. if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
  101. {
  102. jumpnum[id] = 0
  103. return PLUGIN_CONTINUE
  104. }
  105. return PLUGIN_CONTINUE
  106. }
  107.  
  108. public client_PostThink(id)
  109. {
  110. if(!is_user_alive(id)) return PLUGIN_CONTINUE
  111. if(dojump[id] == true)
  112. {
  113. new Float:velocity[3]
  114. entity_get_vector(id,EV_VEC_velocity,velocity)
  115. velocity[2] = random_float(265.0,285.0)
  116. entity_set_vector(id,EV_VEC_velocity,velocity)
  117. dojump[id] = false
  118. return PLUGIN_CONTINUE
  119. }
  120. return PLUGIN_CONTINUE
  121. }

Szerző:  levo00 [2015.02.13. 17:57 ]
Hozzászólás témája:  Re: VIP SZERKESZTÉS!

Akkor boccs.

Szerző:  Danesz [2015.02.13. 18:05 ]
Hozzászólás témája:  Re: VIP SZERKESZTÉS!

"i" -jogra van kötve? :xicon_e_biggrin:

Szerző:  V!rusHD [2015.02.13. 18:06 ]
Hozzászólás témája:  Re: VIP SZERKESZTÉS!

Nem nincs és a zöld írás sem lesz jó.

Szerző:  alfaanero [2015.02.13. 18:07 ]
Hozzászólás témája:  Re: VIP SZERKESZTÉS!

Sztem eléggé látható a pluginban, hogy "h" jogra van

Szerző:  V!rusHD [2015.02.13. 18:10 ]
Hozzászólás témája:  Re: VIP SZERKESZTÉS!

Az nem h jog, hanem t

Szerző:  FloxaY [2015.02.13. 18:11 ]
Hozzászólás témája:  Re: VIP SZERKESZTÉS!

alfaanero írta:
Sztem eléggé látható a pluginban, hogy "h" jogra van

t jog :3
ADMIN_CHAT ezt írd bele

Szerző:  Danesz [2015.02.13. 18:42 ]
Hozzászólás témája:  Re: VIP SZERKESZTÉS!

Valaki akkor elküldené rendesen pls?:D nem igazán értek ezekhez:D

Szerző:  V!rusHD [2015.02.13. 19:00 ]
Hozzászólás témája:  Re: VIP SZERKESZTÉS!

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <cstrike>
  4. #include <engine>
  5. #include <fun>
  6. #include <hamsandwich>
  7.  
  8. #define PLUGIN "VIP"
  9. #define VERSION "1.0"
  10. #define AUTHOR "Demon"
  11.  
  12. #define JOG ADMIN_CHAT
  13. #define MAX_HP 130
  14. #define HS 25
  15. #define KILL 15
  16.  
  17. new bool:dojump[33] = false
  18. new jumpnum[33] = 0
  19.  
  20. public plugin_init() {
  21. register_plugin(PLUGIN, VERSION, AUTHOR)
  22.  
  23. RegisterHam(Ham_Spawn, "player", "HSpawn", 1);
  24. register_event("ResetHUD", "resetModel", "b")
  25. }
  26.  
  27. public plugin_precache() {
  28. precache_model("models/player/vip_ct/vip_ct.mdl")
  29. precache_model("models/player/vip_te/vip_te.mdl")
  30.  
  31. return PLUGIN_CONTINUE
  32. }
  33.  
  34. public resetModel(id, level, cid) {
  35. if (get_user_flags(id) & JOG) {
  36. new CsTeams:userTeam = cs_get_user_team(id)
  37. if (userTeam == CS_TEAM_T) {
  38. cs_set_user_model(id, "vip_te")
  39. }
  40. else if(userTeam == CS_TEAM_CT) {
  41. cs_set_user_model(id, "vip_ct")
  42. }
  43. else {
  44. cs_reset_user_model(id)
  45. }
  46. }
  47.  
  48. return PLUGIN_CONTINUE
  49. }
  50.  
  51. public client_death(killer, victim, wpnid, hitplace, TK)
  52. {
  53. if(!TK && (get_user_flags(killer) & JOG))
  54. {
  55. if(hitplace != HIT_HEAD)
  56. {
  57. if(get_user_health(killer)<=MAX_HP-HS)
  58. set_user_health(killer, get_user_health(killer) +HS);
  59. }
  60. else
  61. {
  62. if(get_user_health(killer)<=MAX_HP-KILL)
  63. set_user_health(killer, get_user_health(killer) +KILL);
  64. }
  65. }
  66. }
  67.  
  68. public HSpawn(id){
  69. if(get_user_flags(id) & JOG)
  70. set_user_health(id, MAX_HP);
  71. }
  72.  
  73. public client_putinserver(id)
  74. {
  75. jumpnum[id] = 0
  76. dojump[id] = false
  77. }
  78.  
  79. public client_disconnect(id)
  80. {
  81. jumpnum[id] = 0
  82. dojump[id] = false
  83. }
  84.  
  85. public client_PreThink(id)
  86. {
  87. if(!is_user_alive(id)) return PLUGIN_CONTINUE
  88. if(!(get_user_flags(id) & JOG)) return PLUGIN_CONTINUE
  89. new nbut = get_user_button(id)
  90. new obut = get_user_oldbutton(id)
  91. if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
  92. {
  93. if(jumpnum[id] < 2)
  94. {
  95. dojump[id] = true
  96. jumpnum[id]++
  97. return PLUGIN_CONTINUE
  98. }
  99. }
  100. if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
  101. {
  102. jumpnum[id] = 0
  103. return PLUGIN_CONTINUE
  104. }
  105. return PLUGIN_CONTINUE
  106. }
  107.  
  108. public client_PostThink(id)
  109. {
  110. if(!is_user_alive(id)) return PLUGIN_CONTINUE
  111. if(dojump[id] == true)
  112. {
  113. new Float:velocity[3]
  114. entity_get_vector(id,EV_VEC_velocity,velocity)
  115. velocity[2] = random_float(265.0,285.0)
  116. entity_set_vector(id,EV_VEC_velocity,velocity)
  117. dojump[id] = false
  118. return PLUGIN_CONTINUE
  119. }
  120. return PLUGIN_CONTINUE
  121. }

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