Raised This Month: $ Target: $400
 0% 

Remove Spectator's Projectiles


Post New Thread Reply   
 
Thread Tools Display Modes
Author
KRosen
Junior Member
Join Date: Apr 2009
Plugin ID:
1171
Plugin Version:
0.2
Plugin Category:
General Purpose
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Remove Spectator's Projectiles
    Unapprover:
    Reason for Unapproving:
    fix, not plugin
    Old 09-20-2009 , 07:20   Remove Spectator's Projectiles
    Reply With Quote #1

    Should fix this issue....
    http://forums.steampowered.com/forum...d.php?t=969604

    -On player death, loops through all problematic projectiles and if the client has changed to 'spectator', it removes the projectile.


    yes first plugin posted. if im doin it wrong lemme know!
    EDIT: okay, updated w/ fixed i think.
    EDIT AGAIN: http://forums.alliedmods.net/showthread.php?t=104806 <-- much cleaner version by BL4NK
    Attached Files
    File Type: sp Get Plugin or Get Source (SpecTKBugFixer.sp - 486 views - 2.4 KB)

    Last edited by KRosen; 09-28-2009 at 08:23.
    KRosen is offline
    SOKJester
    New Member
    Join Date: Sep 2007
    Old 09-20-2009 , 15:32   Re: Remove Spectator's Projectiles
    Reply With Quote #2

    Reading over your Plugin KRosen you don't need the following parts in there, because the 2 below weapons don't work while switching to spectator

    Arrow
    Code:
            }
            while ((index = FindEntityByClassname2(index, "tf_projectile_arrow")) != -1)
            if(Client == GetEntDataEnt2(index, 412))
            {


    Jarate

    Code:
            }
            while ((index = FindEntityByClassname2(index, "tf_projectile_jar")) != -1)
            if(Client == GetEntDataEnt2(index, 412))
            {

    EDIT
    Apparently arrows work for killing sentries and other buildings, that's odd they don't work for players but do for buildings, might as well make EVERY weapon in this script if arrows work like that something else is bound to (like stickies)

    Last edited by SOKJester; 09-20-2009 at 17:10.
    SOKJester is offline
    Frus
    Senior Member
    Join Date: Aug 2009
    Old 09-21-2009 , 01:20   Re: Remove Spectator's Projectiles
    Reply With Quote #3

    Quote:
    Originally Posted by SOKJester View Post
    might as well make EVERY weapon in this script if arrows work like that something else is bound to (like stickies)
    stickies already disappear if the demoman dies, no matter what.

    And very few of TF2's weapons use projectiles, which would still be in effect after you die.

    Although I notice you don't check for a pyro's flamethrower projectile, is that not affected by this bug?
    Frus is offline
    eXDee
    Member
    Join Date: May 2009
    Old 09-21-2009 , 01:28   Re: Remove Spectator's Projectiles
    Reply With Quote #4

    Hey,
    Just tried it on our server, and it doesnt seem to change anything. Its loaded, but it still kills players.

    It could be because we're running a 100% crits server - does your plugin remove critical projectiles?
    eXDee is offline
    KRosen
    Junior Member
    Join Date: Apr 2009
    Old 09-21-2009 , 08:08   Re: Remove Spectator's Projectiles
    Reply With Quote #5

    okay for some reason for pipe bombs at least, its not returning the correct owner. for rockets it works fine. im gonnna grind into this and figure out wtf. >.> sorry for the mixups.

    *if anybody knows why GetEntDataEnt2(index, 412) would return -1 for a pipebomb, let me know.

    Last edited by KRosen; 09-21-2009 at 08:18.
    KRosen is offline
    Frus
    Senior Member
    Join Date: Aug 2009
    Old 09-21-2009 , 14:38   Re: Remove Spectator's Projectiles
    Reply With Quote #6

    You shouldn't hardcode offsets like that. And the offset will be different for every type of projectile anyways.

    use GetEntPropEnt instead of GetEntDataEnt2. Look at the docs if you need to understand how to use it http://docs.sourcemod.net/api/
    Frus is offline
    KRosen
    Junior Member
    Join Date: Apr 2009
    Old 09-21-2009 , 14:54   Re: Remove Spectator's Projectiles
    Reply With Quote #7

    thanks frus but i checked, its the same;

    also i rewrote it using the function you gave, because i thought maybe the function i was using was broken; no dice, still returns -1.
    KRosen is offline
    eXDee
    Member
    Join Date: May 2009
    Old 09-25-2009 , 08:14   Re: Remove Spectator's Projectiles
    Reply With Quote #8

    Any update on this? Just permed someone for teamkilling for the 4th time.
    eXDee is offline
    KRosen
    Junior Member
    Join Date: Apr 2009
    Old 09-26-2009 , 12:16   Re: Remove Spectator's Projectiles
    Reply With Quote #9

    fixed it!(i think) sorry, like i said first plugin
    KRosen is offline
    m4ster
    Senior Member
    Join Date: Mar 2007
    Old 09-27-2009 , 09:16   Re: Remove Spectator's Projectiles
    Reply With Quote #10

    Lite version, removed serverprint, timer, used player_team event. Working, used on my server.
    Attached Files
    File Type: sp Get Plugin or Get Source (SpecTKBugFixer.sp - 563 views - 1.7 KB)

    Last edited by m4ster; 09-27-2009 at 13:38.
    m4ster 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 10:14.


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