HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. //CS:S Goremod v5.3.2 by Joe 'DiscoBBQ' Maley:
  2.  
  3. //Fordította: BBk
  4.  
  5. //Terminate:
  6. #pragma semicolon 1
  7.  
  8. //Includes:
  9. #include <sourcemod>
  10. #include <sdktools>
  11.  
  12. //Overflow:
  13. static Float:PrethinkBuffer;
  14.  
  15. //Weapons:
  16. static String:CSWeapon[7][32] = {"m3", "xm1014", "hegrenade", "g3sg1", "sg550", "awp", "scout"};
  17.  
  18. //Convars:
  19. new Handle:hGibs;
  20. new Handle:hBleedingHp;
  21. new Handle:hBleedingFreq;
  22. new Handle:hImpactBlood;
  23. new Handle:hHeadshotBlood;
  24. new Handle:hDeathBlood;
  25.  
  26. //Misc:
  27. new BloodClient[2000];
  28.  
  29. //Information:
  30. public Plugin:myinfo =
  31. {
  32.  
  33. //Initialize:
  34. name = "Goremod",
  35. author = "Joe 'Pinkfairie' Maley",
  36. description = "Ver & alvadt ver hozzadasa a CS:S-hoz",
  37. version = "5.3.2",
  38. url = "hiimjoemaley@hotmail.com"
  39. }
  40.  
  41. //Parent to Dead Body:
  42. ParentToBody(Client, Particle, bool:Headshot = true)
  43. {
  44.  
  45. //Client:
  46. if(IsClientConnected(Client))
  47. {
  48.  
  49. //Declare:
  50. decl Body;
  51. decl String:tName[64], String:Classname[64], String:ModelPath[64];
  52.  
  53. //Initialize:
  54. Body = GetEntPropEnt(Client, Prop_Send, "m_hRagdoll");
  55.  
  56. //Edict:
  57. if(IsValidEdict(Body))
  58. {
  59.  
  60. //Target Name:
  61. Format(tName, sizeof(tName), "Body%d", Body);
  62.  
  63. //Find:
  64. GetEdictClassname(Body, Classname, sizeof(Classname));
  65.  
  66. //Model:
  67. GetClientModel(Client, ModelPath, 64);
  68.  
  69. //Body Exists:
  70. if(IsValidEntity(Body) && StrEqual(Classname, "cs_ragdoll", false))
  71. {
  72.  
  73. //Properties:
  74. DispatchKeyValue(Body, "targetname", tName);
  75. GetEntPropString(Body, Prop_Data, "m_iName", tName, sizeof(tName));
  76.  
  77. //Parent:
  78. SetVariantString(tName);
  79. AcceptEntityInput(Particle, "SetParent", Particle, Particle, 0);
  80. if(Headshot)
  81. {
  82.  
  83. //Work-Around:
  84. if(StrContains(ModelPath, "sas", false) != -1 || StrContains(ModelPath, "gsg", false) != -1)
  85. {
  86.  
  87. //Back:
  88. SetVariantString("primary");
  89. }
  90. else
  91. {
  92.  
  93. //Head:
  94. SetVariantString("forward");
  95. }
  96.  
  97. }
  98. else
  99. {
  100.  
  101. //Back:
  102. SetVariantString("primary");
  103. }
  104.  
  105. //Parent:
  106. AcceptEntityInput(Particle, "SetParentAttachment", Particle, Particle, 0);
  107. }
  108. }
  109. }
  110. }
  111.  
  112. //Write:
  113. WriteParticle(Ent, String:ParticleName[], bool:Death = false, bool:Headshot = false)
  114. {
  115.  
  116. //Declare:
  117. decl Particle;
  118. decl String:tName[64];
  119.  
  120. //Initialize:
  121. Particle = CreateEntityByName("info_particle_system");
  122.  
  123. //Validate:
  124. if(IsValidEdict(Particle))
  125. {
  126.  
  127. //Declare:
  128. decl Float:Position[3], Float:Angles[3];
  129.  
  130. //Initialize:
  131. Angles[0] = GetRandomFloat(0.0, 360.0);
  132. Angles[1] = GetRandomFloat(-15.0, 15.0);
  133. Angles[2] = GetRandomFloat(-15.0, 15.0);
  134.  
  135. //Origin:
  136. GetEntPropVector(Ent, Prop_Send, "m_vecOrigin", Position);
  137.  
  138. //Z Axis:f
  139. if(Death) Position[2] += GetRandomFloat(0.0, 5.0);
  140. else Position[2] += GetRandomFloat(15.0, 35.0);
  141.  
  142. //Send:
  143. TeleportEntity(Particle, Position, Angles, NULL_VECTOR);
  144.  
  145. //Target Name:
  146. Format(tName, sizeof(tName), "Entity%d", Ent);
  147. DispatchKeyValue(Ent, "targetname", tName);
  148. GetEntPropString(Ent, Prop_Data, "m_iName", tName, sizeof(tName));
  149.  
  150. //Properties:
  151. DispatchKeyValue(Particle, "targetname", "CSSParticle");
  152. DispatchKeyValue(Particle, "parentname", tName);
  153. DispatchKeyValue(Particle, "effect_name", ParticleName);
  154.  
  155. //Spawn:
  156. DispatchSpawn(Particle);
  157.  
  158. //Parent:
  159. if(Death)
  160. {
  161.  
  162. //Headshot:
  163. if(Headshot)
  164. ParentToBody(Ent, Particle);
  165. else
  166. ParentToBody(Ent, Particle, false);
  167. }
  168. else
  169. {
  170.  
  171. //Parent:
  172. SetVariantString(tName);
  173. AcceptEntityInput(Particle, "SetParent", Particle, Particle, 0);
  174. }
  175.  
  176. ActivateEntity(Particle);
  177. AcceptEntityInput(Particle, "start");
  178.  
  179. //Delete:
  180. CreateTimer(3.0, DeleteParticle, Particle);
  181. }
  182. }
  183.  
  184. //Delete:
  185. public Action:DeleteParticle(Handle:Timer, any:Particle)
  186. {
  187.  
  188. //Validate:
  189. if(IsValidEntity(Particle))
  190. {
  191.  
  192. //Declare:
  193. decl String:Classname[64];
  194.  
  195. //Initialize:
  196. GetEdictClassname(Particle, Classname, sizeof(Classname));
  197.  
  198. //Is a Particle:
  199. if(StrEqual(Classname, "info_particle_system", false))
  200. {
  201.  
  202. //Delete:
  203. RemoveEdict(Particle);
  204. }
  205. }
  206. }
  207.  
  208. //Decal:
  209. stock Decal(Client, Float:Direction[3], bool:Bleeding = false)
  210. {
  211.  
  212. //Declare:
  213. decl Blood;
  214. decl String:Angles[128];
  215.  
  216. //Format:
  217. Format(Angles, 128, "%f %f %f", Direction[0], Direction[1], Direction[2]);
  218.  
  219. //Blood:
  220. Blood = CreateEntityByName("env_blood");
  221.  
  222. //Create:
  223. if(IsValidEdict(Blood))
  224. {
  225.  
  226. //Spawn:
  227. DispatchSpawn(Blood);
  228.  
  229. //Properties:
  230. DispatchKeyValue(Blood, "color", "0");
  231. DispatchKeyValue(Blood, "amount", "1000");
  232. DispatchKeyValue(Blood, "spraydir", Angles);
  233. DispatchKeyValue(Blood, "spawnflags", "12");
  234.  
  235. //Timer:
  236. if(!Bleeding)
  237. {
  238.  
  239. //Save & Send:
  240. BloodClient[Blood] = Client;
  241. CreateTimer(GetRandomFloat(0.1, 1.0), EmitBlood, Blood);
  242. }
  243. else AcceptEntityInput(Blood, "EmitBlood", Client);
  244. }
  245.  
  246. //Detatch:
  247. if(Bleeding && IsValidEdict(Blood)) RemoveEdict(Blood);
  248. }
  249.  
  250. //Emit Blood:
  251. public Action:EmitBlood(Handle:Timer, any:Blood)
  252. {
  253.  
  254. //Emit:
  255. if(IsValidEdict(Blood) && IsClientConnected(BloodClient[Blood]))
  256. AcceptEntityInput(Blood, "EmitBlood", BloodClient[Blood]);
  257.  
  258. //Detatch:
  259. if(IsValidEdict(Blood))
  260. RemoveEdict(Blood);
  261. }
  262.  
  263. //Direction:
  264. stock CalculateDirection(Float:ClientOrigin[3], Float:AttackerOrigin[3], Float:Direction[3])
  265. {
  266.  
  267. //Declare:
  268. decl Float:RatioDiviser, Float:Diviser, Float:MaxCoord;
  269.  
  270. //X, Y, Z:
  271. Direction[0] = (ClientOrigin[0] - AttackerOrigin[0]) + GetRandomFloat(-25.0, 25.0);
  272. Direction[1] = (ClientOrigin[1] - AttackerOrigin[1]) + GetRandomFloat(-25.0, 25.0);
  273. Direction[2] = (GetRandomFloat(-125.0, -75.0));
  274.  
  275. //Greatest Coordinate:
  276. if(FloatAbs(Direction[0]) >= FloatAbs(Direction[1])) MaxCoord = FloatAbs(Direction[0]);
  277. else MaxCoord = FloatAbs(Direction[1]);
  278.  
  279. //Calculate:
  280. RatioDiviser = GetRandomFloat(100.0, 250.0);
  281. Diviser = MaxCoord / RatioDiviser;
  282. Direction[0] /= Diviser;
  283. Direction[1] /= Diviser;
  284.  
  285. //Close:
  286. return;
  287. }
  288.  
  289. //Gib:
  290. stock Gib(Float:Origin[3], Float:Direction[3], String:Model[])
  291. {
  292.  
  293. //Declare:
  294. decl Ent, Roll;
  295. decl Float:MaxEnts;
  296. decl Float:Velocity[3];
  297.  
  298. //Initialize:
  299. Ent = CreateEntityByName("prop_physics");
  300. MaxEnts = (0.9 * GetMaxEntities());
  301. Velocity[0] = Direction[0] * 400.0;
  302. Velocity[1] = Direction[0] * 400.0;
  303. Velocity[2] = Direction[0] * 400.0;
  304.  
  305. //Anti-Crash:
  306. if(Ent < MaxEnts)
  307. {
  308.  
  309. //Properties:
  310. DispatchKeyValue(Ent, "model", Model);
  311. SetEntProp(Ent, Prop_Send, "m_CollisionGroup", 1);
  312.  
  313. //Spawn:
  314. DispatchSpawn(Ent);
  315.  
  316. //Send:
  317. TeleportEntity(Ent, Origin, Direction, Velocity);
  318.  
  319. //Blood:
  320. Roll = GetRandomInt(1, 5);
  321.  
  322. //blood_advisor_pierce_spray:
  323. if(Roll == 1) WriteParticle(Ent, "blood_advisor_pierce_spray");
  324.  
  325. //blood_advisor_pierce_spray_b:
  326. if(Roll == 2) WriteParticle(Ent, "blood_advisor_pierce_spray_b");
  327.  
  328. //blood_advisor_pierce_spray_c:
  329. if(Roll == 3) WriteParticle(Ent, "blood_advisor_pierce_spray_c");
  330.  
  331. //blood_zombie_split_spray:
  332. if(Roll == 4) WriteParticle(Ent, "blood_zombie_split_spray");
  333.  
  334. //blood_advisor_pierce_spray:
  335. if(Roll == 5) WriteParticle(Ent, "blood_advisor_pierce_spray");
  336.  
  337. //Delete:
  338. CreateTimer(GetRandomFloat(15.0, 30.0), RemoveGib, Ent);
  339. }
  340. }
  341.  
  342.  
  343. //Random Gib:
  344. stock RandomGib(Float:Origin[3], String:Model[])
  345. {
  346.  
  347. //Declare:
  348. decl Float:Direction[3];
  349.  
  350. //Origin:
  351. Origin[0] += GetRandomFloat(-10.0, 10.0);
  352. Origin[1] += GetRandomFloat(-10.0, 10.0);
  353. Origin[2] += GetRandomFloat(-20.0, 20.0);
  354.  
  355. //Direction:
  356. Direction[0] = GetRandomFloat(-1.0, 1.0);
  357. Direction[1] = GetRandomFloat(-1.0, 1.0);
  358. Direction[2] = GetRandomFloat(150.0, 200.0);
  359.  
  360. //Gib:
  361. Gib(Origin, Direction, Model);
  362. }
  363.  
  364. //Remove Gib:
  365. public Action:RemoveGib(Handle:Timer, any:Ent)
  366. {
  367.  
  368. //Declare:
  369. decl String:Classname[64];
  370.  
  371. //Initialize:
  372. if(IsValidEdict(Ent))
  373. {
  374.  
  375. //Find:
  376. GetEdictClassname(Ent, Classname, sizeof(Classname));
  377.  
  378. //Kill:
  379. if(StrEqual(Classname, "prop_physics", false)) RemoveEdict(Ent);
  380. }
  381. }
  382.  
  383. //Body:
  384. stock RemoveBody(Client)
  385. {
  386.  
  387. //Declare:
  388. decl BodyRagdoll;
  389. decl String:Classname[64];
  390.  
  391. //Initialize:
  392. BodyRagdoll = GetEntPropEnt(Client, Prop_Send, "m_hRagdoll");
  393. if(IsValidEdict(BodyRagdoll))
  394. {
  395.  
  396. //Find:
  397. GetEdictClassname(BodyRagdoll, Classname, sizeof(Classname));
  398.  
  399. //Remove:
  400. if(StrEqual(Classname, "cs_ragdoll", false)) RemoveEdict(BodyRagdoll);
  401. }
  402. }
  403.  
  404. //Bleed:
  405. public Action:Bleed(Handle:Timer, any:Client)
  406. {
  407.  
  408. //Connected:
  409. if(IsClientInGame(Client))
  410. {
  411.  
  412. //Still Hurt:
  413. if(GetClientHealth(Client) < 100 && IsPlayerAlive(Client))
  414. {
  415.  
  416. //Declare:
  417. decl Roll;
  418. decl Float:Origin[3], Float:Direction[3];
  419.  
  420. //Initialize:
  421. Roll = GetRandomInt(1, 2);
  422. GetClientAbsOrigin(Client, Origin);
  423. Origin[2] += 10.0;
  424.  
  425. //Initialize:
  426. Direction[0] = GetRandomFloat(-1.0, 1.0);
  427. Direction[1] = GetRandomFloat(-1.0, 1.0);
  428.  
  429. //Bleed:
  430. if(Roll == 1) WriteParticle(Client, "blood_zombie_split_spray_tiny");
  431. if(Roll == 2) WriteParticle(Client, "blood_zombie_split_spray_tiny2");
  432.  
  433. //Drips #1:
  434. Roll = GetRandomInt(1, 2);
  435. if(Roll == 1) WriteParticle(Client, "blood_impact_red_01_droplets");
  436.  
  437. //Drips #2:
  438. Roll = GetRandomInt(1, 2);
  439. if(Roll == 1) WriteParticle(Client, "blood_impact_red_01_smalldroplets");
  440.  
  441. //Decal:
  442. Direction[2] = -1.0;
  443. Decal(Client, Direction, true);
  444. }
  445. }
  446. }
  447.  
  448. //Damage:
  449. public EventDamage(Handle:Event, const String:Name[], bool:Broadcast)
  450. {
  451.  
  452. //Declare:
  453. decl Client, Roll;
  454. decl Float:Origin[3];
  455.  
  456. //Initialize:
  457. Client = GetClientOfUserId(GetEventInt(Event, "userid"));
  458. GetClientAbsOrigin(Client, Origin);
  459. Origin[2] += 35.0;
  460.  
  461. //Multiplier:
  462. for(new X = 0; X < GetConVarInt(hImpactBlood); X++)
  463. {
  464.  
  465. //blood_impact_red_01:
  466. Roll = GetRandomInt(1, 6);
  467. if(Roll == 1) WriteParticle(Client, "blood_impact_red_01");
  468.  
  469. //blood_impact_red_01_droplets:
  470. Roll = GetRandomInt(1, 6);
  471. if(Roll == 2) WriteParticle(Client, "blood_impact_red_01_droplets");
  472.  
  473. //blood_impact_red_01_smalldroplets:
  474. Roll = GetRandomInt(1, 6);
  475. if(Roll == 3) WriteParticle(Client, "blood_impact_red_01_smalldroplets");
  476.  
  477. //blood_impact_red_01_goop:
  478. Roll = GetRandomInt(1, 6);
  479. if(Roll == 4) WriteParticle(Client, "blood_impact_red_01_goop");
  480.  
  481. //blood_impact_red_01_mist:
  482. Roll = GetRandomInt(1, 6);
  483. if(Roll == 5) WriteParticle(Client, "blood_impact_red_01_mist");
  484.  
  485. //blood_advisor_puncture:
  486. Roll = GetRandomInt(1, 6);
  487. if(Roll == 6) WriteParticle(Client, "blood_advisor_puncture");
  488.  
  489. //blood_advisor_pierce_spray:
  490. Roll = GetRandomInt(1, 15);
  491. if(Roll == 1) WriteParticle(Client, "blood_advisor_pierce_spray");
  492.  
  493. //blood_advisor_pierce_spray_b:
  494. Roll = GetRandomInt(1, 15);
  495. if(Roll == 2) WriteParticle(Client, "blood_advisor_pierce_spray_b");
  496.  
  497. //blood_advisor_pierce_spray_c:
  498. Roll = GetRandomInt(1, 15);
  499. if(Roll == 3) WriteParticle(Client, "blood_advisor_pierce_spray_c");
  500.  
  501. //blood_zombie_split_spray:
  502. Roll = GetRandomInt(1, 15);
  503. if(Roll == 4) WriteParticle(Client, "blood_zombie_split_spray");
  504. }
  505. }
  506.  
  507. //Death:
  508. public EventDeath(Handle:Event, const String:Name[], bool:Broadcast)
  509. {
  510.  
  511. //Declare:
  512. decl bool:Headshot;
  513. decl Client, Attacker;
  514. decl String:Weapon[64];
  515.  
  516. //Initialize:
  517. Headshot = GetEventBool(Event, "headshot");
  518. Client = GetClientOfUserId(GetEventInt(Event, "userid"));
  519. Attacker = GetClientOfUserId(GetEventInt(Event, "attacker"));
  520. GetEventString(Event, "weapon", Weapon, sizeof(Weapon));
  521.  
  522. //Weapons:
  523. if(GetConVarBool(hGibs))
  524. {
  525.  
  526. //Loop:
  527. for(new X = 0; X < 7; X++)
  528. {
  529.  
  530. //Check:
  531. if(StrContains(Weapon, CSWeapon[X], false) != -1)
  532. {
  533.  
  534. //Fake Attacker:
  535. Attacker = 0;
  536. }
  537. }
  538. }
  539.  
  540. //Legit Attacker:
  541. if(Attacker != 0 && Attacker != Client)
  542. {
  543.  
  544. //Headshot:
  545. if(Headshot)
  546. {
  547.  
  548. //Declare:
  549. decl Float:Origin[3], Float:AttackerOrigin[3], Float:Direction[3];
  550.  
  551. //Origin:
  552. GetClientAbsOrigin(Client, Origin);
  553. GetClientAbsOrigin(Attacker, AttackerOrigin);
  554. Origin[2] += 8.5;
  555.  
  556. //Multiplier:
  557. for(new Y = 0; Y < GetConVarInt(hHeadshotBlood); Y++)
  558. {
  559.  
  560. //Strings:
  561. WriteParticle(Client, "blood_advisor_puncture_withdraw", true, true);
  562. WriteParticle(Client, "blood_antlionguard_injured_heavy_tiny", true, true);
  563.  
  564. //Droplets:
  565. WriteParticle(Client, "blood_impact_red_01_smalldroplets", true, true);
  566. }
  567.  
  568. //Decals:
  569. for(new X = 0; X < (10 * GetConVarInt(hHeadshotBlood)); X++)
  570. {
  571.  
  572. //Direction:
  573. Direction[0] = GetRandomFloat(-1.0, 1.0);
  574. Direction[1] = GetRandomFloat(-1.0, 1.0);
  575. Direction[2] = -1.0;
  576.  
  577. //Send:
  578. Decal(Client, Direction, true);
  579. }
  580. }
  581. else
  582. {
  583.  
  584. //Multiplier:
  585. for(new Y = 0; Y < GetConVarInt(hDeathBlood); Y++)
  586. {
  587.  
  588. //Declare:
  589. decl Roll;
  590.  
  591. //Initialize:
  592. Roll = GetRandomInt(1, 4);
  593.  
  594. //blood_advisor_pierce_spray:
  595. if(Roll == 1) for(new X = 0; X < 3; X++) WriteParticle(Client, "blood_advisor_pierce_spray", true);
  596.  
  597. //blood_advisor_pierce_spray_b:
  598. if(Roll == 2) for(new X = 0; X < 3; X++) WriteParticle(Client, "blood_advisor_pierce_spray_b", true);
  599.  
  600. //blood_advisor_pierce_spray_c:
  601. if(Roll == 3) for(new X = 0; X < 3; X++) WriteParticle(Client, "blood_advisor_pierce_spray_c", true);
  602.  
  603. //blood_zombie_split_spray:
  604. if(Roll == 4) for(new X = 0; X < 3; X++) WriteParticle(Client, "blood_zombie_split_spray", true);
  605. }
  606. }
  607. }
  608. else
  609. {
  610.  
  611. //Declare:
  612. decl Float:Origin[3];
  613.  
  614. //Origin:
  615. GetClientAbsOrigin(Client, Origin);
  616. Origin[2] += 8.5;
  617.  
  618. //Gibbies:
  619. if(GetConVarBool(hGibs))
  620. {
  621.  
  622. //Animate:
  623. RandomGib(Origin, "models/Gibs/HGIBS.mdl");
  624. RandomGib(Origin, "models/Gibs/HGIBS_rib.mdl");
  625. RandomGib(Origin, "models/Gibs/HGIBS_spine.mdl");
  626. RandomGib(Origin, "models/Gibs/HGIBS_scapula.mdl");
  627.  
  628. //Remove Body:
  629. if(GetConVarBool(hGibs)) RemoveBody(Client);
  630.  
  631. //Declare:
  632. decl Float:Direction[3];
  633.  
  634. //Decals:
  635. for(new X = 0; X < 10; X++)
  636. {
  637.  
  638. //Direction:
  639. Direction[0] = GetRandomFloat(-1.0, 1.0);
  640. Direction[1] = GetRandomFloat(-1.0, 1.0);
  641. Direction[2] = -1.0;
  642.  
  643. //Send:
  644. Decal(Client, Direction);
  645. }
  646. }
  647. }
  648.  
  649. //Close:
  650. CloseHandle(Event);
  651. }
  652.  
  653. //Pre-Think:
  654. public OnGameFrame()
  655. {
  656.  
  657. //Think Overflow:
  658. if(PrethinkBuffer <= (GetGameTime() - GetConVarInt(hBleedingFreq)))
  659. {
  660.  
  661. //Refresh:
  662. PrethinkBuffer = GetGameTime();
  663.  
  664. //Declare:
  665. decl MaxPlayers;
  666.  
  667. //Initialize:
  668. MaxPlayers = GetMaxClients();
  669.  
  670. //Loop:
  671. for(new Client = 1; Client <= MaxPlayers; Client++)
  672. {
  673.  
  674. //Connected:
  675. if(IsClientInGame(Client))
  676. {
  677.  
  678. //Alive:
  679. if(IsPlayerAlive(Client))
  680. {
  681.  
  682. //Damaged:
  683. if(GetClientHealth(Client) <= GetConVarInt(hBleedingHp))
  684. {
  685.  
  686. //Bleed:
  687. CreateTimer(1.0, Bleed, Client);
  688. }
  689. }
  690. }
  691. }
  692. }
  693. }
  694.  
  695. //Precache:
  696. ForcePrecache(String:ParticleName[])
  697. {
  698.  
  699. //Declare:
  700. decl Particle;
  701.  
  702. //Initialize:
  703. Particle = CreateEntityByName("info_particle_system");
  704.  
  705. //Validate:
  706. if(IsValidEdict(Particle))
  707. {
  708.  
  709. //Properties:
  710. DispatchKeyValue(Particle, "effect_name", ParticleName);
  711.  
  712. //Spawn:
  713. DispatchSpawn(Particle);
  714. ActivateEntity(Particle);
  715. AcceptEntityInput(Particle, "start");
  716.  
  717. //Delete:
  718. CreateTimer(0.3, DeleteParticle, Particle, TIMER_FLAG_NO_MAPCHANGE);
  719. }
  720. }
  721.  
  722. //Map Start:
  723. public OnMapStart()
  724. {
  725.  
  726. //Gibs:
  727. PrecacheModel("models/Gibs/HGIBS.mdl", true);
  728. PrecacheModel("models/Gibs/HGIBS_rib.mdl", true);
  729. PrecacheModel("models/Gibs/HGIBS_spine.mdl", true);
  730. PrecacheModel("models/Gibs/HGIBS_scapula.mdl", true);
  731.  
  732. //Precache:
  733. ForcePrecache("blood_impact_red_01_droplets");
  734. ForcePrecache("blood_impact_red_01_smalldroplets");
  735. ForcePrecache("blood_zombie_split_spray_tiny");
  736. ForcePrecache("blood_zombie_split_spray_tiny2");
  737. ForcePrecache("blood_impact_red_01");
  738. ForcePrecache("blood_impact_red_01_goop");
  739. ForcePrecache("blood_impact_red_01_mist");
  740. ForcePrecache("blood_advisor_puncture");
  741. ForcePrecache("blood_advisor_puncture_withdraw");
  742. ForcePrecache("blood_antlionguard_injured_heavy_tiny");
  743. ForcePrecache("blood_advisor_pierce_spray");
  744. ForcePrecache("blood_advisor_pierce_spray_b");
  745. ForcePrecache("blood_advisor_pierce_spray_c");
  746. ForcePrecache("blood_zombie_split_spray");
  747. }
  748.  
  749. //Initation:
  750. public OnPluginStart()
  751. {
  752.  
  753. //Register:
  754. PrintToConsole(0, "[SM] Goremod v5.3.2 by Joe 'DiscoBBQ' Maley betoltese sikeres!");
  755.  
  756. //Events:
  757. HookEvent("player_hurt", EventDamage);
  758. HookEvent("player_death", EventDeath);
  759.  
  760. //Server Variable:
  761. CreateConVar("cssgore_version", "5.3.2", "Goremod Version",FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_UNLOGGED|FCVAR_DONTRECORD|FCVAR_REPLICATED|FCVAR_NOTIFY);
  762.  
  763. //Convars:
  764. hGibs = CreateConVar("sm_gibs_enabled", "1", "Koponya/vegtagok/csontok/stb. engedelyezese/letiltasa.");
  765. hBleedingFreq = CreateConVar("sm_bleeding_frequency", "15", "Verzes hatasok kozotti idotartam masodpercben.");
  766. hBleedingHp = CreateConVar("sm_bleeding_health", "99", "Ennyi HP-nal kezd el verezni.");
  767. hImpactBlood = CreateConVar("sm_impact_blood_multiplier", "2", "A normal sebzesnel keletkezo verzes szorzoja.");
  768. hHeadshotBlood = CreateConVar("sm_headshot_blood_multiplier", "1", "Fejlovesnel keletkezo verzes szorzoja.");
  769. hDeathBlood = CreateConVar("sm_death_blood_multiplier", "1", "Normalis halalnal keletkezo verzes szorzoja.");
  770. }