Raised This Month: $ Target: $400
 0% 

give_item


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-12-2007 , 23:16   Re: give_item
Reply With Quote #16

This is how I would implement it. Sorry if I messed up your formatting.

Code:
#include <amxmodx> #include <fun> #define PLUGIN "New Plugin" #define VERSION "1.0" #define AUTHOR "Author" new Float:lastDeathMsg[33] // bugfix public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_event("DeathMsg","giveItem","a") } public giveItem() {     new killer = read_data(1)     new victim = read_data(2)     // bugfix     new Float:now = get_gametime()     if(lastDeathMsg[victim] - now < 0.2)         return;     lastDeathMsg[victim] = now     new kName[32], vName[32]     get_user_name(killer,kName,31)     get_user_name(victim,vName,31)     client_print(0,print_chat,"Killer: %s - Victim: %s",kName,vName)     if (killer != victim) {         give_item(killer,"weapon_hegrenade")     } }
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX 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 11:07.


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