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

[TF2Items] Give Weapon (v3.14159, 11/29/2013)


Post New Thread Reply   
 
Thread Tools Display Modes
x00
Member
Join Date: Sep 2011
Old 09-05-2011 , 10:27   Re: [TF2Items] Give Weapon (v3.04, 08/28/2011)
Reply With Quote #511

Is there any way to allow normal Members to give a weapon themself?
x00 is offline
Bwuce Lee
New Member
Join Date: Aug 2011
Old 09-05-2011 , 11:04   Re: [TF2Items] Give Weapon (v2.7, 02/24/2011)
Reply With Quote #512

Quote:
Originally Posted by FlaminSarge View Post
The ammo literally *sets* on giving the weapon, so I set it to what it would be after applying possible ammo attributes.
when is your bethehorsemann going to be released?
Bwuce Lee is offline
Sorrowfire
Member
Join Date: Jul 2010
Location: <Missing String>
Old 09-05-2011 , 12:00   Re: [TF2Items] Give Weapon (v3.04, 08/28/2011)
Reply With Quote #513

Geez Sarge, all sorts of ideas to add or try out now eh?

@x00, i don't believe as of yet there is a way to let non-admin players give themselves a weapon using this plugin alone. And just changing the access level of the command would let players give other players weapons... and well you can see trouble in that i bet.

@Bwuce Lee, not only is what your quoting completely non-related but is this really the place to ask Sarge about his upcoming plugins? Maybe send him a PM? (I'm just saying...)

PS: @Sarge, Speaking of giving normal players the ability to give themselves a weapon, any chance you can add a CVAR + sm_givew like command which would let non-admins give themselves a weapon (Granted that they know the ID & the CVAR was = 1) but not let them give one to other players? I think something like that would be smart if one were to add it to a Trading server it would let players try out a weapon before they decide to trade for it.
Though you might want to add an extra CVAR to disallow custom weapons or something, but hey its just another idea.
__________________
"What do you mean SourcePawn doesn't count as a 2nd language?"

Last edited by Sorrowfire; 09-05-2011 at 12:01. Reason: Fixing a few Grammer related errors.
Sorrowfire is offline
GoRRageBoy
BANNED
Join Date: Jul 2011
Old 09-05-2011 , 16:21   Re: [TF2Items] Give Weapon (v3.04, 08/28/2011)
Reply With Quote #514

I tried adding in my own form of class-restrictions on weapons, using the switch (weaponlookupindex) part of Command_WeaponBase.

PHP Code:
case 2171:
            {
                
//Khopesh Climber
                //Class: Sniper
                
new TFClassType:class = TF2_GetPlayerClass(client);
                if (class == 
TFClass_Scout || class == TFClass_Soldier || class == TFClass_Pyro || class == TFClass_DemoMan || class == TFClass_Heavy || class == TFClass_Engineer || class == TFClass_Medic || class == TFClass_Spy)
                {
                    
PrintToChat(client"[TF2Items] You cannot equip this weapon.");
                }
            } 
Doesn't work though. Player gets the message about getting a weapon and to go to a resupply locker or respawn, then they get the "You cannot equip this weapon." message, yet they still get the weapon.
GoRRageBoy is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 09-05-2011 , 20:34   Re: [TF2Items] Give Weapon (v2.7, 02/24/2011)
Reply With Quote #515

Quote:
Originally Posted by FlaminSarge View Post
The ammo literally *sets* on giving the weapon, so I set it to what it would be after applying possible ammo attributes.
Quote:
Originally Posted by Bwuce Lee View Post
when is your bethehorsemann going to be released?
Clearly the quote is related to your question. Clearly.

I sent a tester the plugin, and he's gonna test it for a bit. It's done.

GorRageBoy: I'll paste the code here for what you're trying to do.

PHP Code:
public Action:Command_WeaponBase(clientweaponLookupIndexweaponSlot)
{
    switch (
weaponLookupIndex)
    {
        case 
2171:
        {
            if (
TF2_GetPlayerClass(client) != TFClass_Sniper)
            {
                  
PrintToChat(client"[TF2Items] Item index %d cannot be used with your current class."weaponLookupIndex);
                  return;
            }
        }
    }
    
decl String:strSteamID[32];
    new 
weaponIndex;
    while ((
weaponIndex GetPlayerWeaponSlot(clientweaponSlot)) != -1)
    {... 
If it's givew_ex'd, they'd get the message every time they respawned/touched a locker.
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 64-bit will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.

Last edited by FlaminSarge; 09-05-2011 at 20:56.
FlaminSarge is offline
GoRRageBoy
BANNED
Join Date: Jul 2011
Old 09-06-2011 , 21:39   Re: [TF2Items] Give Weapon (v2.7, 02/24/2011)
Reply With Quote #516

Quote:
Originally Posted by FlaminSarge View Post
Clearly the quote is related to your question. Clearly.

I sent a tester the plugin, and he's gonna test it for a bit. It's done.

GorRageBoy: I'll paste the code here for what you're trying to do.

PHP Code:
public Action:Command_WeaponBase(clientweaponLookupIndexweaponSlot)
{
    switch (
weaponLookupIndex)
    {
        case 
2171:
        {
            if (
TF2_GetPlayerClass(client) != TFClass_Sniper)
            {
                  
PrintToChat(client"[TF2Items] Item index %d cannot be used with your current class."weaponLookupIndex);
                  return;
            }
        }
    }
    
decl String:strSteamID[32];
    new 
weaponIndex;
    while ((
weaponIndex GetPlayerWeaponSlot(clientweaponSlot)) != -1)
    {... 
If it's givew_ex'd, they'd get the message every time they respawned/touched a locker.
Thank you kindly, sir.
GoRRageBoy is offline
portalmods124
Member
Join Date: Sep 2011
Old 09-07-2011 , 02:29   Re: [TF2Items] Give Weapon (v3.04, 08/28/2011)
Reply With Quote #517

Maybe you should use tryinclude <tf2items_giveweapon> cuz I can't read the customs w/o that D:

Last edited by portalmods124; 09-07-2011 at 03:26.
portalmods124 is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 09-07-2011 , 03:50   Re: [TF2Items] Give Weapon (v3.04, 08/28/2011)
Reply With Quote #518

what are you talking about?
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 64-bit will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.
FlaminSarge is offline
341464
Senior Member
Join Date: Dec 2010
Location: GetClientEyePosition
Old 09-07-2011 , 17:02   Re: [TF2Items] Give Weapon (v3.04, 08/28/2011)
Reply With Quote #519

uhm how does that dissolve wrench works, is it possible to make it with tf2items (custom wep not givew)
341464 is offline
Send a message via Skype™ to 341464
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 09-07-2011 , 21:44   Re: [TF2Items] Give Weapon (v3.04, 08/28/2011)
Reply With Quote #520

Not as far as I know of. I'll look into it.
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 64-bit will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.
FlaminSarge 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 14:58.


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