hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.05.02. 20:52



Jelenlévő felhasználók

Jelenleg 532 felhasználó van jelen :: 1 regisztrált, 0 rejtett és 531 vendég

A legtöbb felhasználó (1565 fő) 2020.11.21. 11:26-kor tartózkodott itt.

Regisztrált felhasználók: Bing [Bot] az elmúlt 5 percben aktív felhasználók alapján

Utoljára aktív
Ahhoz hogy lásd ki volt utoljára aktív, be kell jelentkezned.



Az oldal teljeskörű
használatához regisztrálj.

Regisztráció

Kereső


Új téma nyitása  Hozzászólás a témához  [ 9 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: BHOP MENÜ & Multijump
HozzászólásElküldve: 2015.01.16. 15:55 
Offline
Senior Tag
Avatar

Csatlakozott: 2014.03.12. 18:54
Hozzászólások: 295
Megköszönt másnak: 33 alkalommal
Megköszönték neki: 26 alkalommal
Sziasztok!
Van ez a plugin :
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <engine>
  4.  
  5. #define PLUGIN "Auto Bhop menu"
  6. #define VERSION "1.0"
  7. #define AUTHOR "qKKKJ"
  8.  
  9. new g_bhop[33]
  10.  
  11. public plugin_init() {
  12. register_plugin(PLUGIN, VERSION, AUTHOR)
  13. register_clcmd("say /bhop", "ShowMenu")
  14. }
  15.  
  16. public client_connect(id)
  17. {
  18. g_bhop[id] = false
  19. }
  20. public ShowMenu(id)
  21. {
  22. new menu = menu_create("Auto bhop", "b_hand");
  23.  
  24. menu_additem(menu, "Igen", "", 0);
  25. menu_additem(menu, "Nem", "", 0);
  26.  
  27. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
  28.  
  29. menu_display(id, menu, 0);
  30.  
  31. return PLUGIN_HANDLED;
  32. }
  33.  
  34. public b_hand(id, menu, item)
  35. {
  36. if(item == MENU_EXIT)
  37. {
  38. menu_cancel(id);
  39. return PLUGIN_HANDLED;
  40. }
  41.  
  42. new command[6], name[64], access, callback;
  43.  
  44. menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);
  45.  
  46. switch(item)
  47. {
  48. case 0: g_bhop[id] = true
  49. case 1: g_bhop[id] = false
  50. }
  51.  
  52. menu_destroy(menu);
  53.  
  54. return PLUGIN_HANDLED;
  55. }
  56. public client_PreThink(id) {
  57. if(g_bhop[id] == true)
  58. {
  59.  
  60. entity_set_float(id, EV_FL_fuser2, 0.0)
  61. if (entity_get_int(id, EV_INT_button) & 2) {
  62. new flags = entity_get_int(id, EV_INT_flags)
  63.  
  64. if (flags & FL_WATERJUMP)
  65. return PLUGIN_CONTINUE
  66. if ( entity_get_int(id, EV_INT_waterlevel) >= 2 )
  67. return PLUGIN_CONTINUE
  68. if ( !(flags & FL_ONGROUND) )
  69. return PLUGIN_CONTINUE
  70.  
  71. new Float:velocity[3]
  72. entity_get_vector(id, EV_VEC_velocity, velocity)
  73. velocity[2] += 250.0
  74. entity_set_vector(id, EV_VEC_velocity, velocity)
  75.  
  76. entity_set_int(id, EV_INT_gaitsequence, 6)
  77. }
  78. }
  79. return PLUGIN_CONTINUE
  80. }

Ha igen-re nyom a játékos akkor legyen neki 4 jump ha NEM-re akkor pedig csak 2 :)

EDIT:
Úgy hozza elő a menüt hogy mindig a fegyvermenü után hogyha a játékos kiválasztotta a fegyverét,akkor jöjjön elő a bhop menü..
És ez minden körben így legyen.. :)
Természetesen megy a köszönöm gomb..

_________________
Kép

MAIN :
Kép

MÁSIK :
KépKép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: BHOP MENÜ & Multijump
HozzászólásElküldve: 2015.01.17. 14:53 
Offline
Developer
Avatar

Csatlakozott: 2011.06.01. 21:11
Hozzászólások: 7962
Megköszönt másnak: 295 alkalommal
Megköszönték neki: 535 alkalommal
Ez bhop, nem pedig multijump sma.

A másik meg ahoz kell a fegyvermenü is.

_________________
http://www.easyrankup.eu


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: BHOP MENÜ & Multijump
HozzászólásElküldve: 2015.01.17. 15:16 
Offline
Senior Tag
Avatar

Csatlakozott: 2014.03.12. 18:54
Hozzászólások: 295
Megköszönt másnak: 33 alkalommal
Megköszönték neki: 26 alkalommal
kiki írta:
Ez bhop, nem pedig multijump sma.

A másik meg ahhoz kell a fegyvermenü is.

Csatalom mindegyiket.. :))

BHOP :
SMA Forráskód: [ Mindet kijelol ]
  1. :#include <amxmodx>
  2. #include <amxmisc>
  3. #include <engine>
  4.  
  5. #define PLUGIN "Auto Bhop menu"
  6. #define VERSION "1.0"
  7. #define AUTHOR "qKKKJ"
  8.  
  9. new g_bhop[33]
  10.  
  11. public plugin_init() {
  12. register_plugin(PLUGIN, VERSION, AUTHOR)
  13. register_clcmd("say /bhop", "ShowMenu")
  14. }
  15.  
  16. public client_connect(id)
  17. {
  18. g_bhop[id] = false
  19. }
  20. public ShowMenu(id)
  21. {
  22. new menu = menu_create("Auto bhop", "b_hand");
  23.  
  24. menu_additem(menu, "Igen", "", 0);
  25. menu_additem(menu, "Nem", "", 0);
  26.  
  27. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
  28.  
  29. menu_display(id, menu, 0);
  30.  
  31. return PLUGIN_HANDLED;
  32. }
  33.  
  34. public b_hand(id, menu, item)
  35. {
  36. if(item == MENU_EXIT)
  37. {
  38. menu_cancel(id);
  39. return PLUGIN_HANDLED;
  40. }
  41.  
  42. new command[6], name[64], access, callback;
  43.  
  44. menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);
  45.  
  46. switch(item)
  47. {
  48. case 0: g_bhop[id] = true
  49. case 1: g_bhop[id] = false
  50. }
  51.  
  52. menu_destroy(menu);
  53.  
  54. return PLUGIN_HANDLED;
  55. }
  56. public client_PreThink(id) {
  57. if(g_bhop[id] == true)
  58. {
  59.  
  60. entity_set_float(id, EV_FL_fuser2, 0.0)
  61. if (entity_get_int(id, EV_INT_button) & 2) {
  62. new flags = entity_get_int(id, EV_INT_flags)
  63.  
  64. if (flags & FL_WATERJUMP)
  65. return PLUGIN_CONTINUE
  66. if ( entity_get_int(id, EV_INT_waterlevel) >= 2 )
  67. return PLUGIN_CONTINUE
  68. if ( !(flags & FL_ONGROUND) )
  69. return PLUGIN_CONTINUE
  70.  
  71. new Float:velocity[3]
  72. entity_get_vector(id, EV_VEC_velocity, velocity)
  73. velocity[2] += 250.0
  74. entity_set_vector(id, EV_VEC_velocity, velocity)
  75.  
  76. entity_set_int(id, EV_INT_gaitsequence, 6)
  77. }
  78. }
  79. return PLUGIN_CONTINUE
  80. }


Multijump :
SMA Forráskód: [ Mindet kijelol ]
  1. :
  2. #include <amxmodx>
  3. #include <amxmisc>
  4. #include <engine>
  5.  
  6. #define ADMINACCESS ADMIN_CHAT
  7.  
  8. new jumpnum[33] = 0
  9. new bool:dojump[33] = false
  10.  
  11. public plugin_init()
  12. {
  13. register_plugin("MultiJump","1.1","twistedeuphoria")
  14. register_cvar("amx_maxjumps","1")
  15. register_cvar("amx_mjadminonly","0")
  16. }
  17.  
  18. public client_putinserver(id)
  19. {
  20. jumpnum[id] = 0
  21. dojump[id] = false
  22. }
  23.  
  24. public client_disconnect(id)
  25. {
  26. jumpnum[id] = 0
  27. dojump[id] = false
  28. }
  29.  
  30. public client_PreThink(id)
  31. {
  32. if(!is_user_alive(id)) return PLUGIN_CONTINUE
  33. if(get_cvar_num("amx_mjadminonly") && (!access(id,ADMINACCESS))) return PLUGIN_CONTINUE
  34. new nbut = get_user_button(id)
  35. new obut = get_user_oldbutton(id)
  36. if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
  37. {
  38. if(jumpnum[id] < get_cvar_num("amx_maxjumps"))
  39. {
  40. dojump[id] = true
  41. jumpnum[id]++
  42. return PLUGIN_CONTINUE
  43. }
  44. }
  45. if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
  46. {
  47. jumpnum[id] = 0
  48. return PLUGIN_CONTINUE
  49. }
  50. return PLUGIN_CONTINUE
  51. }
  52.  
  53. public client_PostThink(id)
  54. {
  55. if(!is_user_alive(id)) return PLUGIN_CONTINUE
  56. if(get_cvar_num("amx_mjadminonly") && (!access(id,ADMINACCESS))) return PLUGIN_CONTINUE
  57. if(dojump[id] == true)
  58. {
  59. new Float:velocity[3]
  60. entity_get_vector(id,EV_VEC_velocity,velocity)
  61. velocity[2] = random_float(265.0,285.0)
  62. entity_set_vector(id,EV_VEC_velocity,velocity)
  63. dojump[id] = false
  64. return PLUGIN_CONTINUE
  65. }
  66. return PLUGIN_CONTINUE
  67. }


