Raised This Month: $ Target: $400
 0% 

knife plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
omgitsme
Veteran Member
Join Date: Mar 2010
Old 06-13-2010 , 10:32   knife plugin
Reply With Quote #1

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)
Code:
#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
__________________
omgitsme is offline
Send a message via Skype™ to omgitsme
Old 06-13-2010, 11:12
SaM.ThE.MaN
This message has been deleted by SaM.ThE.MaN.
5c0r-|3i0
Veteran Member
Join Date: Nov 2008
Location: Việt Nam
Old 06-13-2010 , 11:36   Re: knife plugin
Reply With Quote #3

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 .
5c0r-|3i0 is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 06-14-2010 , 08:51   Re: knife plugin
Reply With Quote #4

I don't get the purpose of this thread?
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
SaM.ThE.MaN
Senior Member
Join Date: Jan 2010
Old 06-14-2010 , 09:39   Re: knife plugin
Reply With Quote #5

ive played on a server called Sorpack , they have done that
__________________
  • Project : Level Plugin
o [||||||||||] - 100%
  • Project : OnePieceMod
o [||||||||||] - 20%
SaM.ThE.MaN is offline
hzqst
Senior Member
Join Date: Jul 2008
Old 06-14-2010 , 10:01   Re: knife plugin
Reply With Quote #6

Sorpack is from HK
it's easy to be done
there are many plugins that change knife model and damage
hzqst is offline
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 14:45.


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