Raised This Month: $ Target: $400
 0% 

Knife Reward


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 12-03-2010 , 10:08   Re: Knife Reward
Reply With Quote #6

You also need to check if attacker is a player entity:
Code:
#include <amxmodx> #define is_user_valid_connected(%1) (1 <= %1 <= 32 && g_connected[ %1 ]) new g_kills[33], g_connected[33] public plugin_init() register_plugin( "how", "r", "u" )     register_event("DeathMsg", "Event_Deathmsg", "a")       public Event_DeathMsg() {     static attacker; attacker = read_data(1)         if (is_user_valid_connected(attacker) && get_user_weapon(attacker) == CSW_KNIFE)     {         g_kills[attacker]++                   if (g_kills[attacker] == 3)         {             g_kills[attacker] -= 3             server_cmd("molotov_give %s", attacker)         }     } } public client_disconnect( id ) g_connected[ id ] =false     g_kills[ id ] = 0 public client_connect( id ) g_connected[ id ] = true
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
 



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 11:23.


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