Fegyómenü:
SMA Forráskód: [ Mindet kijelol ]
  1.  
  2. #include <amxmodx>
  3. #include <amxmisc>
  4. #include <colorchat>
  5. #include <fun>
  6. #include <cstrike>
  7. #include <hamsandwich>
  8.  
  9. #define PLUGIN "Weapon Menu"
  10. #define VERSION "1.0"
  11. #define AUTHOR "Silent"
  12.  
  13. new gWPCT;
  14. new gWPTE;
  15. new bool:wpon
  16.  
  17. public plugin_init() {
  18. register_plugin(PLUGIN, VERSION, AUTHOR)
  19. /*register_clcmd("say guns", "fegyvermenu");*/
  20. RegisterHam(Ham_Spawn, "player", "fegyvermenu", 1)
  21. register_logevent("logevent_end", 2, "1=Round_End");
  22. }
  23.  
  24. public logevent_end()
  25. {
  26. gWPCT = 0;
  27. gWPTE = 0;
  28. wpon = false
  29. }
  30.  
  31.  
  32. public fegyvermenu(id)
  33. {
  34. strip_user_weapons(id)
  35. cs_set_user_money(id, 0); // Penz nullazasa
  36. new jatekos[32]
  37. new ctnum, tnum
  38. get_players(jatekos, ctnum, "e", "CT")
  39. get_players(jatekos, tnum, "e", "TERRORIST")
  40. if(ctnum >= 3 && tnum >= 3)
  41. {
  42. wpon = true
  43. }
  44. if(!user_has_weapon(id, CSW_C4))
  45. {
  46. strip_user_weapons(id);
  47. new menu = menu_create("\d[\yS\rG\d] » \rVálassz \yFegyver \yCsomagot! \d", "handler");
  48. menu_additem(menu, "[\rM4A1 \yCsomag]", "1", 0);
  49. menu_additem(menu, "[\rAK47 \yCsomag]", "2", 0);
  50. menu_additem(menu, "[\rAWP \yCsomag]\d [\rElső 5 embernek\d] \r[3v3]", "3", 0);
  51. menu_additem(menu, "[\rMachineGun \yCsomag]", "4", 0);
  52. menu_additem(menu, "[\rAUG \yCsomag]", "5", 0);
  53. menu_additem(menu, "[\rFAMAS \yCsomag]", "6", 0);
  54. menu_additem(menu, "[\rGalil \yCsomag]", "7", 0);
  55. menu_additem(menu, "[\rSMG \yCsomag]", "8", 0);
  56. menu_additem(menu, "[\rAutoshotgun \yCsomag] \d [\rXM1014\d]", "9", 0);
  57. menu_additem(menu, "[\rShotgun \yCsomag]\d [\rM3\d]", "10", 0);
  58. menu_additem(menu, "[\rScout \yCsomag]", "11", 0);
  59. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
  60. menu_display(id, menu);
  61.  
  62. }
  63. else
  64. {
  65. new menu = menu_create("\d[\yS\rG\d » \rVálassz \yFegyver \yCsomagot! \d", "handler");
  66. menu_additem(menu, "[\rM4A1 \yCsomag]", "1", 0);
  67. menu_additem(menu, "[\rAK47 \yCsomag]", "2", 0);
  68. menu_additem(menu, "[\rAWP \yCsomag]\d [\rElső 5 embernek\d] \r[3v3]", "3", 0);
  69. menu_additem(menu, "[\rMachineGun \yCsomag]", "4", 0);
  70. menu_additem(menu, "[\rAUG \yCsomag]", "5", 0);
  71. menu_additem(menu, "[\rFAMAS \yCsomag]", "6", 0);
  72. menu_additem(menu, "[\rGalil \yCsomag]", "7", 0);
  73. menu_additem(menu, "[\rSMG \yCsomag]", "8", 0);
  74. menu_additem(menu, "[\rAutoshotgun \yCsomag] \d [\rXM1014\d]", "9", 0);
  75. menu_additem(menu, "[\rShotgun \yCsomag]\d [\rM3\d]", "10", 0);
  76. menu_additem(menu, "[\rScout \yCsomag]", "11", 0);
  77. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
  78. menu_display(id, menu);
  79. }
  80. }
  81.  
  82. public handler(id, menu, item)
  83. {
  84. if( item == MENU_EXIT )
  85. {
  86. menu_destroy(menu);
  87. return PLUGIN_HANDLED;
  88. }
  89. new data[6], szName[64];
  90. new access, callback;
  91. menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
  92. new key = str_to_num(data);
  93. switch(key)
  94. {
  95.  
  96. case 1:
  97. {
  98.  
  99. give_player_grenades(id);
  100. give_item(id, "weapon_knife");
  101. give_item(id, "weapon_deagle");
  102. give_item(id, "ammo_50ae");
  103. give_item(id, "ammo_50ae");
  104. give_item(id, "ammo_50ae");
  105. give_item(id, "weapon_m4a1");
  106. give_item(id, "ammo_556nato");
  107. give_item(id, "ammo_556nato");
  108. give_item(id, "ammo_556nato");
  109. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4M4A1 Csomagot!");
  110. }
  111. case 2:
  112. {
  113.  
  114. give_player_grenades(id);
  115. give_item(id, "weapon_knife");
  116. give_item(id, "weapon_deagle");
  117. give_item(id, "ammo_50ae");
  118. give_item(id, "ammo_50ae");
  119. give_item(id, "ammo_50ae");
  120. give_item(id, "weapon_ak47");
  121. give_item(id, "ammo_762nato");
  122. give_item(id, "ammo_762nato");
  123. give_item(id, "ammo_762nato");
  124. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4AK47 Csomagot!");
  125. }
  126. case 3:
  127. {
  128. new CsTeams:userTeam = cs_get_user_team(id);
  129. if(userTeam == CS_TEAM_CT)
  130. {
  131. if(gWPCT < 5 && wpon == true)
  132. {
  133.  
  134. give_player_grenades(id);
  135. give_item(id, "weapon_knife");
  136. give_item(id, "weapon_awp");
  137. give_item(id, "weapon_deagle");
  138. give_item(id, "ammo_50ae");
  139. give_item(id, "ammo_50ae");
  140. give_item(id, "ammo_50ae");
  141. give_item(id, "ammo_338magnum");
  142. give_item(id, "ammo_338magnum");
  143. give_item(id, "ammo_338magnum");
  144. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4AWP Csomagot!");
  145. gWPCT++
  146. }
  147. else
  148. {
  149. set_hudmessage(42, 255, 212, 0.27, 0.26, 0, 6.0, 2.1)
  150. show_hudmessage(id, "3v3-tól van AWP!^nVárd meg még elegen leszünk a szerveren!^n5-en Használhatjátok a WP-ét!");
  151. fegyvermenu(id);
  152. }
  153. }
  154. if(userTeam == CS_TEAM_T)
  155. {
  156. if(gWPTE < 5 && wpon == true)
  157. {
  158.  
  159. give_player_grenades(id);
  160. give_item(id, "weapon_knife");
  161. give_item(id, "weapon_awp");
  162. give_item(id, "weapon_deagle");
  163. give_item(id, "ammo_50ae");
  164. give_item(id, "ammo_50ae");
  165. give_item(id, "ammo_50ae");
  166. give_item(id, "ammo_338magnum");
  167. give_item(id, "ammo_338magnum");
  168. give_item(id, "ammo_338magnum");
  169. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4AWP Csomagot!");
  170. gWPTE++
  171. }
  172. else
  173. {
  174. set_hudmessage(42, 255, 212, 0.27, 0.26, 0, 6.0, 2.1)
  175. show_hudmessage(id, "3v3-tól van AWP!^nVárd meg még elegen leszünk a szerveren!^n5-en Használhatjátok a WP-ét!");
  176. fegyvermenu(id);
  177. }
  178. }
  179.  
  180. }
  181. case 4:
  182. {
  183.  
  184. give_player_grenades(id);
  185. give_item(id, "weapon_knife");
  186. give_item(id, "weapon_deagle");
  187. give_item(id, "ammo_50ae");
  188. give_item(id, "ammo_50ae");
  189. give_item(id, "ammo_50ae");
  190. give_item(id, "weapon_m249");
  191. give_item(id, "ammo_556natobox");
  192. give_item(id, "ammo_556natobox");
  193. give_item(id, "ammo_556natobox");
  194. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4MacHineGun Csomagot!");
  195. }
  196. case 5:
  197. {
  198.  
  199. give_player_grenades(id);
  200. give_item(id, "weapon_knife");
  201. give_item(id, "weapon_deagle");
  202. give_item(id, "ammo_50ae");
  203. give_item(id, "ammo_50ae");
  204. give_item(id, "ammo_50ae")
  205. give_item(id, "weapon_aug");
  206. give_item(id, "ammo_556nato");
  207. give_item(id, "ammo_556nato");
  208. give_item(id, "ammo_556nato");
  209. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4AUG Csomagot!");
  210. }
  211. case 6:
  212. {
  213.  
  214. give_player_grenades(id);
  215. give_item(id, "weapon_knife");
  216. give_item(id, "weapon_deagle");
  217. give_item(id, "ammo_50ae");
  218. give_item(id, "ammo_50ae");
  219. give_item(id, "ammo_50ae")
  220. give_item(id, "weapon_famas");
  221. give_item(id, "ammo_556nato");
  222. give_item(id, "ammo_556nato");
  223. give_item(id, "ammo_556nato");
  224. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4FAMAS Csomagot!");
  225. }
  226. case 7:
  227. {
  228.  
  229. give_player_grenades(id);
  230. give_item(id, "weapon_knife");
  231. give_item(id, "weapon_deagle");
  232. give_item(id, "ammo_50ae");
  233. give_item(id, "ammo_50ae");
  234. give_item(id, "ammo_50ae")
  235. give_item(id, "weapon_galil");
  236. give_item(id, "ammo_556nato");
  237. give_item(id, "ammo_556nato");
  238. give_item(id, "ammo_556nato");
  239. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4Galil Csomagot!");
  240. }
  241. case 8:
  242. {
  243.  
  244. give_player_grenades(id);
  245. give_item(id, "weapon_knife");
  246. give_item(id, "weapon_deagle");
  247. give_item(id, "ammo_50ae");
  248. give_item(id, "ammo_50ae");
  249. give_item(id, "ammo_50ae")
  250. give_item(id, "weapon_mp5navy");
  251. give_item(id, "ammo_9mm");
  252. give_item(id, "ammo_9mm");
  253. give_item(id, "ammo_9mm");
  254. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4SMG Csomagot!");
  255. }
  256. case 9:
  257. {
  258.  
  259. give_player_grenades(id);
  260. give_item(id, "weapon_knife");
  261. give_item(id, "weapon_deagle");
  262. give_item(id, "ammo_50ae");
  263. give_item(id, "ammo_50ae");
  264. give_item(id, "ammo_50ae")
  265. give_item(id, "weapon_xm1014");
  266. give_item(id, "ammo_buckshot");
  267. give_item(id, "ammo_buckshot");
  268. give_item(id, "ammo_buckshot");
  269. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4AutoShotgun Csomagot!");
  270. }
  271. case 10:
  272. {
  273.  
  274. give_player_grenades(id);
  275. give_item(id, "weapon_knife");
  276. give_item(id, "weapon_deagle");
  277. give_item(id, "ammo_50ae");
  278. give_item(id, "ammo_50ae");
  279. give_item(id, "ammo_50ae")
  280. give_item(id, "weapon_m3");
  281. give_item(id, "ammo_buckshot");
  282. give_item(id, "ammo_buckshot");
  283. give_item(id, "ammo_buckshot");
  284. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4Shotgun Csomagot!");
  285. }
  286. case 11:
  287. {
  288.  
  289. give_player_grenades(id);
  290. give_item(id, "weapon_knife");
  291. give_item(id, "weapon_deagle");
  292. give_item(id, "ammo_50ae");
  293. give_item(id, "ammo_50ae");
  294. give_item(id, "ammo_50ae")
  295. give_item(id, "weapon_scout");
  296. give_item(id, "ammo_762nato");
  297. give_item(id, "ammo_762nato");
  298. give_item(id, "ammo_762nato");
  299. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4Scout Csomagot!");
  300. }
  301. }
  302. return PLUGIN_HANDLED;
  303. }
  304.  
  305. stock give_player_grenades(index)
  306. {
  307. give_item(index, "weapon_hegrenade");
  308. give_item(index, "weapon_flashbang");
  309. give_item(index, "weapon_flashbang");
  310. /*give_item(index, "weapon_smokegrenade");*/
  311. give_item(index, "item_thighpack");
  312. give_item(index, "item_assaultsuit");
  313. }


