AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   [REQ] Strip Primary weapon, secondary weapon, grenades. (https://forums.alliedmods.net/showthread.php?t=170478)

Evaldas.Grigas 10-25-2011 11:51

[REQ] Strip Primary weapon, secondary weapon, grenades.
 
I request someone to make a module that would include this commands:
Code:

stripuserweapons(id, "primary_weapon")
stripuserweapons(id, "secondary_weapon")
stripuserweapons(id, "grenades")


drekes 10-25-2011 12:02

Re: [REQ] Strip Primary weapon, secondary weapon, grenades.
 
Can be done by a simple stock too, you don't need a module for that.

Edit: Working on this, gonna end up with a .inc file.

Evaldas.Grigas 10-25-2011 12:34

Re: [REQ] Strip Primary weapon, secondary weapon, grenades.
 
Great!

drekes 10-25-2011 12:58

Re: [REQ] Strip Primary weapon, secondary weapon, grenades.
 
Inc:
http://forums.alliedmods.net/showpos...38&postcount=9

test plugin:
PHP Code:

#include <amxmodx>
#include <stripweapons>
#include <fakemeta>


public plugin_init()
{
    
register_clcmd("strip""CmdStrip");
}


public 
CmdStrip(id)
{
    new 
szArg[5];
    
read_argv(1szArgcharsmax(szArg));
    
strtolower(szArg);
    
    switch(
szArg[0])
    {
        case 
'p'StripWeapons(idPrimary);
        case 
's'StripWeapons(idSecondary);
        case 
'g'StripWeapons(idGrenades);
        case 
'c'StripWeapons(idC4);
        case 
'k'ham_strip_user_weapon(idCSW_KNIFE3true);
        default: 
console_print(id"Wrong argument.");
    }
    
    return 
PLUGIN_HANDLED;



Evaldas.Grigas 10-25-2011 14:26

Re: [REQ] Strip Primary weapon, secondary weapon, grenades.
 
How do you name this inc?

EDIT: Found it. <stripweapons>

EDIT 2: Works perfect thanks! You saved me useless ~25 lines in my plugin!

Evaldas.Grigas 10-28-2011 12:16

Re: [REQ] Strip Primary weapon, secondary weapon, grenades.
 
Yo, drekes. Can you add 1 feature? Please make that this include could strip all grenades and seperately. Example:
PHP Code:

StripWeapons(idCSW_HEGRENADE


drekes 10-28-2011 12:38

Re: [REQ] Strip Primary weapon, secondary weapon, grenades.
 
Quote:

Originally Posted by Evaldas.Grigas (Post 1585015)
Yo, drekes. Can you add 1 feature? Please make that this include could strip all grenades and seperately. Example:
PHP Code:

StripWeapons(idCSW_HEGRENADE


PHP Code:

ham_strip_user_weapon(idCSW_HEGRENADE); 

the ham* stock is also in that include.

Evaldas.Grigas 10-28-2011 12:39

Re: [REQ] Strip Primary weapon, secondary weapon, grenades.
 
So I can use this sort of code? Or other CSW_ right?

drekes 10-28-2011 15:10

Re: [REQ] Strip Primary weapon, secondary weapon, grenades.
 
2 Attachment(s)
I've commented the .inc & made a small change.
That should help you understand it.

Evaldas.Grigas 10-28-2011 15:14

Re: [REQ] Strip Primary weapon, secondary weapon, grenades.
 
Thank you. But I still don't understand what do you mean by changeing weapon?
EDIT: Understood by reading it 10 times.


All times are GMT -4. The time now is 21:47.

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