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
}
if you shoot someone with a usp it kills u.