Tessék itt az összes,remélem megtudod oldani.. :)

_________________
Kép

MAIN :
Kép

MÁSIK :
KépKép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: BHOP MENÜ & Multijump
HozzászólásElküldve: 2015.01.17. 15:37 
Offline
Developer
Avatar

Csatlakozott: 2011.06.01. 21:11
Hozzászólások: 7962
Megköszönt másnak: 295 alkalommal
Megköszönték neki: 535 alkalommal
Mehet egy pluginba az egész, ugye?

_________________
http://www.easyrankup.eu


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: BHOP MENÜ & Multijump
HozzászólásElküldve: 2015.01.17. 16:01 
Offline
Senior Tag
Avatar

Csatlakozott: 2014.03.12. 18:54
Hozzászólások: 295
Megköszönt másnak: 33 alkalommal
Megköszönték neki: 26 alkalommal
kiki írta:
Mehet egy pluginba az egész, ugye?

Persze.. :)

_________________
Kép

MAIN :
Kép

MÁSIK :
KépKép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: BHOP MENÜ & Multijump
HozzászólásElküldve: 2015.01.17. 16:02 
Offline
Developer
Avatar

Csatlakozott: 2011.06.01. 21:11
Hozzászólások: 7962
Megköszönt másnak: 295 alkalommal
Megköszönték neki: 535 alkalommal
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <colorchat>
  4. #include <fun>
  5. #include <cstrike>
  6. #include <fakemeta>
  7. #include <hamsandwich>
  8. #include <engine>
  9.  
  10. new jumpnum[33] = 0
  11. new bool:dojump[33] = false
  12.  
  13. #define PLUGIN "Weapon Menu"
  14. #define VERSION "1.0"
  15. #define AUTHOR "Silent"
  16.  
  17. new gWPCT;
  18. new gWPTE;
  19. new bool:wpon
  20. new bool:g_bhop[33]
  21.  
  22. public plugin_init() {
  23. register_plugin(PLUGIN, VERSION, AUTHOR)
  24. /*register_clcmd("say guns", "fegyvermenu");*/
  25. RegisterHam(Ham_Spawn, "player", "fegyvermenu", 1)
  26. register_logevent("logevent_end", 2, "1=Round_End");
  27. register_forward(FM_PlayerPreThink, "fw_PlayerPreThink")
  28. }
  29.  
  30. public logevent_end()
  31. {
  32. gWPCT = 0;
  33. gWPTE = 0;
  34. wpon = false
  35. }
  36.  
  37.  
  38. public fegyvermenu(id)
  39. {
  40. strip_user_weapons(id)
  41. cs_set_user_money(id, 0); // Penz nullazasa
  42. new jatekos[32]
  43. new ctnum, tnum
  44. get_players(jatekos, ctnum, "e", "CT")
  45. get_players(jatekos, tnum, "e", "TERRORIST")
  46. if(ctnum >= 3 && tnum >= 3)
  47. {
  48. wpon = true
  49. }
  50. if(!user_has_weapon(id, CSW_C4))
  51. {
  52. strip_user_weapons(id);
  53. new menu = menu_create("\d[\yS\rG\d] » \rVálassz \yFegyver \yCsomagot! \d", "handler");
  54. menu_additem(menu, "[\rM4A1 \yCsomag]", "1", 0);
  55. menu_additem(menu, "[\rAK47 \yCsomag]", "2", 0);
  56. menu_additem(menu, "[\rAWP \yCsomag]\d [\rElső 5 embernek\d] \r[3v3]", "3", 0);
  57. menu_additem(menu, "[\rMachineGun \yCsomag]", "4", 0);
  58. menu_additem(menu, "[\rAUG \yCsomag]", "5", 0);
  59. menu_additem(menu, "[\rFAMAS \yCsomag]", "6", 0);
  60. menu_additem(menu, "[\rGalil \yCsomag]", "7", 0);
  61. menu_additem(menu, "[\rSMG \yCsomag]", "8", 0);
  62. menu_additem(menu, "[\rAutoshotgun \yCsomag] \d [\rXM1014\d]", "9", 0);
  63. menu_additem(menu, "[\rShotgun \yCsomag]\d [\rM3\d]", "10", 0);
  64. menu_additem(menu, "[\rScout \yCsomag]", "11", 0);
  65. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
  66. menu_display(id, menu);
  67.  
  68. }
  69. else
  70. {
  71. new menu = menu_create("\d[\yS\rG\d » \rVálassz \yFegyver \yCsomagot! \d", "handler");
  72. menu_additem(menu, "[\rM4A1 \yCsomag]", "1", 0);
  73. menu_additem(menu, "[\rAK47 \yCsomag]", "2", 0);
  74. menu_additem(menu, "[\rAWP \yCsomag]\d [\rElső 5 embernek\d] \r[3v3]", "3", 0);
  75. menu_additem(menu, "[\rMachineGun \yCsomag]", "4", 0);
  76. menu_additem(menu, "[\rAUG \yCsomag]", "5", 0);
  77. menu_additem(menu, "[\rFAMAS \yCsomag]", "6", 0);
  78. menu_additem(menu, "[\rGalil \yCsomag]", "7", 0);
  79. menu_additem(menu, "[\rSMG \yCsomag]", "8", 0);
  80. menu_additem(menu, "[\rAutoshotgun \yCsomag] \d [\rXM1014\d]", "9", 0);
  81. menu_additem(menu, "[\rShotgun \yCsomag]\d [\rM3\d]", "10", 0);
  82. menu_additem(menu, "[\rScout \yCsomag]", "11", 0);
  83. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
  84. menu_display(id, menu);
  85. }
  86. }
  87.  
  88. public handler(id, menu, item)
  89. {
  90. if( item == MENU_EXIT )
  91. {
  92. menu_destroy(menu);
  93. return PLUGIN_HANDLED;
  94. }
  95. new data[6], szName[64];
  96. new access, callback;
  97. menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
  98. new key = str_to_num(data);
  99. switch(key)
  100. {
  101.  
  102. case 1:
  103. {
  104.  
  105. give_player_grenades(id);
  106. give_item(id, "weapon_knife");
  107. give_item(id, "weapon_deagle");
  108. give_item(id, "ammo_50ae");
  109. give_item(id, "ammo_50ae");
  110. give_item(id, "ammo_50ae");
  111. give_item(id, "weapon_m4a1");
  112. give_item(id, "ammo_556nato");
  113. give_item(id, "ammo_556nato");
  114. give_item(id, "ammo_556nato");
  115. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4M4A1 Csomagot!");
  116. }
  117. case 2:
  118. {
  119.  
  120. give_player_grenades(id);
  121. give_item(id, "weapon_knife");
  122. give_item(id, "weapon_deagle");
  123. give_item(id, "ammo_50ae");
  124. give_item(id, "ammo_50ae");
  125. give_item(id, "ammo_50ae");
  126. give_item(id, "weapon_ak47");
  127. give_item(id, "ammo_762nato");
  128. give_item(id, "ammo_762nato");
  129. give_item(id, "ammo_762nato");
  130. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4AK47 Csomagot!");
  131. }
  132. case 3:
  133. {
  134. new CsTeams:userTeam = cs_get_user_team(id);
  135. if(userTeam == CS_TEAM_CT)
  136. {
  137. if(gWPCT < 5 && wpon == true)
  138. {
  139.  
  140. give_player_grenades(id);
  141. give_item(id, "weapon_knife");
  142. give_item(id, "weapon_awp");
  143. give_item(id, "weapon_deagle");
  144. give_item(id, "ammo_50ae");
  145. give_item(id, "ammo_50ae");
  146. give_item(id, "ammo_50ae");
  147. give_item(id, "ammo_338magnum");
  148. give_item(id, "ammo_338magnum");
  149. give_item(id, "ammo_338magnum");
  150. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4AWP Csomagot!");
  151. gWPCT++
  152. }
  153. else
  154. {
  155. set_hudmessage(42, 255, 212, 0.27, 0.26, 0, 6.0, 2.1)
  156. show_hudmessage(id, "3v3-tól van AWP!^nVárd meg még elegen leszünk a szerveren!^n5-en Használhatjátok a WP-ét!");
  157. fegyvermenu(id);
  158. }
  159. }
  160. if(userTeam == CS_TEAM_T)
  161. {
  162. if(gWPTE < 5 && wpon == true)
  163. {
  164.  
  165. give_player_grenades(id);
  166. give_item(id, "weapon_knife");
  167. give_item(id, "weapon_awp");
  168. give_item(id, "weapon_deagle");
  169. give_item(id, "ammo_50ae");
  170. give_item(id, "ammo_50ae");
  171. give_item(id, "ammo_50ae");
  172. give_item(id, "ammo_338magnum");
  173. give_item(id, "ammo_338magnum");
  174. give_item(id, "ammo_338magnum");
  175. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4AWP Csomagot!");
  176. gWPTE++
  177. }
  178. else
  179. {
  180. set_hudmessage(42, 255, 212, 0.27, 0.26, 0, 6.0, 2.1)
  181. show_hudmessage(id, "3v3-tól van AWP!^nVárd meg még elegen leszünk a szerveren!^n5-en Használhatjátok a WP-ét!");
  182. fegyvermenu(id);
  183. }
  184. }
  185.  
  186. }
  187. case 4:
  188. {
  189.  
  190. give_player_grenades(id);
  191. give_item(id, "weapon_knife");
  192. give_item(id, "weapon_deagle");
  193. give_item(id, "ammo_50ae");
  194. give_item(id, "ammo_50ae");
  195. give_item(id, "ammo_50ae");
  196. give_item(id, "weapon_m249");
  197. give_item(id, "ammo_556natobox");
  198. give_item(id, "ammo_556natobox");
  199. give_item(id, "ammo_556natobox");
  200. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4MacHineGun Csomagot!");
  201. }
  202. case 5:
  203. {
  204.  
  205. give_player_grenades(id);
  206. give_item(id, "weapon_knife");
  207. give_item(id, "weapon_deagle");
  208. give_item(id, "ammo_50ae");
  209. give_item(id, "ammo_50ae");
  210. give_item(id, "ammo_50ae")
  211. give_item(id, "weapon_aug");
  212. give_item(id, "ammo_556nato");
  213. give_item(id, "ammo_556nato");
  214. give_item(id, "ammo_556nato");
  215. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4AUG Csomagot!");
  216. }
  217. case 6:
  218. {
  219.  
  220. give_player_grenades(id);
  221. give_item(id, "weapon_knife");
  222. give_item(id, "weapon_deagle");
  223. give_item(id, "ammo_50ae");
  224. give_item(id, "ammo_50ae");
  225. give_item(id, "ammo_50ae")
  226. give_item(id, "weapon_famas");
  227. give_item(id, "ammo_556nato");
  228. give_item(id, "ammo_556nato");
  229. give_item(id, "ammo_556nato");
  230. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4FAMAS Csomagot!");
  231. }
  232. case 7:
  233. {
  234.  
  235. give_player_grenades(id);
  236. give_item(id, "weapon_knife");
  237. give_item(id, "weapon_deagle");
  238. give_item(id, "ammo_50ae");
  239. give_item(id, "ammo_50ae");
  240. give_item(id, "ammo_50ae")
  241. give_item(id, "weapon_galil");
  242. give_item(id, "ammo_556nato");
  243. give_item(id, "ammo_556nato");
  244. give_item(id, "ammo_556nato");
  245. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4Galil Csomagot!");
  246. }
  247. case 8:
  248. {
  249.  
  250. give_player_grenades(id);
  251. give_item(id, "weapon_knife");
  252. give_item(id, "weapon_deagle");
  253. give_item(id, "ammo_50ae");
  254. give_item(id, "ammo_50ae");
  255. give_item(id, "ammo_50ae")
  256. give_item(id, "weapon_mp5navy");
  257. give_item(id, "ammo_9mm");
  258. give_item(id, "ammo_9mm");
  259. give_item(id, "ammo_9mm");
  260. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4SMG Csomagot!");
  261. }
  262. case 9:
  263. {
  264.  
  265. give_player_grenades(id);
  266. give_item(id, "weapon_knife");
  267. give_item(id, "weapon_deagle");
  268. give_item(id, "ammo_50ae");
  269. give_item(id, "ammo_50ae");
  270. give_item(id, "ammo_50ae")
  271. give_item(id, "weapon_xm1014");
  272. give_item(id, "ammo_buckshot");
  273. give_item(id, "ammo_buckshot");
  274. give_item(id, "ammo_buckshot");
  275. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4AutoShotgun Csomagot!");
  276. }
  277. case 10:
  278. {
  279.  
  280. give_player_grenades(id);
  281. give_item(id, "weapon_knife");
  282. give_item(id, "weapon_deagle");
  283. give_item(id, "ammo_50ae");
  284. give_item(id, "ammo_50ae");
  285. give_item(id, "ammo_50ae")
  286. give_item(id, "weapon_m3");
  287. give_item(id, "ammo_buckshot");
  288. give_item(id, "ammo_buckshot");
  289. give_item(id, "ammo_buckshot");
  290. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4Shotgun Csomagot!");
  291. }
  292. case 11:
  293. {
  294.  
  295. give_player_grenades(id);
  296. give_item(id, "weapon_knife");
  297. give_item(id, "weapon_deagle");
  298. give_item(id, "ammo_50ae");
  299. give_item(id, "ammo_50ae");
  300. give_item(id, "ammo_50ae")
  301. give_item(id, "weapon_scout");
  302. give_item(id, "ammo_762nato");
  303. give_item(id, "ammo_762nato");
  304. give_item(id, "ammo_762nato");
  305. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4Scout Csomagot!");
  306. }
  307. }
  308. return PLUGIN_HANDLED;
  309. }
  310.  
  311. stock give_player_grenades(index)
  312. {
  313. give_item(index, "weapon_hegrenade");
  314. give_item(index, "weapon_flashbang");
  315. give_item(index, "weapon_flashbang");
  316. /*give_item(index, "weapon_smokegrenade");*/
  317. give_item(index, "item_thighpack");
  318. give_item(index, "item_assaultsuit");
  319. ShowMenu(index)
  320. }
  321.  
  322. public client_putinserver(id)
  323. {
  324. jumpnum[id] = 0
  325. dojump[id] = false
  326. }
  327.  
  328. public client_disconnect(id)
  329. {
  330. jumpnum[id] = 0
  331. dojump[id] = false
  332. }
  333.  
  334. public client_connect(id)
  335. {
  336. g_bhop[id] = false
  337. }
  338.  
  339. public client_PreThink(id)
  340. {
  341. if(!is_user_alive(id)) return PLUGIN_CONTINUE
  342. new nbut = get_user_button(id)
  343. new obut = get_user_oldbutton(id)
  344. if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
  345. {
  346. if(g_bhop[id] == true)
  347. {
  348. if(jumpnum[id] < 1)
  349. {
  350. dojump[id] = true
  351. jumpnum[id]++
  352. return PLUGIN_CONTINUE
  353. }
  354. }
  355. else
  356. {
  357. if(jumpnum[id] < 3)
  358. {
  359. dojump[id] = true
  360. jumpnum[id]++
  361. return PLUGIN_CONTINUE
  362. }
  363. }
  364. }
  365. if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
  366. {
  367. jumpnum[id] = 0
  368. return PLUGIN_CONTINUE
  369. }
  370. return PLUGIN_CONTINUE
  371. }
  372.  
  373. public client_PostThink(id)
  374. {
  375. if(!is_user_alive(id)) return PLUGIN_CONTINUE
  376. if(dojump[id] == true)
  377. {
  378. new Float:velocity[3]
  379. entity_get_vector(id,EV_VEC_velocity,velocity)
  380. velocity[2] = random_float(265.0,285.0)
  381. entity_set_vector(id,EV_VEC_velocity,velocity)
  382. dojump[id] = false
  383. return PLUGIN_CONTINUE
  384. }
  385. return PLUGIN_CONTINUE
  386. }
  387.  
  388. public ShowMenu(id)
  389. {
  390. new menu = menu_create("Auto bhop", "b_hand");
  391.  
  392. menu_additem(menu, "Igen", "", 0);
  393. menu_additem(menu, "Nem", "", 0);
  394.  
  395. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
  396.  
  397. menu_display(id, menu, 0);
  398.  
  399. return PLUGIN_HANDLED;
  400. }
  401.  
  402. public b_hand(id, menu, item)
  403. {
  404. if(item == MENU_EXIT)
  405. {
  406. menu_cancel(id);
  407. return PLUGIN_HANDLED;
  408. }
  409.  
  410. new command[6], name[64], access, callback;
  411.  
  412. menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);
  413.  
  414. switch(item)
  415. {
  416. case 0: g_bhop[id] = true
  417. case 1: g_bhop[id] = false
  418. }
  419.  
  420. menu_destroy(menu);
  421.  
  422. return PLUGIN_HANDLED;
  423. }
  424.  
  425. public fw_PlayerPreThink(id)
  426. {
  427. if(g_bhop[id] == true)
  428. {
  429.  
  430. entity_set_float(id, EV_FL_fuser2, 0.0)
  431. if (entity_get_int(id, EV_INT_button) & 2) {
  432. new flags = entity_get_int(id, EV_INT_flags)
  433.  
  434. if (flags & FL_WATERJUMP)
  435. return PLUGIN_CONTINUE
  436. if ( entity_get_int(id, EV_INT_waterlevel) >= 2 )
  437. return PLUGIN_CONTINUE
  438. if ( !(flags & FL_ONGROUND) )
  439. return PLUGIN_CONTINUE
  440.  
  441. new Float:velocity[3]
  442. entity_get_vector(id, EV_VEC_velocity, velocity)
  443. velocity[2] += 250.0
  444. entity_set_vector(id, EV_VEC_velocity, velocity)
  445.  
  446. entity_set_int(id, EV_INT_gaitsequence, 6)
  447. }
  448. }
  449. return PLUGIN_CONTINUE
  450. }

