AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Knife Drop (https://forums.alliedmods.net/showthread.php?t=103856)

Alucard^ 09-17-2009 02:03

Knife Drop
 
2 Attachment(s)
Description:

This plugin is very simple i think but well... i didn't see a plugin with this characteristics.

You can drop weapons, good... but when you try to drop the knife... what happen? oh yes: "This weapon cannot be dropped". Well, with this plugin you can say "f*ck you" to that message and drop the knife. You have 2 types of knife drop, but btw, see the cvars below.

Requirements:
Code:
#include <cstrike> #include <fakemeta> #include <hamsandwich>
Commands:
  • say /knife: Show a menu asking you, if you want to buy a knife, with the price too.
Cvars:
  • kd_type (Default: 2)
    • 0: Players can't drop the knife.
    • 1: Players can drop the knife but the knife disappear.
    • 2: Players can drop the knife to the floor (ofcourse players can take a knife dropped).
  • kd_onlyadmins (Default: 0)
    • 0: All players can drop the knife.
    • 1: Only Players/Admins with ADMIN_KICK flag can drop the knife (you can change the flag in the 4th define)
    • If this cvar is enabled and you are not an admin, you will recive a msg when you try to drop the knife (telling you that only admins can do this action).
  • kd_showmsg (Default: 1)
    • 0: Don't show a center message in the screen of the player when he drop the knife.
    • 1: Show a center message in the screen of the player when he drop the knife.
  • kd_msg_cantdrop (Default: 1)
    • 0: When you can't drop the knife you will not recive any msg (kd_type value have to be in 0).
    • 1: When you can't drop the knife you will recive the normal msg "This weapon cannot be dropped".
  • kd_menu_enable (Default: 1) *NEW
    • 0: "Knife Buy Menu" disabled.
    • 1: "Knife Buy Menu" enabled.
  • kd_menu_cost (Default: 800) *NEW
    • Cost of the knife, ofcourse kd_menu_enable cvar must be in 1.
  • kd_usage (Default: 1) *NEW
    • 0: Don't remove the knife when a player kill an enemy with a knife.
    • 1: Remove the knife If a player kill (with knife) "X" number (controled by another cvar) of enemies.
  • kd_kills (Default: 2) *NEW
    • How much kills (with knife) can be made after remove the knife from the player. This cvar in 0/1 is the same. Also kd_usage have to be actived.
  • kd_showmenu (Default: 1) *NEW
    • 0: Don't show any menu if the knife was removed.
    • 1: Show the "Knife Buy Menu" when the knife is removed. Ofcourse kd_usage & kd_menu_enable cvars must be enabled.
Images:

http://img11.**************/img11/9242/knifedropped.png
http://img11.**************/img11/1862/knifedropped2.png
http://img19.**************/img19/6297/handsk.png *NEW

Extra Notes:

In the top of the plugin you can change some things...
Code:

// --------------------START EDIT------------------------ //

#define MODEL_ON

#define is_user_admin2(%1)  (get_user_flags(%1) & ADMIN_KICK)

#if defined MODEL_ON
new const V_HAND_MODEL[]    = "models/v_hands.mdl"
#endif

// --------------------END EDIT------------------------- //

a) Comment the MODEL_ON define if you don't want to use the hand model.

b) You can change ADMIN_KICK flag to another flag that you want.

c)
Here you can change the model (Ofcourse if MODEL_ON is uncommented).

Credits:
Changelog:
  • Version 1.0
    • First Release.
  • Version 1.1
    • Added new cvars with more features.
    • Added new command to acces to the menu.
    • Added menu to buy knife if you don't have one.
    • Added new feature that when you kill "X" number of players the knife dissapear, also the "Knife Buy Menu" show up.
    • Added cstrike module.
    • Other minor changes.
  • Version 1.2
    • Minor optimization suggested by fezh (click me).
    • Added a hand model when you don't have any weapon.
    • Added Extra Notes to the thread, to change some things in the plugin.
    • Added Image of the hand model.
    • Added Sylwester to the credits.
P.S: Sry if i writed something wrong... correct me if i did it... My english isn't perfect.

GmTx 09-17-2009 02:22

Re: Knife Drop
 
Good job man

Alucard^ 09-17-2009 02:50

Re: Knife Drop
 
Quote:

Originally Posted by GmTx (Post 935493)
Good job man

Thx.

- Added 2 images in the first post.
- Fixed variable name.

One 09-17-2009 04:34

Re: Knife Drop
 
ok for first i tough its anything like this "Pistol And Amno" i tough when you drop your knife, on new round, you get a new knife :)) but as i read the description....

GJ dude. its raaly silly when you cant drop your knife :D its now nicer.

ot_207 09-17-2009 04:47

Re: Knife Drop
 
I suggest making the knife take damage.

Ex: You kill two players, the kinife damage becomes lower, you need to drop it and get the knife from other players.
If a player has died and had knife he will drop it. :)
And eventually a buy system.

Alucard^ 09-17-2009 05:22

Re: Knife Drop
 
Good suggestion OT, i will add this.

KadiR 09-17-2009 05:59

Re: Knife Drop
 
looks different, gj!

Jon 09-17-2009 12:34

Re: Knife Drop
 
Quote:

Originally Posted by Alucard^ (Post 935486)
Description:

This plugin es very simple i think but well... i didn't see a plugin with this characteristics.

You can drop weapons, good... but when you try to drop the knife... what happen? oh yes: "This weapon cannot be dropped". Well, with this plugin you can say "f*ck you" to that message and drop the knife. You have 2 types of knife drop, but btw, see the cvars below.

Fix

sooN 09-17-2009 14:45

Re: Knife Drop
 
why cut not on the floor? you can't make an small model ?

KadiR 09-17-2009 15:08

Re: Knife Drop
 
Quote:

Originally Posted by sooN (Post 936004)
why cut not on the floor? you can't make an small model ?

cause its default cs knife model....


All times are GMT -4. The time now is 01:20.

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