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

Strip weapon


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Artifact
Veteran Member
Join Date: Jul 2010
Old 07-20-2012 , 15:42   Strip weapon
Reply With Quote #1

How to block all weapons except knife...

Something like
PHP Code:
    for (new 0weapon_knifei++) {
        if (
weaponType == weapon_knife[i])
            return 
PLUGIN_CONTINUE
    engclient_cmd
(id"weapon_knife"
But only for one player
__________________

Last edited by Artifact; 07-20-2012 at 15:43.
Artifact is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 07-20-2012 , 21:01   Re: Strip weapon
Reply With Quote #2

get all players and choose a random one. If you're stripping weapons, first do that, then give the item knife back.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Swaycher
Senior Member
Join Date: Feb 2009
Location: Arg/MyHome/PawnStudio
Old 07-20-2012 , 21:05   Re: Strip weapon
Reply With Quote #3

Quote:
Originally Posted by Artifact View Post
How to block all weapons except knife...

Something like
PHP Code:
    for (new 0weapon_knifei++) {
        if (
weaponType == weapon_knife[i])
            return 
PLUGIN_CONTINUE
    engclient_cmd
(id"weapon_knife"
But only for one player
You want to STRIP all weapons except knife or you want to BLOCK all weapons except knife? are two different things.
__________________
Quote:
Originally Posted by fearAR View Post
Claro esta que no tengo idea de como verificar los diferentes cortes de ángulo.
http://forums.alliedmods.net/showthread.php?t=196349

Last edited by Swaycher; 07-20-2012 at 21:05.
Swaycher is offline
Send a message via MSN to Swaycher Send a message via Skype™ to Swaycher
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 07-20-2012 , 21:08   Re: Strip weapon
Reply With Quote #4

If you want to block a weapon, use CurWeapon event
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
rak
Veteran Member
Join Date: Oct 2011
Location: banned country
Old 07-20-2012 , 23:49   Re: Strip weapon
Reply With Quote #5

I use Ham_Item_Deploy in post, to block a weapon
__________________

www.amxmodx-es.com

Steam: Luchokoldo
rak is offline
Send a message via MSN to rak Send a message via Skype™ to rak
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-21-2012 , 00:01   Re: Strip weapon
Reply With Quote #6

Hook buy and pickup and block both for that player.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Artifact
Veteran Member
Join Date: Jul 2010
Old 07-21-2012 , 09:41   Re: Strip weapon
Reply With Quote #7

Quote:
Originally Posted by Napoleon_be View Post
get all players and choose a random one. If you're stripping weapons, first do that, then give the item knife back.
All right, but how to choose target from all players? Thats the problem
__________________
Artifact is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 07-21-2012 , 11:33   Re: Strip weapon
Reply With Quote #8

new players[32], count
get_players(players, count, "a")

new randomplayer = players[random(count)]

This should do.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Artifact
Veteran Member
Join Date: Jul 2010
Old 07-21-2012 , 17:53   Re: Strip weapon
Reply With Quote #9

Quote:
Originally Posted by Artifact View Post
All right, but how to choose target from all players? Thats the problem
__________________
Artifact is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 07-21-2012 , 21:30   Re: Strip weapon
Reply With Quote #10

What do you mean target?...
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
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 11:23.


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