_________________
http://www.easyrankup.eu

Ők köszönték meg kiki nek ezt a hozzászólást: D3M0*~ (2015.01.17. 16:14)
  Népszerűség: 2.27%


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: BHOP MENÜ & Multijump
HozzászólásElküldve: 2015.01.17. 16:12 
Offline
Senior Tag
Avatar

Csatlakozott: 2014.03.12. 18:54
Hozzászólások: 295
Megköszönt másnak: 33 alkalommal
Megköszönték neki: 26 alkalommal
kiki írta:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <colorchat>
  4. #include <fun>
  5. #include <cstrike>
  6. #include <fakemeta>
  7. #include <hamsandwich>
  8. #include <engine>
  9.  
  10. new jumpnum[33] = 0
  11. new bool:dojump[33] = false
  12.  
  13. #define PLUGIN "Weapon Menu"
  14. #define VERSION "1.0"
  15. #define AUTHOR "Silent"
  16.  
  17. new gWPCT;
  18. new gWPTE;
  19. new bool:wpon
  20. new bool:g_bhop[33]
  21.  
  22. public plugin_init() {
  23. register_plugin(PLUGIN, VERSION, AUTHOR)
  24. /*register_clcmd("say guns", "fegyvermenu");*/
  25. RegisterHam(Ham_Spawn, "player", "fegyvermenu", 1)
  26. register_logevent("logevent_end", 2, "1=Round_End");
  27. register_forward(FM_PlayerPreThink, "fw_PlayerPreThink")
  28. }
  29.  
  30. public logevent_end()
  31. {
  32. gWPCT = 0;
  33. gWPTE = 0;
  34. wpon = false
  35. }
  36.  
  37.  
  38. public fegyvermenu(id)
  39. {
  40. strip_user_weapons(id)
  41. cs_set_user_money(id, 0); // Penz nullazasa
  42. new jatekos[32]
  43. new ctnum, tnum
  44. get_players(jatekos, ctnum, "e", "CT")
  45. get_players(jatekos, tnum, "e", "TERRORIST")
  46. if(ctnum >= 3 && tnum >= 3)
  47. {
  48. wpon = true
  49. }
  50. if(!user_has_weapon(id, CSW_C4))
  51. {
  52. strip_user_weapons(id);
  53. new menu = menu_create("\d[\yS\rG\d] » \rVálassz \yFegyver \yCsomagot! \d", "handler");
  54. menu_additem(menu, "[\rM4A1 \yCsomag]", "1", 0);
  55. menu_additem(menu, "[\rAK47 \yCsomag]", "2", 0);
  56. menu_additem(menu, "[\rAWP \yCsomag]\d [\rElső 5 embernek\d] \r[3v3]", "3", 0);
  57. menu_additem(menu, "[\rMachineGun \yCsomag]", "4", 0);
  58. menu_additem(menu, "[\rAUG \yCsomag]", "5", 0);
  59. menu_additem(menu, "[\rFAMAS \yCsomag]", "6", 0);
  60. menu_additem(menu, "[\rGalil \yCsomag]", "7", 0);
  61. menu_additem(menu, "[\rSMG \yCsomag]", "8", 0);
  62. menu_additem(menu, "[\rAutoshotgun \yCsomag] \d [\rXM1014\d]", "9", 0);
  63. menu_additem(menu, "[\rShotgun \yCsomag]\d [\rM3\d]", "10", 0);
  64. menu_additem(menu, "[\rScout \yCsomag]", "11", 0);
  65. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
  66. menu_display(id, menu);
  67.  
  68. }
  69. else
  70. {
  71. new menu = menu_create("\d[\yS\rG\d » \rVálassz \yFegyver \yCsomagot! \d", "handler");
  72. menu_additem(menu, "[\rM4A1 \yCsomag]", "1", 0);
  73. menu_additem(menu, "[\rAK47 \yCsomag]", "2", 0);
  74. menu_additem(menu, "[\rAWP \yCsomag]\d [\rElső 5 embernek\d] \r[3v3]", "3", 0);
  75. menu_additem(menu, "[\rMachineGun \yCsomag]", "4", 0);
  76. menu_additem(menu, "[\rAUG \yCsomag]", "5", 0);
  77. menu_additem(menu, "[\rFAMAS \yCsomag]", "6", 0);
  78. menu_additem(menu, "[\rGalil \yCsomag]", "7", 0);
  79. menu_additem(menu, "[\rSMG \yCsomag]", "8", 0);
  80. menu_additem(menu, "[\rAutoshotgun \yCsomag] \d [\rXM1014\d]", "9", 0);
  81. menu_additem(menu, "[\rShotgun \yCsomag]\d [\rM3\d]", "10", 0);
  82. menu_additem(menu, "[\rScout \yCsomag]", "11", 0);
  83. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
  84. menu_display(id, menu);
  85. }
  86. }
  87.  
  88. public handler(id, menu, item)
  89. {
  90. if( item == MENU_EXIT )
  91. {
  92. menu_destroy(menu);
  93. return PLUGIN_HANDLED;
  94. }
  95. new data[6], szName[64];
  96. new access, callback;
  97. menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
  98. new key = str_to_num(data);
  99. switch(key)
  100. {
  101.  
  102. case 1:
  103. {
  104.  
  105. give_player_grenades(id);
  106. give_item(id, "weapon_knife");
  107. give_item(id, "weapon_deagle");
  108. give_item(id, "ammo_50ae");
  109. give_item(id, "ammo_50ae");
  110. give_item(id, "ammo_50ae");
  111. give_item(id, "weapon_m4a1");
  112. give_item(id, "ammo_556nato");
  113. give_item(id, "ammo_556nato");
  114. give_item(id, "ammo_556nato");
  115. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4M4A1 Csomagot!");
  116. }
  117. case 2:
  118. {
  119.  
  120. give_player_grenades(id);
  121. give_item(id, "weapon_knife");
  122. give_item(id, "weapon_deagle");
  123. give_item(id, "ammo_50ae");
  124. give_item(id, "ammo_50ae");
  125. give_item(id, "ammo_50ae");
  126. give_item(id, "weapon_ak47");
  127. give_item(id, "ammo_762nato");
  128. give_item(id, "ammo_762nato");
  129. give_item(id, "ammo_762nato");
  130. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4AK47 Csomagot!");
  131. }
  132. case 3:
  133. {
  134. new CsTeams:userTeam = cs_get_user_team(id);
  135. if(userTeam == CS_TEAM_CT)
  136. {
  137. if(gWPCT < 5 && wpon == true)
  138. {
  139.  
  140. give_player_grenades(id);
  141. give_item(id, "weapon_knife");
  142. give_item(id, "weapon_awp");
  143. give_item(id, "weapon_deagle");
  144. give_item(id, "ammo_50ae");
  145. give_item(id, "ammo_50ae");
  146. give_item(id, "ammo_50ae");
  147. give_item(id, "ammo_338magnum");
  148. give_item(id, "ammo_338magnum");
  149. give_item(id, "ammo_338magnum");
  150. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4AWP Csomagot!");
  151. gWPCT++
  152. }
  153. else
  154. {
  155. set_hudmessage(42, 255, 212, 0.27, 0.26, 0, 6.0, 2.1)
  156. show_hudmessage(id, "3v3-tól van AWP!^nVárd meg még elegen leszünk a szerveren!^n5-en Használhatjátok a WP-ét!");
  157. fegyvermenu(id);
  158. }
  159. }
  160. if(userTeam == CS_TEAM_T)
  161. {
  162. if(gWPTE < 5 && wpon == true)
  163. {
  164.  
  165. give_player_grenades(id);
  166. give_item(id, "weapon_knife");
  167. give_item(id, "weapon_awp");
  168. give_item(id, "weapon_deagle");
  169. give_item(id, "ammo_50ae");
  170. give_item(id, "ammo_50ae");
  171. give_item(id, "ammo_50ae");
  172. give_item(id, "ammo_338magnum");
  173. give_item(id, "ammo_338magnum");
  174. give_item(id, "ammo_338magnum");
  175. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4AWP Csomagot!");
  176. gWPTE++
  177. }
  178. else
  179. {
  180. set_hudmessage(42, 255, 212, 0.27, 0.26, 0, 6.0, 2.1)
  181. show_hudmessage(id, "3v3-tól van AWP!^nVárd meg még elegen leszünk a szerveren!^n5-en Használhatjátok a WP-ét!");
  182. fegyvermenu(id);
  183. }
  184. }
  185.  
  186. }
  187. case 4:
  188. {
  189.  
  190. give_player_grenades(id);
  191. give_item(id, "weapon_knife");
  192. give_item(id, "weapon_deagle");
  193. give_item(id, "ammo_50ae");
  194. give_item(id, "ammo_50ae");
  195. give_item(id, "ammo_50ae");
  196. give_item(id, "weapon_m249");
  197. give_item(id, "ammo_556natobox");
  198. give_item(id, "ammo_556natobox");
  199. give_item(id, "ammo_556natobox");
  200. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4MacHineGun Csomagot!");
  201. }
  202. case 5:
  203. {
  204.  
  205. give_player_grenades(id);
  206. give_item(id, "weapon_knife");
  207. give_item(id, "weapon_deagle");
  208. give_item(id, "ammo_50ae");
  209. give_item(id, "ammo_50ae");
  210. give_item(id, "ammo_50ae")
  211. give_item(id, "weapon_aug");
  212. give_item(id, "ammo_556nato");
  213. give_item(id, "ammo_556nato");
  214. give_item(id, "ammo_556nato");
  215. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4AUG Csomagot!");
  216. }
  217. case 6:
  218. {
  219.  
  220. give_player_grenades(id);
  221. give_item(id, "weapon_knife");
  222. give_item(id, "weapon_deagle");
  223. give_item(id, "ammo_50ae");
  224. give_item(id, "ammo_50ae");
  225. give_item(id, "ammo_50ae")
  226. give_item(id, "weapon_famas");
  227. give_item(id, "ammo_556nato");
  228. give_item(id, "ammo_556nato");
  229. give_item(id, "ammo_556nato");
  230. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4FAMAS Csomagot!");
  231. }
  232. case 7:
  233. {
  234.  
  235. give_player_grenades(id);
  236. give_item(id, "weapon_knife");
  237. give_item(id, "weapon_deagle");
  238. give_item(id, "ammo_50ae");
  239. give_item(id, "ammo_50ae");
  240. give_item(id, "ammo_50ae")
  241. give_item(id, "weapon_galil");
  242. give_item(id, "ammo_556nato");
  243. give_item(id, "ammo_556nato");
  244. give_item(id, "ammo_556nato");
  245. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4Galil Csomagot!");
  246. }
  247. case 8:
  248. {
  249.  
  250. give_player_grenades(id);
  251. give_item(id, "weapon_knife");
  252. give_item(id, "weapon_deagle");
  253. give_item(id, "ammo_50ae");
  254. give_item(id, "ammo_50ae");
  255. give_item(id, "ammo_50ae")
  256. give_item(id, "weapon_mp5navy");
  257. give_item(id, "ammo_9mm");
  258. give_item(id, "ammo_9mm");
  259. give_item(id, "ammo_9mm");
  260. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4SMG Csomagot!");
  261. }
  262. case 9:
  263. {
  264.  
  265. give_player_grenades(id);
  266. give_item(id, "weapon_knife");
  267. give_item(id, "weapon_deagle");
  268. give_item(id, "ammo_50ae");
  269. give_item(id, "ammo_50ae");
  270. give_item(id, "ammo_50ae")
  271. give_item(id, "weapon_xm1014");
  272. give_item(id, "ammo_buckshot");
  273. give_item(id, "ammo_buckshot");
  274. give_item(id, "ammo_buckshot");
  275. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4AutoShotgun Csomagot!");
  276. }
  277. case 10:
  278. {
  279.  
  280. give_player_grenades(id);
  281. give_item(id, "weapon_knife");
  282. give_item(id, "weapon_deagle");
  283. give_item(id, "ammo_50ae");
  284. give_item(id, "ammo_50ae");
  285. give_item(id, "ammo_50ae")
  286. give_item(id, "weapon_m3");
  287. give_item(id, "ammo_buckshot");
  288. give_item(id, "ammo_buckshot");
  289. give_item(id, "ammo_buckshot");
  290. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4Shotgun Csomagot!");
  291. }
  292. case 11:
  293. {
  294.  
  295. give_player_grenades(id);
  296. give_item(id, "weapon_knife");
  297. give_item(id, "weapon_deagle");
  298. give_item(id, "ammo_50ae");
  299. give_item(id, "ammo_50ae");
  300. give_item(id, "ammo_50ae")
  301. give_item(id, "weapon_scout");
  302. give_item(id, "ammo_762nato");
  303. give_item(id, "ammo_762nato");
  304. give_item(id, "ammo_762nato");
  305. ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4Scout Csomagot!");
  306. }
  307. }
  308. return PLUGIN_HANDLED;
  309. }
  310.  
  311. stock give_player_grenades(index)
  312. {
  313. give_item(index, "weapon_hegrenade");
  314. give_item(index, "weapon_flashbang");
  315. give_item(index, "weapon_flashbang");
  316. /*give_item(index, "weapon_smokegrenade");*/
  317. give_item(index, "item_thighpack");
  318. give_item(index, "item_assaultsuit");
  319. ShowMenu(index)
  320. }
  321.  
  322. public client_putinserver(id)
  323. {
  324. jumpnum[id] = 0
  325. dojump[id] = false
  326. }
  327.  
  328. public client_disconnect(id)
  329. {
  330. jumpnum[id] = 0
  331. dojump[id] = false
  332. }
  333.  
  334. public client_connect(id)
  335. {
  336. g_bhop[id] = false
  337. }
  338.  
  339. public client_PreThink(id)
  340. {
  341. if(!is_user_alive(id)) return PLUGIN_CONTINUE
  342. new nbut = get_user_button(id)
  343. new obut = get_user_oldbutton(id)
  344. if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
  345. {
  346. if(g_bhop[id] == true)
  347. {
  348. if(jumpnum[id] < 1)
  349. {
  350. dojump[id] = true
  351. jumpnum[id]++
  352. return PLUGIN_CONTINUE
  353. }
  354. }
  355. else
  356. {
  357. if(jumpnum[id] < 3)
  358. {
  359. dojump[id] = true
  360. jumpnum[id]++
  361. return PLUGIN_CONTINUE
  362. }
  363. }
  364. }
  365. if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
  366. {
  367. jumpnum[id] = 0
  368. return PLUGIN_CONTINUE
  369. }
  370. return PLUGIN_CONTINUE
  371. }
  372.  
  373. public client_PostThink(id)
  374. {
  375. if(!is_user_alive(id)) return PLUGIN_CONTINUE
  376. if(dojump[id] == true)
  377. {
  378. new Float:velocity[3]
  379. entity_get_vector(id,EV_VEC_velocity,velocity)
  380. velocity[2] = random_float(265.0,285.0)
  381. entity_set_vector(id,EV_VEC_velocity,velocity)
  382. dojump[id] = false
  383. return PLUGIN_CONTINUE
  384. }
  385. return PLUGIN_CONTINUE
  386. }
  387.  
  388. public ShowMenu(id)
  389. {
  390. new menu = menu_create("Auto bhop", "b_hand");
  391.  
  392. menu_additem(menu, "Igen", "", 0);
  393. menu_additem(menu, "Nem", "", 0);
  394.  
  395. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
  396.  
  397. menu_display(id, menu, 0);
  398.  
  399. return PLUGIN_HANDLED;
  400. }
  401.  
  402. public b_hand(id, menu, item)
  403. {
  404. if(item == MENU_EXIT)
  405. {
  406. menu_cancel(id);
  407. return PLUGIN_HANDLED;
  408. }
  409.  
  410. new command[6], name[64], access, callback;
  411.  
  412. menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);
  413.  
  414. switch(item)
  415. {
  416. case 0: g_bhop[id] = true
  417. case 1: g_bhop[id] = false
  418. }
  419.  
  420. menu_destroy(menu);
  421.  
  422. return PLUGIN_HANDLED;
  423. }
  424.  
  425. public fw_PlayerPreThink(id)
  426. {
  427. if(g_bhop[id] == true)
  428. {
  429.  
  430. entity_set_float(id, EV_FL_fuser2, 0.0)
  431. if (entity_get_int(id, EV_INT_button) & 2) {
  432. new flags = entity_get_int(id, EV_INT_flags)
  433.  
  434. if (flags & FL_WATERJUMP)
  435. return PLUGIN_CONTINUE
  436. if ( entity_get_int(id, EV_INT_waterlevel) >= 2 )
  437. return PLUGIN_CONTINUE
  438. if ( !(flags & FL_ONGROUND) )
  439. return PLUGIN_CONTINUE
  440.  
  441. new Float:velocity[3]
  442. entity_get_vector(id, EV_VEC_velocity, velocity)
  443. velocity[2] += 250.0
  444. entity_set_vector(id, EV_VEC_velocity, velocity)
  445.  
  446. entity_set_int(id, EV_INT_gaitsequence, 6)
  447. }
  448. }
  449. return PLUGIN_CONTINUE
  450. }

