PDA

View Full Version : knife plugin


omgitsme
06-13-2010, 10:32
i want to make my first plugin, it's just a simple knife in extra items menu. and when you buy it, and knife a zombie. it takes away 500hp (you can change this)


#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <zombieplague>

new g_epicknife
new g_hasknife
new g_takeknife
new g_damage
new g_knifecost

new const medicgun_viewmodel[] = "models/v_knifen.mdl";

public plugin_init()
{
register_plugin("Epic knife", "1.0", "omgitsme");
register_event("CurWeapon", "event_CurWeapon", "b", "1=1");
register_event("Damage", "event_Damage", "b", "500");
g_epicknife = zp_register_extra_item("Epic knife" ,g_knifecost , ZP_TEAM_HUMAN);
g_hasknife =

don't laught please, it's my first plugin

5c0r-|3i0
06-13-2010, 11:36
1) g_hasknife should be an bool ...
2) You create a new variable called g_knifecost without an value => the knife will be free ( = 0 ).
....
Just post the part that is needed to be modified and we 'll help you .

Jelle
06-14-2010, 08:51
I don't get the purpose of this thread?

SaM.ThE.MaN
06-14-2010, 09:39
ive played on a server called Sorpack , they have done that

hzqst
06-14-2010, 10:01
Sorpack is from HK
it's easy to be done
there are many plugins that change knife model and damage