Raised This Month: $51 Target: $400
 12% 

Blocking the DeathMsg if suicide and set as someone else


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 04-30-2006 , 14:25   Blocking the DeathMsg if suicide and set as someone else
Reply With Quote #1

As title say I need to block the deathmsg if they suicide...either fall to death or blow them selves up. Being killed by the bomb shouldn't count though.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Batman/Gorlag
Senior Member
Join Date: Aug 2005
Old 04-30-2006 , 15:21  
Reply With Quote #2

For blocking the death message:

Code:
register_message(get_user_msgid("DeathMsg"), "death_check") public death_check(msg_id, msg_dest, msg_entity) {    if(get_msg_arg_int(1) == 0) //first argument is the killer, 0 if worldspawn    return PLUGIN_HANDLED    else       return PLUGIN_CONTINUE }

Try this, tell me if this works. Didn't test, came this up on the top of my head.
__________________
GRR If only the amxmod programming were in Java.....
Java and C used to be two different languages, now Java is turning into another C. My logevent plugin
Batman/Gorlag is offline
Batman/Gorlag
Senior Member
Join Date: Aug 2005
Old 04-30-2006 , 20:31  
Reply With Quote #3

Code:
register_message(get_user_msgid("DeathMsg"), "death_check") public death_check(msg_id, msg_dest, msg_entity) {     new killer = get_msg_arg_int(1)     new victim = get_msg_arg_int(2)     if(killer == 0 || killer == victim || killer > 32) //first argument is the killer, 0 if worldspawn         return PLUGIN_HANDLED     return PLUGIN_CONTINUE }


Alright I took some time to test it, and here's the code that works. This catches players falling, blowing themselves up, using kill to commit suicide and using team switching to commit suicide.
__________________
GRR If only the amxmod programming were in Java.....
Java and C used to be two different languages, now Java is turning into another C. My logevent plugin
Batman/Gorlag is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 04-30-2006 , 22:17  
Reply With Quote #4

Thanks. I'll have to consider if they use kill or change teams because that won't help me.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Reply



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


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