Monthly Target: $400 Donations: $133
 33% 

[ANY] Ion Cannon Weapon (Version 1.2.1 Updated 03.05.2011)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Plugin ID:
2241
Plugin Version:
1.2.1
Plugin Category:
Fun Stuff
Plugin Game:
Any
Plugin Dependencies:
    Approver:
    Plugin Description:
    Place an satellite ion cannon laser beam just like in Command & Conquer Renegade: Reborn!
    Servers with this Plugin:
     
    Old 02-24-2011 , 09:10   [ANY] Ion Cannon Weapon (Version 1.2.1 Updated 03.05.2011)
    Reply With Quote #1

    Ion Cannon Weapon in Source

    This is a port of hjkwe645 aka A.F.'s AMX Mod X weaponmod ion cannon weapon as requested here.

    Credits for the math and sounds entirely to him - nice work!

    Description:
    Players are able to buy ion cannons, charging $10000 by default, by typing !buyion in chat. Now when using the knife outside, you're able to place an ion cannon at your position. Give the satellite time to locate you and see a big laser bashing from the sky destroying anything around.

    This should work in any game - I only tested in CS:S though.

    If you want to place the ion cannon with a different weapon than the knife change the
    sm_ion_weapon convar to your weapon.

    L4D(2):
    Remove the "//" in front of the following line and recompile to use default HL2 sounds instead of the offered sounds, so the clients don't need to download anything.
    PHP Code:
    //#define ALTERNATIVE_SOUNDS 


    Video:

    Some more effects have been added since the version in the video.
    http://www.youtube.com/watch?v=c52AUZYFYFk
    http://www.youtube.com/watch?v=FBJbHuzfWOY&hd=1

    ConVars:
    • sm_ion_version - ...
    • sm_ion_defaultammo - How many ion cannons should a player get by default on join? (Default: 1)
    • sm_ion_maxammo - How many ion cannons should a player be able to "carry" at a time? (Default: 5)
    • sm_ion_buy_enable - Are players allowed to buy an ion cannon via "!buyion"? (Default: 1)
    • sm_ion_buy_price - How much money does the ion cannon cost? (Default: $10000)
    • sm_ion_deploytime - How long does it take to display the beams after deploying a ion cannon in seconds? (Default: 30)
    • sm_ion_shaketime - How long should the client's screen shake after explosion in seconds? (Default: 10)
    • sm_ion_radius - The radius of the explosion. (Default: 2000)
    • sm_ion_mindamage - How much damage does the explosion deal at min? (Default: 42100)
    • sm_ion_maxdamage - How much damage does the explosion deal at max? (Default: 54200)
    • sm_ion_weapon - Which weapon should be used to deploy ion cannons? (Default: weapon_knife)
    • sm_ion_glowsprites - How many glow sprites should be spit out on explosion? (Note: They are shot twice with different velocity!) (Default: 300)
    • sm_ion_placetime - How many seconds should player have to stand still to deploy an ion cannon? (Default: 5)
    Admin Command:
    There is only 1 command for admins with the root "z" flag:
    sm_giveion <#userid|steamid|name> - Give a player an ion cannon.

    This command ignores the sm_ion_maxammo setting.

    If you set sm_ion_buy_enable 0 and sm_ion_defaultammo 0 in your config file. Only admins with the root flag are able to use the ion cannon.

    Compile Requirements:
    This plugin uses berni's and Chanz' smlib and exvel's colors library.
    Download both and put inside your include folder, if you want to compile yourself.

    Credits:
    • hjkwe645 aka A.F.: Original idea and math
    • V0gelz: I used his smoke and env_shooter code from his Fireworks plugin
    Changelog:
    Quote:
    • 1.0: Initial release
    • 1.1: Added alternative hl2 only sounds and admin command to give ion cannons
    • 1.2: Added own cvar for weapon, fixed fire, added cvar for glowing sprite amount, fixed showing progress bar on games that don't support it
    • 1.2.1: Fixed using m_iAccount even if sm_ion_buy_price is set to 0, Added blue glow to where ion cannon has been deployed
    Versions:
    For easy use, there are 2 compiled versions attached.
    • ioncannon.smx - Uses the sounds in ioncannon_sounds.zip. Players have to download them on join.
    • ioncannon_alt.smx - Uses alternative hl2 sounds all clients already have. Use this for L4D(2).
    Attached Files
    File Type: zip ioncannon_sounds.zip (2.05 MB, 1506 views)
    File Type: sp Get Plugin or Get Source (ioncannon.sp - 1023 views - 42.8 KB)
    File Type: smx ioncannon.smx (29.6 KB, 855 views)
    File Type: smx ioncannon_alt.smx (30.4 KB, 654 views)
    __________________

    Last edited by Peace-Maker; 05-03-2011 at 14:56. Reason: Updated to 1.2.1
    Peace-Maker is offline
    sinblaster
    Grim Reaper
    Join Date: Feb 2010
    Location: Australia
    Old 02-24-2011 , 10:22   Re: [ANY] Ion Cannon Weapon (Version 1.0)
    Reply With Quote #2

    lol at the deleted.

    This looks awesome but I can see I'd have to charge 16001 to buy them. I think I'm overloaded with add-ons but a server dedicated just for this add-on with rounds that I guess would last all of 30 seconds (lol) would be fun. Thanks Ill give it a whirl on my test server.
    __________________
    Happy Happy Joy Joy

    sinblaster is offline
    Elektramode
    Senior Member
    Join Date: Mar 2010
    Old 02-24-2011 , 16:47   Re: [ANY] Ion Cannon Weapon (Version 1.0)
    Reply With Quote #3

    Hmm, dang I'd love this to work on l4d2, I am aware of the knife being used in german servers, however I am not sure if it will work with that knife.
    Elektramode is offline
    Peace-Maker
    SourceMod Plugin Approver
    Join Date: Aug 2008
    Location: Germany
    Old 02-24-2011 , 17:50   Re: [ANY] Ion Cannon Weapon (Version 1.0)
    Reply With Quote #4

    You can change the weapon to whatever you like. It's not bound to the knife in any way. You'd only miss the sounds in l4dx.
    __________________
    Peace-Maker is offline
    snipercup
    Junior Member
    Join Date: Nov 2010
    Old 02-25-2011 , 09:25   Re: [ANY] Ion Cannon Weapon (Version 1.0)
    Reply With Quote #5

    After a few modifications it worked for my synergy server. Exellent work.

    It didnt load all the sounds but thats probably something on my part.
    snipercup is offline
    Elektramode
    Senior Member
    Join Date: Mar 2010
    Old 02-25-2011 , 13:17   Re: [ANY] Ion Cannon Weapon (Version 1.0)
    Reply With Quote #6

    I see, however I'v ran into 1 more obvious issue, I cannot really buy an ioncannon as l4d has no buy function. I understand that you never intended the plugin to work on the game and I would like to edit the plugin to be able to support l4d, however I have the sourcemod knowledge as a 5 year old learning english for the first time, I only know the basics. I am guessing this is to much to ask for, however could you possibly make a command for admins to force the ioncannon to deploy? That way no buying is required and it should work? I am not sure if you will accept this well .

    EDIT: Well, i made the price of the cannon $0, so now I can buy it, however could you possibly still take my idea into consideration, I am going to try my best to edit the code to change weapon, however I probably wont be able, could someone possibly also tell me how to edit which weapon should be used for ion cannon, as I probably wont figure this out. Sorry for all my spam.

    Last edited by Elektramode; 02-26-2011 at 09:07.
    Elektramode is offline
    lascage
    Member
    Join Date: Nov 2010
    Old 02-26-2011 , 05:21   Re: [ANY] Ion Cannon Weapon (Version 1.0)
    Reply With Quote #7

    How to make this only for admin with flag root plz ? With an !ioncanon command

    The admin root say !ioncanon and the ioncanon is placed at the position of the admin

    Last edited by lascage; 02-26-2011 at 05:28.
    lascage is offline
    phoenix0001
    Member
    Join Date: Apr 2010
    Location: China
    Old 02-26-2011 , 09:48   Re: [ANY] Ion Cannon Weapon (Version 1.0)
    Reply With Quote #8

    L4D2 Can not run the game a black screen
    __________________
    I like this BBS sharing of spirit

    I come from China, my English is poor
    phoenix0001 is offline
    javalia
    Senior Member
    Join Date: May 2009
    Location: korea, republic of
    Old 02-26-2011 , 10:16   Re: [ANY] Ion Cannon Weapon (Version 1.0)
    Reply With Quote #9

    effect is epic
    __________________
    javalia is offline
    Peace-Maker
    SourceMod Plugin Approver
    Join Date: Aug 2008
    Location: Germany
    Old 02-26-2011 , 10:29   Re: [ANY] Ion Cannon Weapon (Version 1.1 Updated 26.02.2011)
    Reply With Quote #10

    Updated to 1.1

    Added usage of alternative hl2 only sounds to support l4d and other servers who don't want their players to download anything.
    You're now able to change the weapon used to place an ion cannon easily via a define
    Read the first post on how to enable them.

    Added admin command to give ion cannons to players.
    sm_giveion <#userid|steamid|name>
    __________________
    Peace-Maker is offline
    Reply


    Thread Tools
    Display Modes

    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 06:27.


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