AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Backpack (https://forums.alliedmods.net/showthread.php?t=107893)

InstantDeath 10-31-2009 17:20

Backpack
 
2 Attachment(s)
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.


shady2k2 10-31-2009 17:34

Re: Backpack
 
can u make that only for "z" flag?

nonick 10-31-2009 17:59

Re: Backpack
 
great plugin. Bur can u make that if you buy second weapon, dont drop first?? First comes on back

BINGORUM 11-01-2009 14:15

Re: Backpack
 
thanks very much instantdeath share the perfect backpack

InstantDeath 11-01-2009 14:25

Re: Backpack
 
Quote:

Originally Posted by shady2k2 (Post 977072)
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 (Post 977086)
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.

nonick 11-01-2009 14:42

Re: Backpack
 
I know that, little annoying but never might ;]

Annihilator 11-02-2009 17:48

Re: Backpack
 
Quote:

Originally Posted by InstantDeath (Post 978125)
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 :) )

weaponmen 11-04-2009 06:54

Re: Backpack
 
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.

nonick 11-05-2009 13:01

Re: Backpack
 
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)

Antithasys 11-05-2009 21:31

Re: Backpack
 
Quote:

Originally Posted by InstantDeath (Post 978125)
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;




All times are GMT -4. The time now is 14:53.

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