Raised This Month: $32 Target: $400
 8% 

Napalm Grenades!


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Peoples Army
SourceMod Donor
Join Date: Mar 2007
Plugin ID:
140
Plugin Version:
0.5
Plugin Category:
Fun Stuff
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
    3 
    Plugin Description:
    turns all HE Nades into napalm nades and sets player injured on fire .
    Old 08-17-2007 , 19:31   Napalm Grenades!
    Reply With Quote #1

    Napalm Grenades:

    HE grenades turn into napalm , and when damaged by a HE grenade , the damaged player gets set on fire , the time the player gets set on fire , is greater with the amount of damage the nade does , the more damage done , the longer your on fire .


    Instalation:
    • Install Like Any Other sourcemod plugin .
    CVARS:
    • napalm_nades_on 1/0 1 is on 0 is off
    Change Logs:
    • 8-10-07 - 0.1 - Originol Release
    • 8-10-07 - 0.2- Added Extinguish Enitity On Player Death
    • 8-11-07 - 0.3 - Added Extinguish Entity On Player Disconnect
    • 8-21-07 -0.4- Fixed Bug In Ignite Switch
    • 8-22-07 -0.5 - Fixed Time Bug
    Any Ideas And Feed Back Are Welcome
    Attached Files
    File Type: sp Get Plugin or Get Source (napalm.sp - 9382 views - 1.9 KB)

    Last edited by Peoples Army; 08-22-2007 at 18:41. Reason: fixed the cvar
    Peoples Army is offline
    Nican
    Veteran Member
    Join Date: Jan 2006
    Location: NY
    Old 08-18-2007 , 00:34   Re: Napalm Grenades!
    Reply With Quote #2

    So I repeat:
    This buring choosing lines does not make sense...
    Lets say the person takes 75 damage from the granade... The plugin would react:

    if(DmgDone <= 30) = False
    else if(DmgDone > 31) = True
    and it would stop right here, and never go to 12.0 seconds...

    and wouldn't it make more sense if you made a formula for the time of the fire
    something like:

    ( Damage / MaxHealth ) * MaxFireTime
    IgniteEntity(client, ( float(DmgDone) / 100.0 ) * 12.0);
    __________________
    http://www.nican132.com
    I require reputation!

    Last edited by Nican; 08-19-2007 at 15:00.
    Nican is offline
    Send a message via ICQ to Nican Send a message via MSN to Nican
    Peoples Army
    SourceMod Donor
    Join Date: Mar 2007
    Old 08-18-2007 , 15:46   Re: Napalm Grenades!
    Reply With Quote #3

    as far as i know and the approvers my coding makes sence other wise they would have pointed it out .
    Peoples Army is offline
    dalto
    Veteran Member
    Join Date: Jul 2007
    Old 08-19-2007 , 22:12   Re: Napalm Grenades!
    Reply With Quote #4

    I think what he is saying is not that there is something wrong with your code, but that it might not be doing what you intended it to do.


    Code:
            if(DmgDone <= 30)
            {
                IgniteEntity(client,3.0);
            }else if(DmgDone > 31)
            {
                IgniteEntity(client,6.0);
            }else if(DmgDone > 51)
            {
                IgniteEntity(client,9.0);
            }else if (DmgDone > 71)
            {
                IgniteEntity(client,12.0);
            }
    With this code, it is not possible to ever get to the if(DmgDone > 51) or if (DmgDone > 71).

    Because once it gets to if(DmgDone > 31), it finds a match and stops.

    You might, instead consider doing something like this:
    Code:
            if(DmgDone <= 30)
            {
                IgniteEntity(client,3.0);
            }else if(DmgDone > 31 && DmgDone <= 51)
            {
                IgniteEntity(client,6.0);
            }else if(DmgDone > 51 && DmgDone <= 71)
            {
                IgniteEntity(client,9.0);
            }else if (DmgDone > 71)
            {
                IgniteEntity(client,12.0);
            }
    It will work either way, it is just a question of what you are trying to accomplish.
    dalto is offline
    cybermind
    Senior Member
    Join Date: Oct 2004
    Old 08-19-2007 , 22:17   Re: Napalm Grenades!
    Reply With Quote #5

    Just move the greater numbers to the top of the else-if tree:

    Code:
            if(DmgDone <= 30)
            {
                IgniteEntity(client,3.0);
            }else if (DmgDone > 71)
            {
                IgniteEntity(client,12.0);
            }else if(DmgDone > 51)
            {
                IgniteEntity(client,9.0);
            }else if(DmgDone > 31)
            {
                IgniteEntity(client,6.0);
            }
    cybermind is offline
    BAILOPAN
    Join Date: Jan 2004
    Old 08-19-2007 , 22:20   Re: Napalm Grenades!
    Reply With Quote #6

    The checklist for approving a plugin is somewhat generic -- moderators won't personally test and read every line of your plugin. If it contains a semantic error that's syntactically correct, it's up to you to fix it (and if it's a "show-stopping" problem that gets reported, it may mean unapproval later).

    edit: hi cybermind
    __________________
    egg
    BAILOPAN is offline
    Peoples Army
    SourceMod Donor
    Join Date: Mar 2007
    Old 08-19-2007 , 23:53   Re: Napalm Grenades!
    Reply With Quote #7

    ooooppsss . i never noticed that . sorry guys . it makes sence now . i gotta go to sleep (work tommaorw) but ill fix it tommarow . thanks for the help .
    Peoples Army is offline
    Nican
    Veteran Member
    Join Date: Jan 2006
    Location: NY
    Old 08-20-2007 , 00:10   Re: Napalm Grenades!
    Reply With Quote #8

    I still think you should make a nice little formula for it :O

    Anyway, sorry for my bad communication skills D:
    __________________
    http://www.nican132.com
    I require reputation!
    Nican is offline
    Send a message via ICQ to Nican Send a message via MSN to Nican
    Peoples Army
    SourceMod Donor
    Join Date: Mar 2007
    Old 08-21-2007 , 19:46   Re: Napalm Grenades!
    Reply With Quote #9

    ok fixed teh cases i had and uploaded new version should be all fixed. thx for pointing it out .
    Peoples Army is offline
    Nican
    Veteran Member
    Join Date: Jan 2006
    Location: NY
    Old 08-21-2007 , 22:03   Re: Napalm Grenades!
    Reply With Quote #10

    Ok... two new bugs:
    1.Have you noticed the less damage the player takes, the longer he stays on fire...
    -- if he takes > 71, he stays lit for 6 seconds
    -- if he takes > 51, he stays lit for 9 seconds
    -- if he takes > 31, he stays lit for 12 seconds

    2. If the player takes exactly 31 damage, nothing happens...
    __________________
    http://www.nican132.com
    I require reputation!
    Nican is offline
    Send a message via ICQ to Nican Send a message via MSN to Nican
    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 23:37.


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