hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.03.29. 15:23



Jelenlévő felhasználók

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

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

Regisztrált felhasználók: nincs regisztrált felhasználó 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  [ 6 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Pontot írja hudba
HozzászólásElküldve: 2014.08.21. 17:59 
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 , meglehetne azt oldani hogy ebbe hogy az elérhető adminok alatt kiírja hogy jelenleg mennyi pontod van ?
És ha megölsz valaki ne hudba jelezze, hanem a chatbe .
Előre is köszönöm :)

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", "50");
  269. pMulti = register_cvar("ps_multi_cost", "100");
  270. pParac = register_cvar("ps_parac_cost", "50");
  271. pVIP = register_cvar("ps_vip_cost", "800");
  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ás témája: Re: Pontot írja hudba
HozzászólásElküldve: 2014.08.21. 20:20 
Offline
Nagyúr
Avatar

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

_________________
My Steam:
KépKép

Ők köszönték meg Golo nek ezt a hozzászólást: FoReSt-TeA (2014.08.21. 21:08)
  Népszerűség: 2.27%


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Pontot írja hudba
HozzászólásElküldve: 2014.08.21. 21:25 
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
Nem ment :?

_________________
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ás témája: Re: Pontot írja hudba
HozzászólásElküldve: 2014.08.21. 21:27 
Offline
Nagyúr
Avatar

Csatlakozott: 2013.09.04. 15:21
Hozzászólások: 635
Megköszönt másnak: 1 alkalommal
Megköszönték neki: 141 alkalommal
Mi volt a hiba?

_________________
My Steam:
KépKép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Pontot írja hudba
HozzászólásElküldve: 2014.08.21. 21:29 
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
Nem tudom egyszerűen csak nem menti el a pontokat ...

_________________
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ás témája: Re: Pontot írja hudba
HozzászólásElküldve: 2014.08.21. 21:31 
Offline
Nagyúr
Avatar

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

_________________
My Steam:
KépKép

Ők köszönték meg Golo nek ezt a hozzászólást: FoReSt-TeA (2014.08.21. 21:33)
  Népszerűség: 2.27%


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


Ki van itt

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