register death event for everyone
I want to find out when someone dies on both ct and t. so i can make it so whn somoene dies, my hero gets health and money!
[edit] get_user_health and set_user_healtha nd all of that is suppose to have a cs infront, i know im just too lazy to go back and put it...[/edit] for example register_plugin() { register_event( "Death", "wdeath", "b" ); return PLUGIN_CONTINUE; } public wdeath( wht do put here? ) { new temp[6] // First Argument is an id read_argv(1,temp,5) new id=str_to_num(temp) set_user_health(get_user_health(id) + 25) set_user_money(get_user_money(id) + 400) return PLUGIN_CONTINUE; } |
register_event( "DeathMsg", "wdeath", "a" ); when you put b there this function won't be ever executed .
Code:
* Flags:Code:
public wdeath(){ |
thanks ur the best!
problem, it says "function wdeath should return a value? Code:
register_event( "DeathMsg", "wdeath", "a" );Code:
public wdeath() |
Code:
public plugin_init(){ |
I love u, man....thanks
it works perfectly even though im unsure whts diff from whts he wrote before you.. can you tell me wht the difference was.. THANKS! |
| All times are GMT -4. The time now is 14:46. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.