Még annyi beleírál, hogy ha igenre megy akkor írja a chat-be hogy Bhop : on
Ha nem-re ment akkor Bhop : off

_________________
Kép

MAIN :
Kép

MÁSIK :
KépKép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: BHOP MENÜ & Multijump
HozzászólásElküldve: 2015.01.17. 16:29 
Offline
Beavatott
Avatar

Csatlakozott: 2015.01.15. 22:08
Hozzászólások: 99
Megköszönt másnak: 1 alkalommal
Megköszönték neki: 15 alkalommal
D3M0*~ írta:
kiki írta:
SMA Forráskód: [ Mindet kijelol ]#include <amxmodx>
#include <amxmisc>
#include <colorchat>
#include <fun>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>
#include <engine>
 
new jumpnum[33] = 0
new bool:dojump[33] = false
 
#define PLUGIN "Weapon Menu"
#define VERSION "1.0"
#define AUTHOR "Silent"
 
new gWPCT;
new gWPTE;
new bool:wpon
new bool:g_bhop[33]
 
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
/*register_clcmd("say guns", "fegyvermenu");*/
RegisterHam(Ham_Spawn, "player", "fegyvermenu", 1)
register_logevent("logevent_end", 2, "1=Round_End");
register_forward(FM_PlayerPreThink, "fw_PlayerPreThink")
}
 
