AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2Items] Give Weapon (v3.14159, 11/29/2013) (https://forums.alliedmods.net/showthread.php?t=141962)

MasterOfTheXP 03-09-2013 10:11

Re: [TF2Items] Give Weapon (v3.14, 01/23/2013)
 
Update everything. SourceMod, Metamod:Source, the plugin, Randomizer gamedata, etc.

ashuraalchemist 03-09-2013 22:14

Re: [TF2Items] Give Weapon (v3.14, 01/23/2013)
 
everything is up to date, still happens.

FlaminSarge 03-10-2013 07:32

Re: [TF2Items] Give Weapon (v3.14, 01/23/2013)
 
I'm not sure how to try to reproduce that bug. I think you may be getting some kind of TFCond-related crash, possibly?

botinok 03-10-2013 08:49

Re: [TF2Items] Give Weapon (v3.14, 01/23/2013)
 
Thank you very much for this great plugin, FlaminSarge:up:
but can you add something like sm_gimme_ex for public ( sm_gimme but "Gives on inventory application (spawn or locker touch- maybe not locker touch if you don't change loadout" )?
it would be very useful. Thanks again :)

FlaminSarge 03-11-2013 00:26

Re: [TF2Items] Give Weapon (v3.14, 01/23/2013)
 
Sure. I was actually considering making a mode for /givew and /givew_ex that did that, so that if you did /givew <number> it'd try to give you the number, and failing that it would try to target somebody. Of course, this'd be settable and configurable. I've got a pretty good system in mind.

404UserNotFound 03-11-2013 18:02

Re: [TF2Items] Give Weapon (v3.14, 01/23/2013)
 
Heyyy, I'm trying to modify the way the the ResetEx command works, and make a new version of the command that doesn't require a target (similar to "sm_gimme"), but does require a slot (i.e. 0, 1, 2), and also displays a PrintToChat message depending on which slot the player enters. Here's what I've got so far:

PHP Code:

public Action:Command_ResetEx(clientargs)
{
    new 
String:arg1[32];

    if (
args 1)
    {
        
ReplyToCommand(client"[SM] Usage: sm_unequip [slot]");
        return 
Plugin_Handled;
    }

    
/* Get the arguments */
    
GetCmdArg(1arg1sizeof(arg1));
    new 
String:arg2[32];
//    new String:argBuffer[32];
//    new indexArray[32] = { -1, ... };
//    GetCmdArg(2, arg2, sizeof(arg2));

//    new String:activity[64];
//    new String:formatBuffer[32];
    
    
for (new slot 0slot 6slot++)
    {
        if (
slot == 0)
        {
            
g_iPermItems[client][slot] = -1;
            
PrintToChat(client"[SM] You have successfully unequipped your custom primary weapon.");
        }
        if (
slot == 1)
        {
            
g_iPermItems[client][slot] = -1;
            
PrintToChat(client"[SM] You have successfully unequipped your custom secondary weapon.");
        }
        if (
slot == 2)
        {
            
g_iPermItems[client][slot] = -1;
            
PrintToChat(client"[SM] You have successfully unequipped your custom melee weapon.");
        }
    }
    return 
Plugin_Handled;


I've tried using "switch (slot)", then setting up "case 0:", "case 1:", and "case 2:", but that didn't work, instead displaying all three messages at once.

I've tried changing the "g_iPermItems[client][slot] = -1;" to "g_iPermItems[client][0] = -1;" (change the 0 to 1 or 2, you get the idea). That didn't work too well.

The code above removes the custom weapons (all of them, which I'm guessing is caused by the "[slot]" not having a number in it instead of 'slot') and displays all three messages at once.

How do I fix this? (it's a custom thing, it'll be used in a custom "equip weapons" panel menu that I'm working on)

FlaminSarge 03-12-2013 20:28

Re: [TF2Items] Give Weapon (v3.14, 01/23/2013)
 
The quickest way to make the change would be to keep all the code, set arg1 to be "@me", decrease the GetCmdArg(# numbers by 1, and add COMMAND_FILTER_IGNORE_IMMUNITY (or whatever it is) to the ProcessTargetString stuff.

404UserNotFound 03-12-2013 20:59

Re: [TF2Items] Give Weapon (v3.14, 01/23/2013)
 
Quote:

Originally Posted by FlaminSarge (Post 1911650)
The quickest way to make the change would be to keep all the code, set arg1 to be "@me", decrease the GetCmdArg(# numbers by 1, and add COMMAND_FILTER_IGNORE_IMMUNITY (or whatever it is) to the ProcessTargetString stuff.

Hmm...that's a damn good idea. Why didn't I think of that? Thanks Sarge, you're the best :)

Bitl 03-12-2013 23:57

Re: [TF2Items] Give Weapon (v3.14, 01/23/2013)
 
For some reason the Ap-Sap does not spawn.

UsernameInvalid 03-13-2013 00:11

Re: [TF2Items] Give Weapon (v3.14, 01/23/2013)
 
Quote:

Originally Posted by Bitl (Post 1911717)
For some reason the Ap-Sap does not spawn.

I can second this, tried to spawn it for the hell of it earlier.

Nor does the Ham Shank.


All times are GMT -4. The time now is 00:38.

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