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

Block Give Default Items [hl2mp, cstrike]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Plugin ID:
8172
Plugin Version:
1.0
Plugin Category:
Technical/Development
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Blocks game function Give Default Items and has plugin callback forward when function happens.
    Old 09-03-2022 , 16:42   Block Give Default Items [hl2mp, cstrike]
    Reply With Quote #1

    Plugin blocks game function called GiveDefaultItems(), depends cvar setting.
    - And have global callback forward after function.
    Code:
    "sm_givedefaultitems_mode" = "1" min. 0.000000 max. 2.000000
     -  0 - disabled
     1 - no default items when game_player_equip exist
     2 - no default items
    PHP Code:
    /**
     * Global post listener for the GiveDefaultItems function.
     *
     * @param client                            Client index.
     * @param OriginalFunctionBlocked            Was original GiveDefaultItems function blocked.
     */
    forward void GiveDefaultItemsPost(int client, const bool OriginalFunctionBlocked); 
    This plugin works on hl2mp and cstrike only.

    - HL2:Deathmatch has unfinished code, it still give default weapons to player even game_player_equip entity exist.
    This plugin fix that problem.
    - Counter-Strike:Source works right with game_player_equip

    - In both games, you can block default weapons after all with cvar mode 2
    - givedefaultitems.smx has global forward function GiveDefaultItemsPost(), this is called when ever game GiveDefaultItems() happens.
    You can make own plugin and give your own collection weapons to player.



    I have only tested on Windows.
    - Linux signatures are included but have not tested, do those work.
    Attached Files
    File Type: zip blockgivedefaultitems_hl2mp_cstrike.zip (10.2 KB, 59 views)
    __________________
    Do not Private Message @me
    Bacardi 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 19:10.


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