Raised This Month: $ Target: $400
 0% 

get attackers gun


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Anthraxnz
Senior Member
Join Date: May 2005
Location: New Zealand
Old 02-28-2006 , 01:33   get attackers gun
Reply With Quote #1

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
__________________
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