HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <cstrike>
  4. #include <fun>
  5. #include <fakemeta_util>
  6. #include <fakemeta>
  7. #include <colorchat>
  8.  
  9. new ibekapcsol_off
  10.  
  11. public plugin_precache()
  12. {
  13. precache_model("models/penz_modell/dollar.mdl")
  14. precache_model("models/penz_modell/lada.mdl")
  15. }
  16. public plugin_init()
  17. {
  18. register_plugin("HoltTest Penz Drop", "1.2", "6almasok")
  19.  
  20. ibekapcsol_off = register_cvar( "holttestben_penz", "1" );
  21.  
  22. register_forward( FM_Touch,"felszedve" );
  23. register_forward( FM_Touch,"aranylada" );
  24. register_event( "DeathMsg","loovee","a" );
  25. register_logevent( "eltuntetes", 2, "1=Round_Start" );
  26. register_logevent( "nincslada", 2, "1=Round_Start" );
  27.  
  28. }
  29. public loovee()
  30. {
  31. if(get_pcvar_num(ibekapcsol_off) == 0)
  32. {
  33. return PLUGIN_HANDLED;
  34. }
  35.  
  36. switch(random_num(1,15))
  37. {
  38. case 1:
  39. {
  40. new victim = read_data( 2 );
  41.  
  42. static Float:origin[ 3 ];
  43. pev( victim, pev_origin, origin );
  44.  
  45. new ent = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) );
  46. origin[ 2 ] -= 36;
  47. engfunc( EngFunc_SetOrigin, ent, origin );
  48.  
  49. if( !pev_valid( ent ) )
  50. {
  51. return PLUGIN_HANDLED;
  52. }
  53.  
  54. set_pev( ent, pev_classname, "penzss" ),engfunc( EngFunc_SetModel, ent, "models/penz_modell/dollar.mdl" ),dllfunc( DLLFunc_Spawn, ent ),set_pev( ent, pev_solid, SOLID_BBOX ),set_pev( ent, pev_movetype, MOVETYPE_NONE ),engfunc( EngFunc_SetSize, ent, Float:{-23.160000, -13.660000, -0.050000}, Float:{11.470000, 12.780000, 6.720000} ),engfunc( EngFunc_DropToFloor, ent )
  55. }
  56. case 2:
  57. {
  58. new victim = read_data( 2 );
  59.  
  60. static Float:origin[ 3 ];
  61. pev( victim, pev_origin, origin );
  62.  
  63. new ent = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) );
  64. origin[ 2 ] -= 36;
  65. engfunc( EngFunc_SetOrigin, ent, origin );
  66.  
  67. if( !pev_valid( ent ) )
  68. {
  69. return PLUGIN_HANDLED;
  70. }
  71. set_pev( ent, pev_classname, "ladass" );
  72. engfunc( EngFunc_SetModel, ent, "models/penz_modell/lada.mdl" );
  73. dllfunc( DLLFunc_Spawn, ent );
  74. set_pev( ent, pev_solid, SOLID_BBOX );
  75. set_pev( ent, pev_movetype, MOVETYPE_NONE );
  76. engfunc( EngFunc_SetSize, ent, Float:{-23.160000, -13.660000, -0.050000}, Float:{11.470000, 12.780000, 6.720000} );
  77. engfunc( EngFunc_DropToFloor, ent );
  78. }
  79. case 3:
  80. {
  81. new victim = read_data( 2 );
  82.  
  83. static Float:origin[ 3 ];
  84. pev( victim, pev_origin, origin );
  85.  
  86. new ent = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) );
  87. origin[ 2 ] -= 36;
  88. engfunc( EngFunc_SetOrigin, ent, origin );
  89.  
  90. if( !pev_valid( ent ) )
  91. {
  92. return PLUGIN_HANDLED;
  93. }
  94.  
  95. set_pev( ent, pev_classname, "penzss" ),engfunc( EngFunc_SetModel, ent, "models/penz_modell/dollar.mdl" ),dllfunc( DLLFunc_Spawn, ent ),set_pev( ent, pev_solid, SOLID_BBOX ),set_pev( ent, pev_movetype, MOVETYPE_NONE ),engfunc( EngFunc_SetSize, ent, Float:{-23.160000, -13.660000, -0.050000}, Float:{11.470000, 12.780000, 6.720000} ),engfunc( EngFunc_DropToFloor, ent )
  96. }
  97. case 4:
  98. {
  99. new victim = read_data( 2 );
  100.  
  101. static Float:origin[ 3 ];
  102. pev( victim, pev_origin, origin );
  103.  
  104. new ent = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) );
  105. origin[ 2 ] -= 36;
  106. engfunc( EngFunc_SetOrigin, ent, origin );
  107.  
  108. if( !pev_valid( ent ) )
  109. {
  110. return PLUGIN_HANDLED;
  111. }
  112.  
  113. set_pev( ent, pev_classname, "penzss" ),engfunc( EngFunc_SetModel, ent, "models/penz_modell/dollar.mdl" ),dllfunc( DLLFunc_Spawn, ent ),set_pev( ent, pev_solid, SOLID_BBOX ),set_pev( ent, pev_movetype, MOVETYPE_NONE ),engfunc( EngFunc_SetSize, ent, Float:{-23.160000, -13.660000, -0.050000}, Float:{11.470000, 12.780000, 6.720000} ),engfunc( EngFunc_DropToFloor, ent )
  114. }
  115. case 5:
  116. {
  117. new victim = read_data( 2 );
  118.  
  119. static Float:origin[ 3 ];
  120. pev( victim, pev_origin, origin );
  121.  
  122. new ent = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) );
  123. origin[ 2 ] -= 36;
  124. engfunc( EngFunc_SetOrigin, ent, origin );
  125.  
  126. if( !pev_valid( ent ) )
  127. {
  128. return PLUGIN_HANDLED;
  129. }
  130.  
  131. set_pev( ent, pev_classname, "penzss" ),engfunc( EngFunc_SetModel, ent, "models/penz_modell/dollar.mdl" ),dllfunc( DLLFunc_Spawn, ent ),set_pev( ent, pev_solid, SOLID_BBOX ),set_pev( ent, pev_movetype, MOVETYPE_NONE ),engfunc( EngFunc_SetSize, ent, Float:{-23.160000, -13.660000, -0.050000}, Float:{11.470000, 12.780000, 6.720000} ),engfunc( EngFunc_DropToFloor, ent )
  132. }
  133. case 6:
  134. {
  135. new victim = read_data( 2 );
  136.  
  137. static Float:origin[ 3 ];
  138. pev( victim, pev_origin, origin );
  139.  
  140. new ent = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) );
  141. origin[ 2 ] -= 36;
  142. engfunc( EngFunc_SetOrigin, ent, origin );
  143.  
  144. if( !pev_valid( ent ) )
  145. {
  146. return PLUGIN_HANDLED;
  147. }
  148.  
  149. set_pev( ent, pev_classname, "penzss" ),engfunc( EngFunc_SetModel, ent, "models/penz_modell/dollar.mdl" ),dllfunc( DLLFunc_Spawn, ent ),set_pev( ent, pev_solid, SOLID_BBOX ),set_pev( ent, pev_movetype, MOVETYPE_NONE ),engfunc( EngFunc_SetSize, ent, Float:{-23.160000, -13.660000, -0.050000}, Float:{11.470000, 12.780000, 6.720000} ),engfunc( EngFunc_DropToFloor, ent )
  150. }
  151. case 7:
  152. {
  153. new victim = read_data( 2 );
  154.  
  155. static Float:origin[ 3 ];
  156. pev( victim, pev_origin, origin );
  157.  
  158. new ent = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) );
  159. origin[ 2 ] -= 36;
  160. engfunc( EngFunc_SetOrigin, ent, origin );
  161.  
  162. if( !pev_valid( ent ) )
  163. {
  164. return PLUGIN_HANDLED;
  165. }
  166.  
  167. set_pev( ent, pev_classname, "penzss" ),engfunc( EngFunc_SetModel, ent, "models/penz_modell/dollar.mdl" ),dllfunc( DLLFunc_Spawn, ent ),set_pev( ent, pev_solid, SOLID_BBOX ),set_pev( ent, pev_movetype, MOVETYPE_NONE ),engfunc( EngFunc_SetSize, ent, Float:{-23.160000, -13.660000, -0.050000}, Float:{11.470000, 12.780000, 6.720000} ),engfunc( EngFunc_DropToFloor, ent )
  168. }
  169. case 8:
  170. {
  171. new victim = read_data( 2 );
  172.  
  173. static Float:origin[ 3 ];
  174. pev( victim, pev_origin, origin );
  175.  
  176. new ent = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) );
  177. origin[ 2 ] -= 36;
  178. engfunc( EngFunc_SetOrigin, ent, origin );
  179.  
  180. if( !pev_valid( ent ) )
  181. {
  182. return PLUGIN_HANDLED;
  183. }
  184.  
  185. set_pev( ent, pev_classname, "penzss" ),engfunc( EngFunc_SetModel, ent, "models/penz_modell/dollar.mdl" ),dllfunc( DLLFunc_Spawn, ent ),set_pev( ent, pev_solid, SOLID_BBOX ),set_pev( ent, pev_movetype, MOVETYPE_NONE ),engfunc( EngFunc_SetSize, ent, Float:{-23.160000, -13.660000, -0.050000}, Float:{11.470000, 12.780000, 6.720000} ),engfunc( EngFunc_DropToFloor, ent )
  186. }
  187. case 9:
  188. {
  189. new victim = read_data( 2 );
  190.  
  191. static Float:origin[ 3 ];
  192. pev( victim, pev_origin, origin );
  193.  
  194. new ent = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) );
  195. origin[ 2 ] -= 36;
  196. engfunc( EngFunc_SetOrigin, ent, origin );
  197.  
  198. if( !pev_valid( ent ) )
  199. {
  200. return PLUGIN_HANDLED;
  201. }
  202.  
  203. set_pev( ent, pev_classname, "penzss" ),engfunc( EngFunc_SetModel, ent, "models/penz_modell/dollar.mdl" ),dllfunc( DLLFunc_Spawn, ent ),set_pev( ent, pev_solid, SOLID_BBOX ),set_pev( ent, pev_movetype, MOVETYPE_NONE ),engfunc( EngFunc_SetSize, ent, Float:{-23.160000, -13.660000, -0.050000}, Float:{11.470000, 12.780000, 6.720000} ),engfunc( EngFunc_DropToFloor, ent )
  204. }
  205. case 10:
  206. {
  207. new victim = read_data( 2 );
  208.  
  209. static Float:origin[ 3 ];
  210. pev( victim, pev_origin, origin );
  211.  
  212. new ent = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) );
  213. origin[ 2 ] -= 36;
  214. engfunc( EngFunc_SetOrigin, ent, origin );
  215.  
  216. if( !pev_valid( ent ) )
  217. {
  218. return PLUGIN_HANDLED;
  219. }
  220.  
  221. set_pev( ent, pev_classname, "penzss" ),engfunc( EngFunc_SetModel, ent, "models/penz_modell/dollar.mdl" ),dllfunc( DLLFunc_Spawn, ent ),set_pev( ent, pev_solid, SOLID_BBOX ),set_pev( ent, pev_movetype, MOVETYPE_NONE ),engfunc( EngFunc_SetSize, ent, Float:{-23.160000, -13.660000, -0.050000}, Float:{11.470000, 12.780000, 6.720000} ),engfunc( EngFunc_DropToFloor, ent )
  222. }
  223. case 11:
  224. {
  225. new victim = read_data( 2 );
  226.  
  227. static Float:origin[ 3 ];
  228. pev( victim, pev_origin, origin );
  229.  
  230. new ent = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) );
  231. origin[ 2 ] -= 36;
  232. engfunc( EngFunc_SetOrigin, ent, origin );
  233.  
  234. if( !pev_valid( ent ) )
  235. {
  236. return PLUGIN_HANDLED;
  237. }
  238.  
  239. set_pev( ent, pev_classname, "penzss" ),engfunc( EngFunc_SetModel, ent, "models/penz_modell/dollar.mdl" ),dllfunc( DLLFunc_Spawn, ent ),set_pev( ent, pev_solid, SOLID_BBOX ),set_pev( ent, pev_movetype, MOVETYPE_NONE ),engfunc( EngFunc_SetSize, ent, Float:{-23.160000, -13.660000, -0.050000}, Float:{11.470000, 12.780000, 6.720000} ),engfunc( EngFunc_DropToFloor, ent )
  240. }
  241. case 12:
  242. {
  243. new victim = read_data( 2 );
  244.  
  245. static Float:origin[ 3 ];
  246. pev( victim, pev_origin, origin );
  247.  
  248. new ent = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) );
  249. origin[ 2 ] -= 36;
  250. engfunc( EngFunc_SetOrigin, ent, origin );
  251.  
  252. if( !pev_valid( ent ) )
  253. {
  254. return PLUGIN_HANDLED;
  255. }
  256.  
  257. set_pev( ent, pev_classname, "penzss" ),engfunc( EngFunc_SetModel, ent, "models/penz_modell/dollar.mdl" ),dllfunc( DLLFunc_Spawn, ent ),set_pev( ent, pev_solid, SOLID_BBOX ),set_pev( ent, pev_movetype, MOVETYPE_NONE ),engfunc( EngFunc_SetSize, ent, Float:{-23.160000, -13.660000, -0.050000}, Float:{11.470000, 12.780000, 6.720000} ),engfunc( EngFunc_DropToFloor, ent )
  258. }
  259. case 13:
  260. {
  261. new victim = read_data( 2 );
  262.  
  263. static Float:origin[ 3 ];
  264. pev( victim, pev_origin, origin );
  265.  
  266. new ent = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) );
  267. origin[ 2 ] -= 36;
  268. engfunc( EngFunc_SetOrigin, ent, origin );
  269.  
  270. if( !pev_valid( ent ) )
  271. {
  272. return PLUGIN_HANDLED;
  273. }
  274.  
  275. set_pev( ent, pev_classname, "penzss" ),engfunc( EngFunc_SetModel, ent, "models/penz_modell/dollar.mdl" ),dllfunc( DLLFunc_Spawn, ent ),set_pev( ent, pev_solid, SOLID_BBOX ),set_pev( ent, pev_movetype, MOVETYPE_NONE ),engfunc( EngFunc_SetSize, ent, Float:{-23.160000, -13.660000, -0.050000}, Float:{11.470000, 12.780000, 6.720000} ),engfunc( EngFunc_DropToFloor, ent )
  276. }
  277. case 14:
  278. {
  279. new victim = read_data( 2 );
  280.  
  281. static Float:origin[ 3 ];
  282. pev( victim, pev_origin, origin );
  283.  
  284. new ent = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) );
  285. origin[ 2 ] -= 36;
  286. engfunc( EngFunc_SetOrigin, ent, origin );
  287.  
  288. if( !pev_valid( ent ) )
  289. {
  290. return PLUGIN_HANDLED;
  291. }
  292.  
  293. set_pev( ent, pev_classname, "penzss" ),engfunc( EngFunc_SetModel, ent, "models/penz_modell/dollar.mdl" ),dllfunc( DLLFunc_Spawn, ent ),set_pev( ent, pev_solid, SOLID_BBOX ),set_pev( ent, pev_movetype, MOVETYPE_NONE ),engfunc( EngFunc_SetSize, ent, Float:{-23.160000, -13.660000, -0.050000}, Float:{11.470000, 12.780000, 6.720000} ),engfunc( EngFunc_DropToFloor, ent )
  294. }
  295. case 15:
  296. {
  297. new victim = read_data( 2 );
  298.  
  299. static Float:origin[ 3 ];
  300. pev( victim, pev_origin, origin );
  301.  
  302. new ent = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) );
  303. origin[ 2 ] -= 36;
  304. engfunc( EngFunc_SetOrigin, ent, origin );
  305.  
  306. if( !pev_valid( ent ) )
  307. {
  308. return PLUGIN_HANDLED;
  309. }
  310.  
  311. set_pev( ent, pev_classname, "penzss" ),engfunc( EngFunc_SetModel, ent, "models/penz_modell/dollar.mdl" ),dllfunc( DLLFunc_Spawn, ent ),set_pev( ent, pev_solid, SOLID_BBOX ),set_pev( ent, pev_movetype, MOVETYPE_NONE ),engfunc( EngFunc_SetSize, ent, Float:{-23.160000, -13.660000, -0.050000}, Float:{11.470000, 12.780000, 6.720000} ),engfunc( EngFunc_DropToFloor, ent )
  312. }
  313. }
  314. return PLUGIN_CONTINUE
  315. }
  316. public aranylada(ent,id)
  317. {
  318. new egyns[ 32 ];
  319. pev(ent,pev_classname,egyns,charsmax(egyns));
  320.  
  321. if(get_pcvar_num(ibekapcsol_off) == 0)
  322. {
  323. return PLUGIN_HANDLED;
  324. }
  325.  
  326. if( !equal( egyns, "ladass" ) )
  327. {
  328. return FMRES_IGNORED;
  329. }
  330.  
  331. switch(1)
  332. {
  333. case 1:
  334. {
  335. new nev[32]
  336. get_user_name(id, nev, 31)
  337. new penzran = random_num(5000,10000)
  338. cs_set_user_money(id, cs_get_user_money(id)+penzran)
  339. ColorChat(id, GREEN, "^1[^4Lada Drop^1] Szep munka ^3%s^1! Talaltal egy ^4Kincses Lada^1t amiben volt ^4+%i^3$^1!",nev,penzran);
  340. }
  341. }
  342.  
  343. engfunc( EngFunc_RemoveEntity, ent );
  344. return FMRES_IGNORED
  345. }
  346. public felszedve( ent, id )
  347. {
  348. if(get_pcvar_num(ibekapcsol_off) == 0)
  349. {
  350. return PLUGIN_HANDLED;
  351. }
  352.  
  353. new egynes[ 32 ];
  354. pev( ent, pev_classname, egynes, charsmax( egynes ) );
  355.  
  356. if( !equal( egynes, "penzss" ) )
  357. {
  358. return FMRES_IGNORED;
  359. }
  360.  
  361. switch(random_num(1,7))
  362. {
  363. case 1:
  364. {
  365. new penzran = random_num(500,1000)
  366. cs_set_user_money(id, cs_get_user_money(id)+penzran)
  367. ColorChat(id, GREEN, "^3[^4HoltTest Drop^3] ^1Atkutattad a halottat es talaltal benne ^4+%i^3$^1-t.",penzran);
  368. }
  369. case 2:
  370. {
  371. new penzran = random_num(100,550)
  372. cs_set_user_money(id, cs_get_user_money(id)+penzran)
  373. ColorChat(id, GREEN, "^3[^4HoltTest Drop^3] ^1Atkutattad a halottat es talaltal benne ^4+%i^3$^1-t.",penzran);
  374. }
  375. case 3:
  376. {
  377. new penzran = random_num(300,900)
  378. cs_set_user_money(id, cs_get_user_money(id)-penzran)
  379. ColorChat(id, GREEN, "^3[^4HoltTest Drop^3] ^1Atkutattad a halottat es a faradozasba vesztettel ^4-%i^3$^1-t.",penzran);
  380. }
  381. case 4:
  382. {
  383. cs_set_user_money(id, 0)
  384. ColorChat(id, GREEN, "^3[^4HoltTest Drop^3] ^1Sajnos mig keresgeltel addig valaki ellopta az ^3OSSZES ^1penzed!");
  385. }
  386. case 5:
  387. {
  388. new nev[32]
  389. get_user_name(id, nev, 31)
  390. cs_set_user_money(id, cs_get_user_money(id)+3000)
  391. ColorChat(id, GREEN, "^3[^4HoltTest Drop^3] ^1WOW ^3%s^1! Meg utotted a fonyeremeny. Talaltal ^4+3000^3$^1-t!",nev);
  392. }
  393. case 6:
  394. {
  395. new penzran = random_num(400,600)
  396. cs_set_user_money(id, cs_get_user_money(id)+penzran)
  397. ColorChat(id, GREEN, "^3[^4HoltTest Drop^3] ^1Atkutattad a halottat es talaltal benne ^4+%i^3$^1-t.",penzran);
  398. }
  399. case 7:
  400. {
  401. new penzran = random_num(500,800)
  402. cs_set_user_money(id, cs_get_user_money(id)-penzran)
  403. ColorChat(id, GREEN, "^3[^4HoltTest Drop^3] ^1Atkutattad a halottat es a faradozasba vesztettel ^4-%i^3$^1-t.",penzran);
  404. }
  405. }
  406.  
  407. engfunc( EngFunc_RemoveEntity, ent );
  408. return FMRES_IGNORED
  409. }
  410. public eltuntetes()
  411. {
  412. if(get_pcvar_num(ibekapcsol_off) == 0)
  413. {
  414. }
  415.  
  416. new pensehol = FM_NULLENT;
  417. while ( ( pensehol = fm_find_ent_by_class( pensehol, "penzss" ) ) )
  418. {
  419. engfunc( EngFunc_RemoveEntity, pensehol );
  420. }
  421. }
  422. public nincslada()
  423. {
  424. if(get_pcvar_num(ibekapcsol_off) == 0)
  425. {
  426. }
  427.  
  428. new ladasehol = FM_NULLENT;
  429. while ( ( ladasehol = fm_find_ent_by_class( ladasehol, "ladass" ) ) )
  430. {
  431. engfunc( EngFunc_RemoveEntity, ladasehol );
  432. }
  433. }
  434.