hi
im working on a script for surf_ninja.
where if your gun is != to Shotgun and you attack someone whos gun is != shotgun then you get slayed.
how do i use a get_user_weapon or get_weaponname functions?
Code:
public killer_event(id)
{
if(!get_cvar_num("surf_enable"))
{
return PLUGIN_CONTINUE
}
new attacker = get_user_attacker(id)
if(!attacker)
{
return PLUGIN_CONTINUE
}
new attackerName[18]
new victimName[18]
get_user_name(attacker, attackerName, 17)
get_user_name(id, victimName, 17)
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
}
heres the orginal un-modifed code this is a working script atm, just trying to add some more fuctionality to it.
so i want to it to slay anyone who doesnt have a shotgun and attacks. but not slay them if they attack the shotgun carrier and vice versa
__________________