Raised This Month: $ Target: $400
 0% 

[HELP] I got problems with RegisterHam


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 03-14-2009 , 08:02   [HELP] I got problems with RegisterHam
Reply With Quote #1

Hey,

I use a plugin, and changed something, it works, but it gives a little error who shuts down the server...

I debugged it:

Quote:
L 03/14/2009 - 08:00:02: [AMXX] Displaying debug trace (plugin "admin_respawn.amxx")
L 03/14/2009 - 08:00:02: [AMXX] Run time error 10: native error (native "RegisterHam")
L 03/14/2009 - 08:00:02: [AMXX] [0] admin_respawn.sma::plugin_init (line 10)
Ohh, found it, its not nesscesary at all
Attached Files
File Type: sma Get Plugin or Get Source (admin_respawn.sma - 730 views - 1.1 KB)
__________________

Last edited by crazyeffect; 03-14-2009 at 08:05.
crazyeffect is offline
Send a message via MSN to crazyeffect
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-14-2009 , 08:17   Re: [HELP] I got problems with RegisterHam
Reply With Quote #2

Code is horrible.
But... :

function player_death is doesn't exists.
Took hook player death, use Ham_Kill.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Dr.G
Senior Member
Join Date: Nov 2008
Old 03-14-2009 , 10:47   Re: [HELP] I got problems with RegisterHam
Reply With Quote #3

like this:

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
 
public plugin_init() 
{
 
register_plugin(PLUGINVERSIONAUTHOR)
 
 
RegisterHam(Ham_Killed"player""Player_Killed",1)
 
/*             *1          *2            *3
 
 *1 - Register an entity is killed = Ham_Killed
 *2 - Entity named: player
 *3 - Function to forward to: Player_Killed  */
}
public 
Player_Killed(id)
{
 
//do something

__________________
Dr.G is offline
Reply


Thread Tools
Display Modes

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 08:59.


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