Monthly Target: $400 Donations: $131
 32% 

Backpack


Post New Thread Reply   
 
Thread Tools Display Modes
Author
InstantDeath
Senior Member
Join Date: Mar 2007
Plugin ID:
1259
Plugin Version:
2.1
Plugin Category:
Fun Stuff
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
    11 
    Plugin Description:
    Allows a player to hold more than one primary weapon by storing one weapon in the "backpack"
    Old 10-31-2009 , 18:20   Backpack
    Reply With Quote #1

    Backpack

    Mods: CS:S

    Console Commands: swap_primary - allows player to swap weapons or put weapons in the backpack.

    Changelog:

    2.1
    • Initial Release
    2.11
    • Removed the MAXPLAYERS 64 define, as Sourcemod already has it defined. (Whoops.)


    Upcoming Features: NONE
    TO DO: NONE


    Installation:
    Put backpack.smx in sourcemod/plugins folder.

    Note: If there is enough demand for it I will add support for more mods.

    Attached Files
    File Type: sp Get Plugin or Get Source (backpack.sp - 1731 views - 15.0 KB)
    __________________

    Last edited by InstantDeath; 12-10-2009 at 10:16.
    InstantDeath is offline
    shady2k2
    Member
    Join Date: Oct 2009
    Old 10-31-2009 , 18:34   Re: Backpack
    Reply With Quote #2

    can u make that only for "z" flag?
    shady2k2 is offline
    nonick
    BANNED
    Join Date: Jul 2008
    Old 10-31-2009 , 18:59   Re: Backpack
    Reply With Quote #3

    great plugin. Bur can u make that if you buy second weapon, dont drop first?? First comes on back
    nonick is offline
    BINGORUM
    Junior Member
    Join Date: Nov 2006
    Old 11-01-2009 , 15:15   Re: Backpack
    Reply With Quote #4

    thanks very much instantdeath share the perfect backpack
    BINGORUM is offline
    InstantDeath
    Senior Member
    Join Date: Mar 2007
    Old 11-01-2009 , 15:25   Re: Backpack
    Reply With Quote #5

    Quote:
    Originally Posted by shady2k2 View Post
    can u make that only for "z" flag?
    sure, that would only require me to make the console command into an admin command. I'll make a special version for you.

    Quote:
    Originally Posted by nonick View Post
    great plugin. Bur can u make that if you buy second weapon, dont drop first?? First comes on back
    you're not doing it right. buy the first weapon, put it into the backpack, then buy the second weapon. then press your swap_primary key again and it will switch between the two weapons.
    __________________
    InstantDeath is offline
    nonick
    BANNED
    Join Date: Jul 2008
    Old 11-01-2009 , 15:42   Re: Backpack
    Reply With Quote #6

    I know that, little annoying but never might ;]
    nonick is offline
    Annihilator
    Senior Member
    Join Date: Nov 2006
    Location: Lithuania
    Old 11-02-2009 , 18:48   Re: Backpack
    Reply With Quote #7

    Quote:
    Originally Posted by InstantDeath View Post
    sure, that would only require me to make the console command into an admin command. I'll make a special version for you.
    Would it be possible to get the version where you need to have a flag to use weapon backpack (with one of the custom flags, like "o")?
    And maybe something like that you dont drop the weapons that you have in backpack when you die? (a cvar for this would be nice too )
    Annihilator is offline
    weaponmen
    Member
    Join Date: Jun 2009
    Old 11-04-2009 , 07:54   Re: Backpack
    Reply With Quote #8

    Nice +Karma for you, [REQ] but it will be even better if you make it automatic, like buy a weapon and stored automatically and scroll the +mouse3 to change weapons.

    Thanks.
    __________________

    weaponmen is offline
    nonick
    BANNED
    Join Date: Jul 2008
    Old 11-05-2009 , 14:01   Re: Backpack
    Reply With Quote #9

    Found one bug:
    Than you buy 2 mashin gun (or other one gun, but with mashin gun) and standing on other gun and write swap_primary several times (changes gun (3 gun)) one of 3 gun is shotgun and than changes gun with one of ground and get shotgun with 100 clip, same with sniper guns ... (mashin gun 100clips = other gun with 100clips)
    nonick is offline
    Antithasys
    Moderator
    Join Date: Apr 2008
    Old 11-05-2009 , 22:31   Re: Backpack
    Reply With Quote #10

    Quote:
    Originally Posted by InstantDeath View Post
    sure, that would only require me to make the console command into an admin command. I'll make a special version for you.
    You are looking for this:
    PHP Code:
    new Handle:g_hCvar_AdminString INVALID_HANDLE;

    public 
    OnPluginStart()
    {
        
    g_hCvar_AdminString CreateConVar("sm_backpack_adminflag""z""Admin flag to use, blank for open access");
        
        
    //rest of the code
    }

    public 
    Action:Command_SwapPrimary(clientargs)
    {
        new 
    String:sAdminFlag[16];
        
    GetConVarString(g_hCvar_AdminStringsAdminFlagsizeof(sAdminFlag));
        if (
    strlen(sAdminFlag) > && !IsValidAdmin(clientsAdminFlag))
        {
            return 
    Plugin_Handled;
        }
        
        
    //rest of the code
    }

    stock IsValidAdmin(client, const String:flags)
    {
        new 
    ibFlags ReadFlagString(flags);
        if ((
    GetUserFlagBits(client) & ibFlags) == ibFlags)
        {
            return 
    true;
        }
        if (
    GetUserFlagBits(client) & ADMFLAG_ROOT)
        {
            return 
    true;
        }
        return 
    false;

    __________________
    [my plugins]

    When you think about asking a question... consider what have you tried?

    Last edited by Antithasys; 11-05-2009 at 22:34.
    Antithasys is offline
    Reply


    Thread Tools
    Display Modes

    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 01:36.


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