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

[CSS] CTrun for SM


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Eun
Member
Join Date: Jan 2011
Plugin ID:
2308
Plugin Version:
1.3SM
Plugin Category:
Gameplay
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
    1 
    Plugin Description:
    Allows CT's to pick up the bomb and run away.
    Old 04-11-2011 , 07:59   [CSS] CTrun for SM
    Reply With Quote #1

    Allows CT's to steal the bomb and run away.
    All you have to do is kill the enemy holding the bomb and go pick it up like any normal weapon, or if the terrorists are stupid enough to leave the bomb at spawn, just go steal it!
    This is the SourceMod version of
    http://addons.eventscripts.com/addons/view/CTRun

    CVars:
    ctrun_allow_plant - Allow CT's to plant the bomb?
    ctrun_enabled - set CTrun enabled or not

    Demo:
    http://www.youtube.com/watch?v=v5PuZcqmYtw

    Changelog:
    added bugfixes and improvements, thx folks
    Attached Files
    File Type: sp Get Plugin or Get Source (ctrun.sp - 1442 views - 3.5 KB)

    Last edited by Eun; 07-10-2011 at 12:26.
    Eun is offline
    databomb
    Veteran Member
    Join Date: Jun 2009
    Location: california
    Old 04-11-2011 , 08:51   Re: [CSS] CTrun for SM
    Reply With Quote #2

    Good job with this plugin! It's ridiculous how many addons are needed to make the regular CS:S game more realistic and this is a great addition to promote more strategy in the game.

    A few minor things with the code,

    PHP Code:
    new maxclients GetMaxClients(); 
    There's an omni-present global variable called MaxClients that will work so you don't need to call GetMaxClients.

    PHP Code:
    m_lifeState == 
    If people don't know 0 is LIFE_ALIVE, this is confusing. Consider calling IsPlayerAlive(i) instead for clarity or defining LIFE_ALIVE.

    PHP Code:
    RemoveEdict(C4); 
    AcceptEntityInput(C4, "Kill") is strongly encouraged over RemoveEdict.

    for the public BombZones(disable), there's a function called FindEntityByClassname that might be better to use here for clarity & efficiency.
    __________________

    Last edited by databomb; 04-11-2011 at 08:54.
    databomb is offline
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 04-11-2011 , 12:04   Re: [CSS] CTrun for SM
    Reply With Quote #3

    Code:
    for(new i=0;i<maxclients;i++)
    You should start at 1 and accept the "maxclients" value (< become <=). 0 is world.

    So
    Code:
    for (new i=GetMaxClients();i<maxent;i++)
    Become "new i = MaxClients + 1"


    Awesome plugin. It's also a port from CS 1.6 ;).

    Last edited by RedSword; 04-11-2011 at 12:06.
    RedSword is offline
    sinblaster
    Grim Reaper
    Join Date: Feb 2010
    Location: Australia
    Old 04-11-2011 , 18:40   Re: [CSS] CTrun for SM
    Reply With Quote #4

    just awesome
    __________________
    Happy Happy Joy Joy

    sinblaster is offline
    sinblaster
    Grim Reaper
    Join Date: Feb 2010
    Location: Australia
    Old 04-13-2011 , 05:37   Re: [CSS] CTrun for SM
    Reply With Quote #5

    I have unloaded this for now. I have an error log that is 52 mb from the 12th/03 repeating the following error.

    Code:
    L 04/12/2011 - 00:03:44: [SM] Displaying call stack trace for plugin "ctrun.smx":
    L 04/12/2011 - 00:03:44: [SM]   [0]  Line 79, /home/groups/alliedmodders/forums/files/1/0/2/4/7/1/84598.attach::CTPickupBomb()
    L 04/12/2011 - 00:03:44: [SM] Native "GetEntPropVector" reported: Entity 92 (92) is invalid
    
    
    L 04/12/2011 - 00:03:44: [SM] Displaying call stack trace for plugin "ctrun.smx":
    L 04/12/2011 - 00:03:44: [SM]   [0]  Line 79, /home/groups/alliedmodders/forums/files/1/0/2/4/7/1/84598.attach::CTPickupBomb()
    L 04/12/2011 - 00:05:40: [SM] Native "GetEntPropVector" reported: Entity 567 (567) is invalid
    
    L 04/12/2011 - 00:08:56: [SM] Displaying call stack trace for plugin "ctrun.smx":
    L 04/12/2011 - 00:08:56: [SM]   [0]  Line 79, /home/groups/alliedmodders/forums/files/1/0/2/4/7/1/84598.attach::CTPickupBomb()
    L 04/12/2011 - 00:08:56: [SM] Native "GetEntPropVector" reported: Entity 549 (549) is invalid
    Like I said the goes on and on for 52 megabytes worth of errors, the only difference is that the entity number changes quite a bit. If you want the file Ill have to store it on a fileserver for you.
    __________________
    Happy Happy Joy Joy

    sinblaster is offline
    databomb
    Veteran Member
    Join Date: Jun 2009
    Location: california
    Old 04-17-2011 , 21:27   Re: [CSS] CTrun for SM
    Reply With Quote #6

    PHP Code:
        if (C4 == -1)
            return 
    Plugin_Continue;
        
        
    GetEntPropVector(C4Prop_Data"m_vecOrigin"bomborigin); 
    the if (c4 == -1) should be changed to check if it's a valid entity or not instead.

    Also, there's a great way to accomplish this using SDKHooks that doesn't involve finagling with tracking and proximity checks and what have you. Try the SDKHook_WeaponCanUse
    __________________
    databomb is offline
    Eun
    Member
    Join Date: Jan 2011
    Old 07-10-2011 , 12:27   Re: [CSS] CTrun for SM
    Reply With Quote #7

    Thanks for improvements,
    file updated
    Eun is offline
    dinamix
    SourceMod Donor
    Join Date: Jan 2011
    Location: Lithuanian
    Old 08-23-2011 , 07:57   Re: [CSS] CTrun for SM
    Reply With Quote #8

    Cool plugin

    Last edited by dinamix; 08-23-2011 at 13:05.
    dinamix 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 22:09.


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