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

register "DeathMsg"


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 10-10-2011 , 23:16   register "DeathMsg"
Reply With Quote #1

Hey!

I made in my plugin a DeathMsg forward, that when a player dies (getting killed). So I made a register + public to CHECK it reaches there, UNFORTUNATELY, it doesnt reach the public cuz it doesnt print anything:

Why is that?

PHP Code:
// in plugin_init:
register_event("DeathMsg""hook_death""a")

public 
hook_death()
{
      
// client_print in print_chat something to check if it reached.
      // nothing is being printed...

__________________
My Projects:

Auto-Mix (Pug): 100%

Joined the Military (a soldier now) - Inactive
Diegorkable is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-11-2011 , 01:46   Re: register "DeathMsg"
Reply With Quote #2

Looks fine to me. Make a test plugin by itself with only that code and see if it works there. If it does then there is something wrong with your original code elsewhere.

I use DeathMsg in my Bot Apology plugin (in my sig).
__________________
fysiks is online now
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-11-2011 , 04:22   Re: register "DeathMsg"
Reply With Quote #3

Please show the whole plugin_init, make sue that all you declare in there and that needs a callback has the public function existing in the plugin.
Open amxmodx/logs/ and check if there are some errors.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Snaker beatter
Veteran Member
Join Date: Sep 2011
Location: Manila, Philippines
Old 10-11-2011 , 07:03   Re: register "DeathMsg"
Reply With Quote #4

Quote:
Originally Posted by Diegorkable View Post
Hey!
Quote:
public hook_death()
{
// client_print in print_chat something to check if it reached.
// nothing is being printed...
}
add a code "new id = read_data(2)"
then add your print_chat "client_print(id, print_chat, "<message>")
__________________
Snaker beatter is offline
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 10-11-2011 , 09:21   Re: register "DeathMsg"
Reply With Quote #5

Quote:
Originally Posted by Snaker beatter View Post
add a code "new id = read_data(2)"
then add your print_chat "client_print(id, print_chat, "<message>")
doesnt matter, doing a normal client_print will work aswell, I'll try do what connor said, if it doesnt help i'll post here the plugin init asap
__________________
My Projects:

Auto-Mix (Pug): 100%

Joined the Military (a soldier now) - Inactive
Diegorkable is offline
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 14:24.


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