public logevent_end()
{
gWPCT = 0;
gWPTE = 0;
wpon = false
}
 
 
public fegyvermenu(id)
{
strip_user_weapons(id)
cs_set_user_money(id, 0); // Penz nullazasa
new jatekos[32]
new ctnum, tnum
get_players(jatekos, ctnum, "e", "CT")
get_players(jatekos, tnum, "e", "TERRORIST")
if(ctnum >= 3 && tnum >= 3)
{
wpon = true
}
if(!user_has_weapon(id, CSW_C4))
{
strip_user_weapons(id);
new menu = menu_create("\d[\yS\rG\d] » \rVálassz \yFegyver \yCsomagot! \d", "handler");
menu_additem(menu, "[\rM4A1 \yCsomag]", "1", 0);
menu_additem(menu, "[\rAK47 \yCsomag]", "2", 0);
menu_additem(menu, "[\rAWP \yCsomag]\d [\rElső 5 embernek\d] \r[3v3]", "3", 0);
menu_additem(menu, "[\rMachineGun \yCsomag]", "4", 0);
menu_additem(menu, "[\rAUG \yCsomag]", "5", 0);
menu_additem(menu, "[\rFAMAS \yCsomag]", "6", 0);
menu_additem(menu, "[\rGalil \yCsomag]", "7", 0);
menu_additem(menu, "[\rSMG \yCsomag]", "8", 0);
menu_additem(menu, "[\rAutoshotgun \yCsomag] \d [\rXM1014\d]", "9", 0);
menu_additem(menu, "[\rShotgun \yCsomag]\d [\rM3\d]", "10", 0);
menu_additem(menu, "[\rScout \yCsomag]", "11", 0);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu);
 
}
else
{
new menu = menu_create("\d[\yS\rG\d » \rVálassz \yFegyver \yCsomagot! \d", "handler");
menu_additem(menu, "[\rM4A1 \yCsomag]", "1", 0);
menu_additem(menu, "[\rAK47 \yCsomag]", "2", 0);
menu_additem(menu, "[\rAWP \yCsomag]\d [\rElső 5 embernek\d] \r[3v3]", "3", 0);
menu_additem(menu, "[\rMachineGun \yCsomag]", "4", 0);
menu_additem(menu, "[\rAUG \yCsomag]", "5", 0);
menu_additem(menu, "[\rFAMAS \yCsomag]", "6", 0);
menu_additem(menu, "[\rGalil \yCsomag]", "7", 0);
menu_additem(menu, "[\rSMG \yCsomag]", "8", 0);
menu_additem(menu, "[\rAutoshotgun \yCsomag] \d [\rXM1014\d]", "9", 0);
menu_additem(menu, "[\rShotgun \yCsomag]\d [\rM3\d]", "10", 0);
menu_additem(menu, "[\rScout \yCsomag]", "11", 0);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu);
}
}
 
