Raised This Month: $94 Target: $400
 23% 

Knives Only


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff        Approver:   twistedeuphoria (82)
SilverTide
Junior Member
Join Date: Jan 2005
Location: United Kingdom
Old 10-28-2005 , 08:06   Knives Only
Reply With Quote #1

Knives Only Version 0.1a

This is my first plug-in I've submitted though I've done others for use on my server. I'm trying to learn this language so a lot of my plug-ins at the moment are borrowed heavily from other people.

Features:
- Enable and disable knives only, no weapon other than the knife will be allowed.
- Start a vote for knives only with /voteknivesonly.

Cvars:
amx_knivesonly <1|0> (Default: 0)
[ Enables or Disables knives only mode ]

Client Commands:
say /voteknivesonly
[ Starts a vote for knives only mode ]

Credits:
Billythekid: I "borrowed" a lot of code from the "knifes only" plug-in he wrote ( or that he borrowed from Zaolta? I never figured out.. ) Most of this code is from his plug-in though, so it is more his than mine.

Differences between this version and his version:
- On Billythekid's version, when another weapon is equipped, it is just dropped/thrown out infront of you, meaning if you are moving forwards you will pick it up again straight away, and there are a bunch of weapons lying around the battlefield, on my version the player is moved outside the map, then his/her weapons are stripped and then the player is moved back up to where they were before, and it happens so fast you don't notice.
- My code is neater.
- Spelling mistakes and bad grammar have been removed.

I have tested this plug-in on my 1.6 server and it works fine with no errors that I can see so far.

Edit: Added "cvars".
Attached Files
File Type: sma Get Plugin or Get Source (amx_knivesonly.sma - 22529 views - 6.2 KB)
SilverTide is offline
Send a message via MSN to SilverTide
kILL-jOY
Member
Join Date: Jul 2005
Old 10-28-2005 , 09:54  
Reply With Quote #2

nj ill try it out
__________________
**|$uperHero|** Free level 8 / 75+ Heroes / BuyXP at 68.191.146.3:27015 - CS 1.6


kILL-jOY is offline
uTg | bigpapajiggs
Senior Member
Join Date: Sep 2005
Location: Bellingham, WA
Old 10-28-2005 , 12:16  
Reply With Quote #3

Yes, definately better to be thrown outside, stripped and thrust back into action!

I will try this on my server
__________________
What's my confidence level? I do crossword puzzles with a pen.
uTg | bigpapajiggs is offline
Send a message via AIM to uTg | bigpapajiggs Send a message via MSN to uTg | bigpapajiggs Send a message via Yahoo to uTg | bigpapajiggs
SilverTide
Junior Member
Join Date: Jan 2005
Location: United Kingdom
Old 10-28-2005 , 12:41  
Reply With Quote #4

Only problem I can find is that I don't know how to make the player "drop" grenades. Can anyone point me in the right direction with that?

Note: If they equip them it still jumps back to knife, but it's still an annoyance.
SilverTide is offline
Send a message via MSN to SilverTide
uTg | bigpapajiggs
Senior Member
Join Date: Sep 2005
Location: Bellingham, WA
Old 10-29-2005 , 03:04  
Reply With Quote #5

just restrict grenades somehow while plugin is on. As a matter of fact, just resrict everything.
__________________
What's my confidence level? I do crossword puzzles with a pen.
uTg | bigpapajiggs is offline
Send a message via AIM to uTg | bigpapajiggs Send a message via MSN to uTg | bigpapajiggs Send a message via Yahoo to uTg | bigpapajiggs
SilverTide
Junior Member
Join Date: Jan 2005
Location: United Kingdom
Old 10-29-2005 , 06:52  
Reply With Quote #6

Quote:
Originally Posted by Lord Saddler
just restrict grenades somehow while plugin is on. As a matter of fact, just resrict everything.
Running mods like War3 or SHero might give people grenades without them actually buying them.

Although restricting everything might be a good idea since that way people won't waste their money. But maybe defuse kit should not be restricted.
SilverTide is offline
Send a message via MSN to SilverTide
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 10-29-2005 , 13:48  
Reply With Quote #7

You know, rather than teleporting them to a few units under where they are and then forcing them to drop their weapons, you can just do

Code:
strip_user_weapons(id); give_item(id,"weapon_knife");
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
SilverTide
Junior Member
Join Date: Jan 2005
Location: United Kingdom
Old 10-29-2005 , 19:55  
Reply With Quote #8

Quote:
Originally Posted by Hawk552
You know, rather than teleporting them to a few units under where they are and then forcing them to drop their weapons, you can just do

Code:
strip_user_weapons(id); give_item(id,"weapon_knife");
Does that actually work? O_o It seems a little obvious. I'll test tomorrow, I've got some other features I'm wanting too add.
SilverTide is offline
Send a message via MSN to SilverTide
kILL-jOY
Member
Join Date: Jul 2005
Old 11-11-2005 , 18:04  
Reply With Quote #9

u should add a limit so a vote for knives only can only happen every 3 minutes

this on guy on my server REALLY wanted knives so repeativly start a knives only vote
__________________
**|$uperHero|** Free level 8 / 75+ Heroes / BuyXP at 68.191.146.3:27015 - CS 1.6


kILL-jOY is offline
rudeboyo7
New Member
Join Date: Jun 2006
Old 06-28-2006 , 23:37   Re: Knives Only
Reply With Quote #10

Um sry but wasn't this already made, the edited version of billythekid's

BoK | Krazy Posted it about 6 months ago or so...j/w if you check it out and the whole sma is written out ;) so ur the second with this
http://forums.alliedmods.net/showthr...?t=2970&page=5
^^ right there^^
rudeboyo7 is offline
Reply


Thread Tools
Display Modes

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 08:07.


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