AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP] I got problems with RegisterHam (https://forums.alliedmods.net/showthread.php?t=87599)

crazyeffect 03-14-2009 08:02

[HELP] I got problems with RegisterHam
 
1 Attachment(s)
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 :D

ConnorMcLeod 03-14-2009 08:17

Re: [HELP] I got problems with RegisterHam
 
Code is horrible.
But... :

function player_death is doesn't exists.
Took hook player death, use Ham_Kill.

Dr.G 03-14-2009 10:47

Re: [HELP] I got problems with RegisterHam
 
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




All times are GMT -4. The time now is 08:59.

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