Raised This Month: $ Target: $400
 0% 

get attackers gun


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Anthraxnz
Senior Member
Join Date: May 2005
Location: New Zealand
Old 02-28-2006 , 03:25  
Reply With Quote #6

Code:
/* Surf Slayer    Written by Anthrax    Cvars: surf_enable 1 | 0    1 = On    0 = Off    Description:    This is designed for surf servers, when a player attacks another player    the attacking player will be kill instantly, leaving the other player to    continue on with trying to surf.         Version History:     3.00    - Modifed by anthrax to allow killing with the prize weapon         1.00b   - Modified (Anders Dog) to send HUD messages to everyone         1.00    - Created by Anthrax */ #include <amxmodx> #include <engine> #include <amxmisc> public plugin_init() {         register_plugin("Surf Patrol","3.0","Anthrax")         register_cvar("surf_slayer_enable","1")         register_event("Damage","killer_event","b","2!0","3=0","4!0") } public killer_event(id) {         if(!get_cvar_num("surf_slayer_enable"))         {                 return PLUGIN_CONTINUE         }     new attacker = get_user_attacker(id)     new ammo, clip, weapon = get_user_weapon(attacker,clip,ammo)         if(!attacker)         {                 return PLUGIN_CONTINUE         }         new attackerName[18]         new victimName[18]         get_user_name(attacker, attackerName, 17)         get_user_name(id, victimName, 17)         if( weapon == CSW_SCOUT || CSW_KNIFE ){         user_kill(attacker,0)                 client_print(attacker,print_chat,"You Were Slayed For Attempting To Kill")             set_hudmessage(0, 100, 200, 0.75, 0.50, 2, 0.1, 4.0, 0.02, 0.02, 9)             show_hudmessage(0, "%s", attackerName, " was slayed for attacking %s", victimName)         return PLUGIN_CONTINUE     }     client_print(0,print_chat,"%s",weapon)         return PLUGIN_CONTINUE }

any idea as to why it doesnt work?

if you shoot someone with a usp it kills u.
it just kills you for shooting with any weapon
__________________
Dont know how to add admins?

use my program
http://www.amxmodx.org/forums/viewto...=129092#129092

it does the work for you ... sort of
Anthraxnz is offline
 



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 20:25.


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