Raised This Month: $51 Target: $400
 12% 

[CS:GO] Molotov rain


Post New Thread Reply   
 
Thread Tools Display Modes
Author
noob_
Junior Member
Join Date: Mar 2016
Plugin ID:
5071
Plugin Version:
1.0
Plugin Category:
Gameplay
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    One of the events to be used in Hunger Games mod in CS:GO. Molotovs falling from the sky on tributes.
    Old 03-03-2016 , 06:27   [CS:GO] Molotov rain
    Reply With Quote #1

    Hello.

    This is my first plugin for Sourcemod. It's for Hunger Games mod in CS:GO.
    Every round there's an event that happens to one of the tributes. On the server I play on it's only blue ION beam and I played once on another server where there was molotov rain. I couldn't find the plugin so I wrote my own. I tried to make it as adjustable as possible. Any suggestions and error reports welcome.

    Originator of the first molotov rain plugin is zipcore.

    ConVars:
    sm_molotovnumber "Set number of molotovs falling from the sky." def. 15 min 1 max 30
    sm_molotovgravity "Set the gravity of molotovs." def. 100 min 1 max 1000
    sm_molotovheight "Set the height from which molotovs will fall." def. 400 min 100 max 1000
    sm_molotovinterval "Set the interval between falling molotovs." def. 1.0 min 0.0 max 10.0
    sm_molotovtimerstart "Set the minimal time after which the molotovs will fall." def. 90 min 30
    sm_molotovtimerend "Set the minimal time before the end of the round before which the molotovs will fall." def. 30 min 0
    sm_molotovradius "Set the radius of falling molotovs." def. 200.0 min 0.0 max 500.0
    sm_molotovenable "Enable / disable the plugin." def. 1 min 0.0 max 1.0
    sm_molotovstart "Start the molotov rain."

    YouTube demo:


    Changelog:
    • 13.03.2016 - added molotov radius convar
    • 13.03.2016 - added YouTube demo
    • 15.03.2016 - added disabling the plugin convar
    • 15.03.2016 - added starting the molotov rain convar
    • 22.03.2016 - fixed an error which was printed to the console after the last molotov (I was closing timer's handle in its callback function)
    • 22.03.2016 - fixed a bug that broke the plugin when user disconnected during molotov rain falling on him
    Attached Files
    File Type: sp Get Plugin or Get Source (molotovrain.sp - 1516 views - 5.4 KB)
    File Type: smx molotovrain.smx (7.7 KB, 513 views)

    Last edited by noob_; 03-22-2016 at 12:21.
    noob_ is offline
    zipcore
    Veteran Member
    Join Date: Mar 2010
    Location: m_flZipcore
    Old 03-03-2016 , 08:01   Re: Molotov rain
    Reply With Quote #2

    You should convert the plugin fully to the new syntax, you even mix it on the same line.
    CreateArray(32) would only be useful to store char[32], 1 is enough to store an int as cell.
    Rest looks fine, gz.
    __________________
    zipcore is offline
    8guawong
    AlliedModders Donor
    Join Date: Dec 2013
    Location: BlackMarke7
    Old 03-03-2016 , 18:57   Re: Molotov rain
    Reply With Quote #3

    nice release
    here is the blue beam
    https://forums.alliedmods.net/showthread.php?p=1422756
    __________________
    8guawong is offline
    noob_
    Junior Member
    Join Date: Mar 2016
    Old 03-09-2016 , 16:02   Re: Molotov rain
    Reply With Quote #4

    Thanks @zipcore and @8guawong!

    @zipcore I've changed 32 to 1 and rewrote the plugin in the new syntax. If I forgot about sth, please let me know.

    @8guawong Thanks for the blue beam plugin. :-)
    noob_ is offline
    8guawong
    AlliedModders Donor
    Join Date: Dec 2013
    Location: BlackMarke7
    Old 03-09-2016 , 21:01   Re: [CS:GO] Molotov rain
    Reply With Quote #5

    i tried your plugin but it seems molotov is detonating in the sky before touching the ground
    you think you can fix this?
    __________________
    8guawong is offline
    zipcore
    Veteran Member
    Join Date: Mar 2010
    Location: m_flZipcore
    Old 03-10-2016 , 02:17   Re: [CS:GO] Molotov rain
    Reply With Quote #6

    He added a cvar to adjust the height to spawn them. I guess they are spawning above the skybox and detonating as they touch the skybox.
    __________________
    zipcore is offline
    8guawong
    AlliedModders Donor
    Join Date: Dec 2013
    Location: BlackMarke7
    Old 03-10-2016 , 03:06   Re: [CS:GO] Molotov rain
    Reply With Quote #7

    Quote:
    Originally Posted by zipcore View Post
    He added a cvar to adjust the height to spawn them. I guess they are spawning above the skybox and detonating as they touch the skybox.
    that was my guess as well!
    would you know how to ignore to skybox? i tried but couldn't find an answer
    __________________
    8guawong is offline
    zipcore
    Veteran Member
    Join Date: Mar 2010
    Location: m_flZipcore
    Old 03-13-2016 , 07:47   Re: [CS:GO] Molotov rain
    Reply With Quote #8

    Quote:
    Originally Posted by 8guawong View Post
    that was my guess as well!
    would you know how to ignore to skybox? i tried but couldn't find an answer
    He could add a traceray with a upwards angled MASK_SOLID to get the distance to the skybox or to check if the player is inside a building etc. I do this and then search a better target.
    __________________
    zipcore is offline
    noob_
    Junior Member
    Join Date: Mar 2016
    Old 03-13-2016 , 08:27   Re: [CS:GO] Molotov rain
    Reply With Quote #9

    @8guawong @zipcore I knew that if you set the height above the skybox, it will detonate in mid air. But why not just set sm_molotovheight to a lower value?
    As for molotovs hitting buildings, I think that's a good thing - tributes that found a shelter will be rewarded. And if an admin wants molotovs to always hit tributes, he can set the sm_molotovheight to minimal and it will always spawn just above tribute.
    What do you think?

    // BTW, I've added 1 more convar - molotov radius.
    noob_ is offline
    Cipop
    Member
    Join Date: Sep 2014
    Old 03-13-2016 , 12:05   Re: [CS:GO] Molotov rain
    Reply With Quote #10

    Could you add a disable/enable cvar ?
    __________________


    Cipop is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 18:22.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode