hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.04.27. 07:59



Jelenlévő felhasználók

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

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

Regisztrált felhasználók: Majestic-12 [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  [ 1 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Pont bolt +cucc
HozzászólásElküldve: 2014.08.21. 14:28 
Offline
Beavatott
Avatar

Csatlakozott: 2014.07.30. 13:35
Hozzászólások: 77
Megköszönt másnak: 15 alkalommal
Megköszönték neki: 9 alkalommal
Hello ebben hol tudom a vipet állítani ? hanyadik sor ?
Most a bunnyhopp 1 körre szól ? Mivel ha nem akkor azt is át kellene írni :roll:

Amit még kikéne szedni :
- Dupla Ugrás
- Ejtőernyő

Amit még bekéne rakni :
- +10Hp ( ez használatonként ad csak )
- +Gyorsaság ( ez 1 körre )
- +Gravity ( ez 1 körre )
- +1találat-1ölés ( ez 1 körre )

SMA Forráskód: [ Mindet kijelol ]
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <amxmisc>
  5. #include <fun>
  6. #include <engine>
  7. #include <cstrike>
  8. #include <nvault>
  9.  
  10. #define PLUGIN "New Plug-In"
  11. #define VERSION "1.0"
  12. #define AUTHOR "Rendszergazda"
  13.  
  14. #define PARACHUTE_LEVEL ADMIN_ALL
  15.  
  16. #define FL_WATERJUMP (1<<11)
  17. #define FL_ONGROUND (1<<9)
  18.  
  19. new points[33];
  20.  
  21. new pBunny, pMulti, pParac, pVIP
  22.  
  23. new gBunny[33], gMulti[33], gVIP[33];
  24.  
  25. new g_vault
  26. new jumpnum[33] = 0
  27. new bool:dojump[33] = false
  28.  
  29.  
  30. new has_parachute[33]
  31. new para_ent[33]
  32. new gCStrike = 0
  33. new pDetach, pFallSpeed, pEnabled;
  34.  
  35. public client_connect(id)
  36. {
  37. LoadInformation(id);
  38. if(gVIP[id])
  39. {
  40. gBunny[id] = true; gMulti[id] = true; has_parachute[id] = true;
  41. }
  42. }
  43.  
  44. public client_disconnect(id)
  45. {
  46. SaveInformation(id);
  47. }
  48. public client_PreThink(id)
  49. {
  50. bunny(id);
  51. multi(id);
  52. parac(id);
  53. }
  54.  
  55. public parac(id)
  56. {
  57. if (!get_pcvar_num(pEnabled)) return
  58. if (!is_user_alive(id) || !has_parachute[id]) return
  59.  
  60. new Float:fallspeed = get_pcvar_float(pFallSpeed) * -1.0
  61. new Float:frame
  62.  
  63. new button = get_user_button(id)
  64. new oldbutton = get_user_oldbutton(id)
  65. new flags = get_entity_flags(id)
  66.  
  67. if (para_ent[id] > 0 && (flags & FL_ONGROUND)) {
  68.  
  69. if (get_pcvar_num(pDetach)) {
  70.  
  71. if (get_user_gravity(id) == 0.1) set_user_gravity(id, 1.0)
  72.  
  73. if (entity_get_int(para_ent[id],EV_INT_sequence) != 2) {
  74. entity_set_int(para_ent[id], EV_INT_sequence, 2)
  75. entity_set_int(para_ent[id], EV_INT_gaitsequence, 1)
  76. entity_set_float(para_ent[id], EV_FL_frame, 0.0)
  77. entity_set_float(para_ent[id], EV_FL_fuser1, 0.0)
  78. entity_set_float(para_ent[id], EV_FL_animtime, 0.0)
  79. entity_set_float(para_ent[id], EV_FL_framerate, 0.0)
  80. return
  81. }
  82.  
  83. frame = entity_get_float(para_ent[id],EV_FL_fuser1) + 2.0
  84. entity_set_float(para_ent[id],EV_FL_fuser1,frame)
  85. entity_set_float(para_ent[id],EV_FL_frame,frame)
  86.  
  87. if (frame > 254.0) {
  88. remove_entity(para_ent[id])
  89. para_ent[id] = 0
  90. }
  91. }
  92. else {
  93. remove_entity(para_ent[id])
  94. set_user_gravity(id, 1.0)
  95. para_ent[id] = 0
  96. }
  97.  
  98. return
  99. }
  100.  
  101. if (button & IN_USE) {
  102.  
  103. new Float:velocity[3]
  104. entity_get_vector(id, EV_VEC_velocity, velocity)
  105.  
  106. if (velocity[2] < 0.0) {
  107.  
  108. if(para_ent[id] <= 0) {
  109. para_ent[id] = create_entity("info_target")
  110. if(para_ent[id] > 0) {
  111. entity_set_string(para_ent[id],EV_SZ_classname,"parachute")
  112. entity_set_edict(para_ent[id], EV_ENT_aiment, id)
  113. entity_set_edict(para_ent[id], EV_ENT_owner, id)
  114. entity_set_int(para_ent[id], EV_INT_movetype, MOVETYPE_FOLLOW)
  115. entity_set_model(para_ent[id], "models/parachute.mdl")
  116. entity_set_int(para_ent[id], EV_INT_sequence, 0)
  117. entity_set_int(para_ent[id], EV_INT_gaitsequence, 1)
  118. entity_set_float(para_ent[id], EV_FL_frame, 0.0)
  119. entity_set_float(para_ent[id], EV_FL_fuser1, 0.0)
  120. }
  121. }
  122.  
  123. if (para_ent[id] > 0) {
  124.  
  125. entity_set_int(id, EV_INT_sequence, 3)
  126. entity_set_int(id, EV_INT_gaitsequence, 1)
  127. entity_set_float(id, EV_FL_frame, 1.0)
  128. entity_set_float(id, EV_FL_framerate, 1.0)
  129. set_user_gravity(id, 0.1)
  130.  
  131. velocity[2] = (velocity[2] + 40.0 < fallspeed) ? velocity[2] + 40.0 : fallspeed
  132. entity_set_vector(id, EV_VEC_velocity, velocity)
  133.  
  134. if (entity_get_int(para_ent[id],EV_INT_sequence) == 0) {
  135.  
  136. frame = entity_get_float(para_ent[id],EV_FL_fuser1) + 1.0
  137. entity_set_float(para_ent[id],EV_FL_fuser1,frame)
  138. entity_set_float(para_ent[id],EV_FL_frame,frame)
  139.  
  140. if (frame > 100.0) {
  141. entity_set_float(para_ent[id], EV_FL_animtime, 0.0)
  142. entity_set_float(para_ent[id], EV_FL_framerate, 0.4)
  143. entity_set_int(para_ent[id], EV_INT_sequence, 1)
  144. entity_set_int(para_ent[id], EV_INT_gaitsequence, 1)
  145. entity_set_float(para_ent[id], EV_FL_frame, 0.0)
  146. entity_set_float(para_ent[id], EV_FL_fuser1, 0.0)
  147. }
  148. }
  149. }
  150. }
  151. else if (para_ent[id] > 0) {
  152. remove_entity(para_ent[id])
  153. set_user_gravity(id, 1.0)
  154. para_ent[id] = 0
  155. }
  156. }
  157. else if ((oldbutton & IN_USE) && para_ent[id] > 0 ) {
  158. remove_entity(para_ent[id])
  159. set_user_gravity(id, 1.0)
  160. para_ent[id] = 0
  161. }
  162. }
  163.  
  164. public multi(id)
  165. {
  166. if(!is_user_alive(id) && !gMulti[id]) return PLUGIN_CONTINUE
  167. new nbut = get_user_button(id)
  168. new obut = get_user_oldbutton(id)
  169. if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
  170. {
  171. if(jumpnum[id] < 1)
  172. {
  173. dojump[id] = true
  174. jumpnum[id]++
  175. return PLUGIN_CONTINUE
  176. }
  177. }
  178. if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
  179. {
  180. jumpnum[id] = 0
  181. return PLUGIN_CONTINUE
  182. }
  183. return PLUGIN_CONTINUE
  184. }
  185.  
  186. public client_PostThink(id)
  187. {
  188. if(!is_user_alive(id) && !gMulti[id]) return PLUGIN_CONTINUE
  189. if(dojump[id] == true)
  190. {
  191. new Float:velocity[3]
  192. entity_get_vector(id,EV_VEC_velocity,velocity)
  193. velocity[2] = random_float(265.0,285.0)
  194. entity_set_vector(id,EV_VEC_velocity,velocity)
  195. dojump[id] = false
  196. return PLUGIN_CONTINUE
  197. }
  198. return PLUGIN_CONTINUE
  199. }
  200.  
  201.  
  202. public bunny(id)
  203. {
  204. if (!gBunny[id])
  205. return PLUGIN_CONTINUE
  206.  
  207. entity_set_float(id, EV_FL_fuser2, 0.0)
  208.  
  209. if (!gBunny[id])
  210. return PLUGIN_CONTINUE
  211. if (entity_get_int(id, EV_INT_button) & 2)
  212. {
  213. new flags = entity_get_int(id, EV_INT_flags)
  214.  
  215. if (flags & FL_WATERJUMP)
  216. return PLUGIN_CONTINUE
  217. if ( entity_get_int(id, EV_INT_waterlevel) >= 2 )
  218. return PLUGIN_CONTINUE
  219. if ( !(flags & FL_ONGROUND) )
  220. return PLUGIN_CONTINUE
  221.  
  222. new Float:velocity[3]
  223. entity_get_vector(id, EV_VEC_velocity, velocity)
  224. velocity[2] += 250.0
  225. entity_set_vector(id, EV_VEC_velocity, velocity)
  226.  
  227. entity_set_int(id, EV_INT_gaitsequence, 6)
  228. }
  229. return PLUGIN_CONTINUE
  230. }
  231.  
  232. public plugin_natives()
  233. {
  234. set_module_filter("module_filter")
  235. set_native_filter("native_filter")
  236. }
  237.  
  238. public module_filter(const module[])
  239. {
  240. if (!cstrike_running() && equali(module, "cstrike")) {
  241. return PLUGIN_HANDLED
  242. }
  243.  
  244. return PLUGIN_CONTINUE
  245. }
  246.  
  247. public native_filter(const name[], index, trap)
  248. {
  249. if (!trap) return PLUGIN_HANDLED
  250.  
  251. return PLUGIN_CONTINUE
  252. }
  253.  
  254. public plugin_precache()
  255. {
  256. precache_model("models/parachute.mdl")
  257. }
  258.  
  259.  
  260. public plugin_init() {
  261. register_plugin(PLUGIN, VERSION, AUTHOR);
  262. register_event("DeathMsg", "onDeath", "a", "1>0");
  263. register_clcmd("say /menu", "menu");
  264. register_clcmd("say_team /menu", "menu");
  265. register_clcmd("/menu", "menu");
  266. register_clcmd("menu", "menu");
  267.  
  268. pBunny = register_cvar("ps_bunny_cost", "300");
  269. pMulti = register_cvar("ps_multi_cost", "10");
  270. pParac = register_cvar("ps_parac_cost", "10");
  271. pVIP = register_cvar("ps_vip_cost", "2000");
  272.  
  273.  
  274. pEnabled = register_cvar("sv_parachute", "1" )
  275. pFallSpeed = register_cvar("parachute_fallspeed", "100")
  276. pDetach = register_cvar("parachute_detach", "1")
  277.  
  278. if (gCStrike)
  279. {
  280.  
  281. register_concmd("amx_parachute", "admin_give_parachute", PARACHUTE_LEVEL, "<nick, #userid or @team>" )
  282. }
  283.  
  284.  
  285. }
  286.  
  287. public onDeath()
  288. {
  289. new killer = read_data(1);
  290. new victim = read_data(2);
  291. if(killer != victim)
  292. {
  293. points[killer]++
  294. set_hudmessage(0, 255, 0, 0.05, 0.88, 2, 6.0, 12.0)
  295. show_hudmessage(killer, "Kaptal 1 pontot! Menuhoz ird be, hogy /menu.")
  296. }
  297. }
  298.  
  299. public menu(id)
  300. {
  301. new menu = menu_create("Valassz targyat!", "handler");
  302. menu_additem(menu, "Bunnyhop", "0", 0);
  303. menu_additem(menu, "Dupla ugras", "1", 0);
  304. menu_additem(menu, "Ejtoernyo", "2", 0);
  305. menu_additem(menu, "*V.I.P.*", "3", 0);
  306. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
  307. menu_display(id, menu);
  308. }
  309.  
  310. public handler(id, menu, item)
  311. {
  312. if(item == MENU_EXIT)
  313. {
  314. menu_destroy(menu);
  315. }
  316. new szCommand[6] , szName[64]; new access , callback;
  317. menu_item_getinfo(menu , item , access , szCommand , 5 , szName , 63 , callback);
  318. new i = str_to_num(szCommand)
  319. switch(i)
  320. {
  321. case 0:
  322. {
  323. if(points[id] >= get_pcvar_num(pBunny))
  324. {
  325. gBunny[id] = true;
  326. cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(pBunny));
  327. }
  328. else
  329. {
  330. set_hudmessage(255, 0, 0, 0.30, 0.41, 1, 6.0, 4.0)
  331. show_hudmessage(id, "Nincs eleg penzed a vasarlashoz!")
  332. }
  333.  
  334. }
  335. case 1:
  336. {
  337. if(points[id] >= get_pcvar_num(pMulti))
  338. {
  339. gMulti[id] = true;
  340. cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(pMulti));
  341. }
  342. else
  343. {
  344. set_hudmessage(255, 0, 0, 0.30, 0.41, 1, 6.0, 4.0)
  345. show_hudmessage(id, "Nincs eleg penzed a vasarlashoz!")
  346. }
  347.  
  348. }
  349. case 2:
  350. {
  351. if(points[id] >= get_pcvar_num(pParac))
  352. {
  353. has_parachute[id] = true;
  354. cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(pParac));
  355. }
  356. else
  357. {
  358. set_hudmessage(255, 0, 0, 0.30, 0.41, 1, 6.0, 4.0)
  359. show_hudmessage(id, "Nincs eleg penzed a vasarlashoz!")
  360. }
  361.  
  362. }
  363. case 3:
  364. {
  365. if(points[id] >= get_pcvar_num(pVIP))
  366. {
  367. gVIP[id] = true;
  368. gBunny[id] = true; gMulti[id] = true; has_parachute[id] = true;
  369. cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(pVIP));
  370. }
  371. else
  372. {
  373. set_hudmessage(255, 0, 0, 0.30, 0.41, 1, 6.0, 4.0)
  374. show_hudmessage(id, "Nincs eleg penzed a vasarlashoz!")
  375. }
  376. }
  377. }
  378. }
  379. public LoadInformation(id)
  380. {
  381. new name[32]
  382.  
  383. get_user_name(id, name, 31)
  384.  
  385. new vaultkey[64],vaultdata[256]
  386.  
  387.  
  388. format(vaultkey,63,"%sPONTSYSTEM", name)
  389.  
  390. format(vaultdata,255,"%i#%i#%i#%i#", gBunny[id], gMulti[id], gVIP[id], has_parachute[id])
  391.  
  392.  
  393. nvault_get(g_vault,vaultkey,vaultdata,255)
  394.  
  395. replace_all(vaultdata, 255, "#", " ")
  396.  
  397. new nbunny[33], nmulti[33], nvip[33], nparac[33];
  398.  
  399. parse(vaultdata, nbunny, 32, nmulti, 32, nvip, 32, nparac, 32)
  400.  
  401. gBunny[id] = str_to_num(nbunny)
  402.  
  403. gMulti[id] = str_to_num(nmulti)
  404.  
  405. gVIP[id] = str_to_num(nvip)
  406.  
  407. has_parachute[id] = str_to_num(nparac)
  408.  
  409. return PLUGIN_CONTINUE
  410.  
  411. }
  412.  
  413. public SaveInformation(id)
  414. {
  415. new name[32]
  416. get_user_name(id, name, 31)
  417.  
  418. new vaultkey[64],vaultdata[256]
  419.  
  420. format(vaultkey,63,"%sPONTSYSTEM", name)
  421.  
  422. format(vaultdata,255,"%i#%i#%i#%i#", gBunny[id], gMulti[id], gVIP[id], has_parachute[id])
  423.  
  424.  
  425.  
  426. nvault_set(g_vault,vaultkey,vaultdata)
  427. return PLUGIN_CONTINUE
  428. }

_________________
SMA Forráskód: [ Mindet kijelol ]
  1.  Compilation aborted.
  2. 4 Errors.
  3. Done.
  4. ----->


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  [ 1 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 21 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