AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Knives Only (https://forums.alliedmods.net/showthread.php?t=19911)

SilverTide 10-28-2005 07:06

Knives Only
 
1 Attachment(s)
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".

kILL-jOY 10-28-2005 08:54

nj ill try it out

uTg | bigpapajiggs 10-28-2005 11:16

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

I will try this on my server

SilverTide 10-28-2005 11:41

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.

uTg | bigpapajiggs 10-29-2005 02:04

just restrict grenades somehow while plugin is on. As a matter of fact, just resrict everything.

SilverTide 10-29-2005 05:52

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. :P

Hawk552 10-29-2005 12:48

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");

SilverTide 10-29-2005 18:55

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. :D

kILL-jOY 11-11-2005 17:04

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

rudeboyo7 06-28-2006 22:37

Re: Knives Only
 
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^^


All times are GMT -4. The time now is 03:54.

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