Raised This Month: $ Target: $400
 0% 

[CSS] Gun Menu - A Pawn only (smx) interpretation of CSS:DM


Post New Thread Reply   
 
Thread Tools Display Modes
Author
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Plugin ID:
2655
Plugin Version:
1.0
Plugin Category:
Gameplay
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    19 
    Plugin Description:
    Provides a menu to choose weapons which are automatically given at respawn, automatically gives nades, armor, etc.
    Old 11-13-2013 , 11:12   Re: [CSS] Gun Menu - A Pawn only (smx) interpretation of CSS:DM
    Reply With Quote #1

    PHP Code:
    m_iHealth FindSendPropOffs("CCSPlayer""m_iHealth");
        
    m_ArmorValue FindSendPropOffs("CCSPlayer""m_ArmorValue");
        
    m_bHasHelmet FindSendPropOffs("CCSPlayer""m_bHasHelmet");
        
    m_bHasDefuser FindSendPropOffs("CCSPlayer""m_bHasDefuser");
        
    m_bHasNightVision FindSendPropOffs("CCSPlayer""m_bHasNightVision"); 
    You're bypassing SourceMod's safety checking an caching by doing this, just use GetEntProp.

    You don't need to close handles in OnPluginEnd, SourceMod will do the cleanup.

    PHP Code:
        // Work around A2S_RULES bug in linux orange box
        
    SetConVarString(g_ConVar_VersionPLUGIN_VERSION); 
    This hasn't been needed in quite a while.
    __________________
    asherkin is offline
    LumiStance
    AlliedModders Donor
    Join Date: Jan 2009
    Location: Northern California
    Old 11-13-2013 , 17:53   Re: [CSS] Gun Menu - A Pawn only (smx) interpretation of CSS:DM
    Reply With Quote #2

    Quote:
    Originally Posted by asherkin View Post
    You're bypassing SourceMod's safety checking an caching by doing this, just use GetEntProp.
    I appreciate your concern, FindSendPropOffs and SetEntData are still valid API functions.

    Quote:
    Originally Posted by asherkin View Post
    You don't need to close handles in OnPluginEnd, SourceMod will do the cleanup.
    I'm aware of that.

    Quote:
    Originally Posted by asherkin View Post
    PHP Code:
        // Work around A2S_RULES bug in linux orange box
        
    SetConVarString(g_ConVar_VersionPLUGIN_VERSION); 
    This hasn't been needed in quite a while.
    Did not see the memo. Do you have a link?
    __________________
    LumiStance is offline
    asherkin
    SourceMod Developer
    Join Date: Aug 2009
    Location: OnGameFrame()
    Old 11-13-2013 , 18:25   Re: [CSS] Gun Menu - A Pawn only (smx) interpretation of CSS:DM
    Reply With Quote #3

    Quote:
    Originally Posted by LumiStance View Post
    I appreciate your concern, FindSendPropOffs and SetEntData are still valid API functions.
    Not for your usage, the only reason they're not deprecated is because some low-level hacking requires them.

    Quote:
    Originally Posted by LumiStance View Post
    Did not see the memo. Do you have a link?
    https://forums.alliedmods.net/showth...83#post1519883

    I suggest being less shirty, I was only reviewing your plugin for approval (which I did do regardless of the mentioned issues).
    __________________
    asherkin is offline
    LumiStance
    AlliedModders Donor
    Join Date: Jan 2009
    Location: Northern California
    Old 11-14-2013 , 00:01   Re: [CSS] Gun Menu - A Pawn only (smx) interpretation of CSS:DM
    Reply With Quote #4

    Quote:
    Originally Posted by asherkin View Post
    Not for your usage, the only reason they're not deprecated is because some low-level hacking requires them.
    I'll have to test them when I get some time.

    Quote:
    Originally Posted by asherkin View Post
    https://forums.alliedmods.net/showth...83#post1519883

    I suggest being less shirty, I was only reviewing your plugin for approval (which I did do regardless of the mentioned issues).
    My tongue was in cheek. I had gotten the impression that you had expected me to know that tidbit of news. I didn't realize how easy it was to rub you the wrong way.

    Thank you for reviewing my code and approving the plugin.
    __________________
    LumiStance is offline
    tazzle0870
    Senior Member
    Join Date: May 2010
    Old 09-14-2017 , 19:40   Re: [CSS] Gun Menu - A Pawn only (smx) interpretation of CSS:DM
    Reply With Quote #5

    Hi i have an adaptive bots server. i like the spawn menu. is there a way to not allow bots to spawn w nades and flashes.. they spam u with them ..
    i want humans to be able to use the menu but not bots

    Last edited by tazzle0870; 09-14-2017 at 19:41.
    tazzle0870 is offline
    LumiStance
    AlliedModders Donor
    Join Date: Jan 2009
    Location: Northern California
    Old 09-15-2017 , 13:12   Re: [CSS] Gun Menu - A Pawn only (smx) interpretation of CSS:DM
    Reply With Quote #6

    Quote:
    Originally Posted by tazzle0870 View Post
    Hi i have an adaptive bots server. i like the spawn menu. is there a way to not allow bots to spawn w nades and flashes.. they spam u with them ..
    i want humans to be able to use the menu but not bots
    Yes, there is a way.
    On line 556 you will find if (g_SpawnHE)
    Change that to if (g_SpawnHE && !IsFakeClient(client_index))

    You can make a similar modification for other items you don't want the bots to get.
    __________________
    LumiStance is offline
    tazzle0870
    Senior Member
    Join Date: May 2010
    Old 09-25-2017 , 13:09   Re: [CSS] Gun Menu - A Pawn only (smx) interpretation of CSS:DM
    Reply With Quote #7

    Quote:
    Originally Posted by LumiStance View Post
    Yes, there is a way.
    On line 556 you will find if (g_SpawnHE)
    Change that to if (g_SpawnHE && !IsFakeClient(client_index))

    You can make a similar modification for other items you don't want the bots to get.
    here is my gun menu ini . What is line 556? are you saying edit plug?

    "Gun Menu Config"
    {
    "Settings"
    {
    // Allow players to have C4 bomb
    "allow_c4" "yes"

    // Allow buy zones on map
    "buy_zones" "yes"

    // Allow players to keep awp
    "keep_awp" "yes"

    }

    "SpawnItems"
    {
    // Health amount to give (0 to use default from game/other plugin)
    "health" "100"

    // Armor amount to give
    "armor" "100"

    // Whether to give a helmet. If you want to disable armor, you must
    // set this to "no" as well as setting armor to 0.
    "helmet" "yes"

    // Whether to give flashbangs
    "flashbangs" "no"

    // Whether to give a smoke grenade
    "smokegrenade" "no"

    // Whether to give an HE grenade
    "hegrenade" "yes"

    // Whether to give defusekits to CTs
    "defusekits" "yes"

    // Whether to give nightvision
    "nightvision" "yes"
    }

    "PrimaryMenu"
    {
    "weapon_m4a1" "Maverick M4A1 Carbine"
    "weapon_ak47" "AK47"
    "weapon_scout" "Schmidt Scout "
    "weapon_sg552" "Krieg 552"
    "weapon_galil" "IDF Defender"
    "weapon_famas" "FAMAS"
    "weapon_aug" "Bullpup"
    "weapon_m249" "M249-SAW"
    "weapon_ump45" "KM UMP45"
    "weapon_mp5navy" "MP5 Navy"
    "weapon_m3" "Leone 12 Gauge Super"
    "weapon_xm1014" "Leone YG1265 Auto Shotgun"
    "weapon_tmp" "Schmidt Machine Pistol"
    "weapon_mac10" "Ingram Mac-10"
    "weapon_p90" "ES C90"
    }

    "SecondaryMenu"
    {
    "weapon_usp" "USP Tactical"
    "weapon_glock" "Glock"
    "weapon_deagle" "Desert Eagle"
    "weapon_p228" "P228"
    "weapon_elite" "Dual 96G Elite Berettas"
    "weapon_fiveseven" "ES Five Seven"
    }
    }
    tazzle0870 is offline
    LumiStance
    AlliedModders Donor
    Join Date: Jan 2009
    Location: Northern California
    Old 09-25-2017 , 22:41   Re: [CSS] Gun Menu - A Pawn only (smx) interpretation of CSS:DM
    Reply With Quote #8

    Quote:
    Originally Posted by tazzle0870 View Post
    here is my gun menu ini . What is line 556? are you saying edit plug?
    Yes, you will need to edit and recompile the plugin (the sp file).
    You can use the compile tool here: http://www.sourcemod.net/compiler.php
    __________________

    Last edited by LumiStance; 09-25-2017 at 22:41.
    LumiStance 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 04:11.


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