Could someone recode this .sma file
/********************************************* ***
One Hit Knife Kills Author: Rabid Baboon Version: 1.3 Mod: Counter-Strike Requires: AMX mod X v1.01 Required Modules: cstrike, fakemeta engine and csx Description: Kills a player in one hit from the knife. Special Thanks: FireStorm - For the sucide message block function. Changelog: v1.3 Fixed getting knife kills when another player takes fall damage. v1.2 Blocked sucide message from knife kills. v1.1 Self-kill from fall damage while knife is out fixed. ********************************************* ***/ #include <amxmodx> #include <cstrike> #include <csx> #include <fakemeta> #include <engine> #include <engine_stocks> #include <fun> /********************************************* *** Global Variables ********************************************* ***/ new knifekill = 0 /********************************************* *** Main Functions ********************************************* ***/ /********************************************* *** plugin_modules() Required modules listed here. Plugin will not work if they are not loaded. ********************************************* ***/ public plugin_modules() { require_module("cstrike"); require_module("csx"); require_module("fakemeta"); require_module("engine"); } /********************************************* *** plugin_init() Initializes the plugin. ********************************************* ***/ public plugin_init() { register_plugin("One Hit Knife Kills", "1.3", "Rabid Baboon") register_forward(FM_AlertMessage,"blocksuicid e") return PLUGIN_HANDLED } /********************************************* *** client_damage(attacker, victim, damage, wpnindex, hitplace, TA) Kills a player if he was damaged by a knife. Called when a player takes damage ********************************************* ***/ public client_damage(attacker, victim, damage, wpnindex, hitplace, TA) { if(is_user_alive(victim)) { if((attacker != victim)) //prevents killing self with knife from fall damage. { if(wpnindex == CSW_KNIFE && TA != 1) { if(damage != DMG_FALL) { knifekill = 1 if(hitplace == HIT_HEAD) { make_deathmsg(attacker, victim, 1, "knife") } else { make_deathmsg(attacker, victim, 0, "knife") } user_silentkill(victim) set_user_frags(attacker, get_user_frags(attacker)+1) } } } } return PLUGIN_HANDLED } /********************************************* *** blocksuicide(at_type, message[]) Blocks the sucide message caused user_silentkill ********************************************* ***/ public blocksuicide(at_type, message[]) { if(containi(message,"suicide") > -1 && containi(message,"world") > -1 && knifekill == 1) { knifekill = 0 return FMRES_SUPERCEDE } return PLUGIN_CONTINUE } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par } */ could someone recode that for admin only? |
Re: Could someone recode this .sma file
you know if you take them from behind they will be dead. 193 dmg :P
|
Re: Could someone recode this .sma file
Try this :
Code:
|
Re: Could someone recode this .sma file
Quote:
buh ahm. how much damage does it do ? and wat admin_level u need to have to get to use this? |
Re: Could someone recode this .sma file
Quote:
#define ADMIN_LEVEL ADMIN_IMMUNITY Change ADMIN_IMMUNITY by what you want. http://www.amxmodx.org/funcwiki.php?...=1#const_admin Quote:
|
Re: Could someone recode this .sma file
Also, if you replace:
Code:
Code:
|
Re: Could someone recode this .sma file
wait ahm. whats with the double kills?
everytime i kill someone with a knife. it alwys said i killed him/her twice? and the one knife kill doesnt work at all.. can someone recode this into a right way? or maybe im doing somthing wrong. and im using Purple_pixie's edited one... |
Re: Could someone recode this .sma file
shuld work instant kill whit knife exept admins
but will be random hs on the death msg dont know how to get hs -.- Code:
|
Re: Could someone recode this .sma file
Your plugin failed to compile! Read the errors below:
Welcome to the AMX Mod X 1.76-300 Compiler. Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team /home/groups/amxmodx/tmp3/textIMbPtx.sma(18) : error 017: undefined symbol "BLOC" /home/groups/amxmodx/tmp3/textIMbPtx.sma(18) : error 017: undefined symbol "K_ONCE" ahm. yea. |
Re: Could someone recode this .sma file
@ Pnoibestylin : It doesn't work what I've done ?
|
| All times are GMT -4. The time now is 16:05. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.