December 16, 2018, 03:45:57 AM

Author Topic: [Addon] Unlimited Nades  (Read 450 times)

Offline Manifest

  • Race & effect creator
  • Moderator
  • Level 7 Expert
  • *****
  • Posts: 1054
  • Country: dk
  • Content creator for the new WCS version by Kami.
[Addon] Unlimited Nades
« on: January 18, 2018, 01:40:26 PM »
This plugin was originally made by MiB for both the oldest WCS version, then ported to Tha Pwned's version. It is among some of the oldest addons on this forum, and I felt like it should be available for this version too.

Despite the age of the addon I have rarely seen it used in races, therefore I've decided to make a few changes to the addon, in an attempt to make it easier to use for people who have little to no race coding experience.

Adding one of these lines to your race's spawncmd will give the player back their grenade after it expolodes.
He, Flashbang, SmokeGrenade, Decoy, Molotov and Incendiaries respectively.

Code: [Select]
es wcsgroup set Unlimited_HEs event_var(userid) 1
es wcsgroup set Unlimited_FlashBangs event_var(userid) 1
es wcsgroup set Unlimited_SmokeGrenades event_var(userid) 1
es wcsgroup set Unlimited_Decoys event_var(userid) 1
es wcsgroup set Unlimited_Molotovs event_var(userid) 1
es wcsgroup set Unlimited_Incendiaries event_var(userid) 1


Adding one of these lines to your race's spawncmd will give the player back their grenade some time after it expolodes.
He, Flashbang, SmokeGrenade, Decoy, Molotov and Incendiaries respectively.

To set the time, you simply change the number after time_before_next_nade to the number of seconds you want before the player should get back his nade. The default time is set to 2 seconds after the explosion.

Code: [Select]
es_xset time_before_next_nade 2;es wcsgroup set Delayed_Unlimited_HEs event_var(userid) server_var(time_before_next_nade)
es_xset time_before_next_nade 2;es wcsgroup set Delayed_Unlimited_FlashBangs event_var(userid) server_var(time_before_next_nade)
es_xset time_before_next_nade 2;es wcsgroup set Delayed_Unlimited_SmokeGrenades event_var(userid) server_var(time_before_next_nade)
es_xset time_before_next_nade 2;es wcsgroup set Delayed_Unlimited_Decoys event_var(userid) server_var(time_before_next_nade)
es_xset time_before_next_nade 2;es wcsgroup set Delayed_Unlimited_Molotovs event_var(userid) server_var(time_before_next_nade)
es_xset time_before_next_nade 2;es wcsgroup set Delayed_Unlimited_Incendiaries event_var(userid) server_var(time_before_next_nade)



Changes from the original addon.
  • Implemented CSGO nades, decoy, incendiaries and molotovs.
  • Implemented a fix to ensure bugs wont occur on servers that don't slay upon race change.
  • Changed the timed variable to be self-explanatory.
  • Changed the wcsgroups to be close to self-explanatory too.


(◠‿◠)
« Last Edit: January 18, 2018, 02:35:39 PM by Manifest »
"BRAVORA: Bruh it is fucking operation crystal night when you are approving races."


Offline Drellannor

  • Level 1 Trained Beginner
  • *
  • Posts: 23
  • Country: fr
Re: [Addon] Unlimited Nades
« Reply #1 on: November 11, 2018, 03:39:28 AM »
Thanks Manifest !