public handler(id, menu, item)
{
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], szName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
new key = str_to_num(data);
switch(key)
{
 
case 1:
{
 
give_player_grenades(id);
give_item(id, "weapon_knife");
give_item(id, "weapon_deagle");
give_item(id, "ammo_50ae");
give_item(id, "ammo_50ae");
give_item(id, "ammo_50ae");
give_item(id, "weapon_m4a1");
give_item(id, "ammo_556nato");
give_item(id, "ammo_556nato");
give_item(id, "ammo_556nato");
ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4M4A1 Csomagot!");
}
case 2:
{
 
give_player_grenades(id);
give_item(id, "weapon_knife");
give_item(id, "weapon_deagle");
give_item(id, "ammo_50ae");
give_item(id, "ammo_50ae");
give_item(id, "ammo_50ae");
give_item(id, "weapon_ak47");
give_item(id, "ammo_762nato");
give_item(id, "ammo_762nato");
give_item(id, "ammo_762nato");
ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4AK47 Csomagot!");
}
case 3:
{
new CsTeams:userTeam = cs_get_user_team(id);
if(userTeam == CS_TEAM_CT)
{
if(gWPCT < 5 && wpon == true)
{
 
give_player_grenades(id);
give_item(id, "weapon_knife");
give_item(id, "weapon_awp");
give_item(id, "weapon_deagle");
give_item(id, "ammo_50ae");
give_item(id, "ammo_50ae");
give_item(id, "ammo_50ae");
give_item(id, "ammo_338magnum");
give_item(id, "ammo_338magnum");
give_item(id, "ammo_338magnum");
ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4AWP Csomagot!");
gWPCT++
}
else
{
set_hudmessage(42, 255, 212, 0.27, 0.26, 0, 6.0, 2.1)
show_hudmessage(id, "3v3-tól van AWP!^nVárd meg még elegen leszünk a szerveren!^n5-en Használhatjátok a WP-ét!");
fegyvermenu(id);
}
}
if(userTeam == CS_TEAM_T)
{
if(gWPTE < 5 && wpon == true)
{
 
give_player_grenades(id);
give_item(id, "weapon_knife");
give_item(id, "weapon_awp");
give_item(id, "weapon_deagle");
give_item(id, "ammo_50ae");
give_item(id, "ammo_50ae");
give_item(id, "ammo_50ae");
give_item(id, "ammo_338magnum");
give_item(id, "ammo_338magnum");
give_item(id, "ammo_338magnum");
ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4AWP Csomagot!");
gWPTE++
}
else
{
set_hudmessage(42, 255, 212, 0.27, 0.26, 0, 6.0, 2.1)
show_hudmessage(id, "3v3-tól van AWP!^nVárd meg még elegen leszünk a szerveren!^n5-en Használhatjátok a WP-ét!");
fegyvermenu(id);
}
}
 
}
case 4:
{
 
give_player_grenades(id);
give_item(id, "weapon_knife");
give_item(id, "weapon_deagle");
give_item(id, "ammo_50ae");
give_item(id, "ammo_50ae");
give_item(id, "ammo_50ae");
give_item(id, "weapon_m249");
give_item(id, "ammo_556natobox");
give_item(id, "ammo_556natobox");
give_item(id, "ammo_556natobox");
ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4MacHineGun Csomagot!");
}
case 5:
{
 
give_player_grenades(id);
give_item(id, "weapon_knife");
give_item(id, "weapon_deagle");
give_item(id, "ammo_50ae");
give_item(id, "ammo_50ae");
give_item(id, "ammo_50ae")
give_item(id, "weapon_aug");
give_item(id, "ammo_556nato");
give_item(id, "ammo_556nato");
give_item(id, "ammo_556nato");
ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4AUG Csomagot!");
}
case 6:
{
 
give_player_grenades(id);
give_item(id, "weapon_knife");
give_item(id, "weapon_deagle");
give_item(id, "ammo_50ae");
give_item(id, "ammo_50ae");
give_item(id, "ammo_50ae")
give_item(id, "weapon_famas");
give_item(id, "ammo_556nato");
give_item(id, "ammo_556nato");
give_item(id, "ammo_556nato");
ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4FAMAS Csomagot!");
}
case 7:
{
 
give_player_grenades(id);
give_item(id, "weapon_knife");
give_item(id, "weapon_deagle");
give_item(id, "ammo_50ae");
give_item(id, "ammo_50ae");
give_item(id, "ammo_50ae")
give_item(id, "weapon_galil");
give_item(id, "ammo_556nato");
give_item(id, "ammo_556nato");
give_item(id, "ammo_556nato");
ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4Galil Csomagot!");
}
case 8:
{
 
give_player_grenades(id);
give_item(id, "weapon_knife");
give_item(id, "weapon_deagle");
give_item(id, "ammo_50ae");
give_item(id, "ammo_50ae");
give_item(id, "ammo_50ae")
give_item(id, "weapon_mp5navy");
give_item(id, "ammo_9mm");
give_item(id, "ammo_9mm");
give_item(id, "ammo_9mm");
ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4SMG Csomagot!");
}
case 9:
{
 
give_player_grenades(id);
give_item(id, "weapon_knife");
give_item(id, "weapon_deagle");
give_item(id, "ammo_50ae");
give_item(id, "ammo_50ae");
give_item(id, "ammo_50ae")
give_item(id, "weapon_xm1014");
give_item(id, "ammo_buckshot");
give_item(id, "ammo_buckshot");
give_item(id, "ammo_buckshot");
ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4AutoShotgun Csomagot!");
}
case 10:
{
 
give_player_grenades(id);
give_item(id, "weapon_knife");
give_item(id, "weapon_deagle");
give_item(id, "ammo_50ae");
give_item(id, "ammo_50ae");
give_item(id, "ammo_50ae")
give_item(id, "weapon_m3");
give_item(id, "ammo_buckshot");
give_item(id, "ammo_buckshot");
give_item(id, "ammo_buckshot");
ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4Shotgun Csomagot!");
}
case 11:
{
 
give_player_grenades(id);
give_item(id, "weapon_knife");
give_item(id, "weapon_deagle");
give_item(id, "ammo_50ae");
give_item(id, "ammo_50ae");
give_item(id, "ammo_50ae")
give_item(id, "weapon_scout");
give_item(id, "ammo_762nato");
give_item(id, "ammo_762nato");
give_item(id, "ammo_762nato");
ColorChat(id, BLUE, "^4[SG] » ^3Kaptál egy ^4Scout Csomagot!");
}
}
return PLUGIN_HANDLED;
}
 
stock give_player_grenades(index)
{
give_item(index, "weapon_hegrenade");
give_item(index, "weapon_flashbang");
give_item(index, "weapon_flashbang");
/*give_item(index, "weapon_smokegrenade");*/
give_item(index, "item_thighpack");
give_item(index, "item_assaultsuit");
ShowMenu(index)
}
 
public client_putinserver(id)
{
jumpnum[id] = 0
dojump[id] = false
}
 
public client_disconnect(id)
{
jumpnum[id] = 0
dojump[id] = false
}
 
public client_connect(id)
{
g_bhop[id] = false
}
 
public client_PreThink(id)
{
if(!is_user_alive(id)) return PLUGIN_CONTINUE
new nbut = get_user_button(id)
new obut = get_user_oldbutton(id)
if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
{
if(g_bhop[id] == true)
{
if(jumpnum[id] < 1)
{
dojump[id] = true
jumpnum[id]++
return PLUGIN_CONTINUE
}
}
else
{
if(jumpnum[id] < 3)
{
dojump[id] = true
jumpnum[id]++
return PLUGIN_CONTINUE
}
}
}
if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
{
jumpnum[id] = 0
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
 
public client_PostThink(id)
{
if(!is_user_alive(id)) return PLUGIN_CONTINUE
if(dojump[id] == true)
{
new Float:velocity[3]
entity_get_vector(id,EV_VEC_velocity,velocity)
velocity[2] = random_float(265.0,285.0)
entity_set_vector(id,EV_VEC_velocity,velocity)
dojump[id] = false
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
 
public ShowMenu(id)
{
new menu = menu_create("Auto bhop", "b_hand");
 
menu_additem(menu, "Igen", "", 0);
menu_additem(menu, "Nem", "", 0);
 
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
 
menu_display(id, menu, 0);
 
return PLUGIN_HANDLED;
}
 
public b_hand(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_cancel(id);
return PLUGIN_HANDLED;
}
 
new command[6], name[64], access, callback;
 
menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);
 
switch(item)
{
case 0: g_bhop[id] = true
case 1: g_bhop[id] = false
}
 
menu_destroy(menu);
 
return PLUGIN_HANDLED;
}
 
public fw_PlayerPreThink(id)
{
if(g_bhop[id] == true)
{
 
entity_set_float(id, EV_FL_fuser2, 0.0)
if (entity_get_int(id, EV_INT_button) & 2) {
new flags = entity_get_int(id, EV_INT_flags)
 
if (flags & FL_WATERJUMP)
return PLUGIN_CONTINUE
if ( entity_get_int(id, EV_INT_waterlevel) >= 2 )
return PLUGIN_CONTINUE
if ( !(flags & FL_ONGROUND) )
return PLUGIN_CONTINUE
 
new Float:velocity[3]
entity_get_vector(id, EV_VEC_velocity, velocity)
velocity[2] += 250.0
entity_set_vector(id, EV_VEC_velocity, velocity)
 
entity_set_int(id, EV_INT_gaitsequence, 6)
}
}
return PLUGIN_CONTINUE
}

Még annyi beleírál, hogy ha igenre megy akkor írja a chat-be hogy Bhop : on
Ha nem-re ment akkor Bhop : off


416. sor a igen oda írod amit akarsz :) -->
SMA Forráskód: [ Mindet kijelol ]
  1. ColorChat(id, RED, "Bhopp On!")

417. sor meg a nem -->
SMA Forráskód: [ Mindet kijelol ]
  1. ColorChat(id, RED, "Bhopp Off!")

_________________
Kép
http://www.klanhaboru.hu/ Gyere játssz!!! világ 28-ban vagyok.


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: BHOP MENÜ & Multijump
HozzászólásElküldve: 2015.01.17. 22:00 
Offline
Nagyúr

Csatlakozott: 2014.05.10. 16:41
Hozzászólások: 721
Megköszönt másnak: 43 alkalommal
Megköszönték neki: 64 alkalommal
SMA Forráskód: [ Mindet kijelol ]
  1. case 0: g_bhop[id] = true
  2. case 1: g_bhop[id] = false
idee


Hozzászólás jelentése
Vissza a tetejére
   
Hozzászólások megjelenítése:  Rendezés  
Új téma nyitása  Hozzászólás a témához  [ 9 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 35 vendég


Nyithatsz új témákat ebben a fórumban.
Válaszolhatsz egy témára ebben a fórumban.
Nem szerkesztheted a hozzászólásaidat ebben a fórumban.
Nem törölheted a hozzászólásaidat ebben a fórumban.
Nem küldhetsz csatolmányokat ebben a fórumban.

Keresés:
Ugrás:  
Powered by phpBB® Forum Software © phpBB Limited
Magyar fordítás © Magyar phpBB Közösség
Portal: Kiss Portal Extension © Michael O'Toole