Raised This Month: $ Target: $400
 0% 

plugin load error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JohnJ3
Member
Join Date: May 2006
Location: Tomsk
Old 06-02-2006 , 09:19   plugin load error
Reply With Quote #1

Hi.
I need help. This plugin was compiled without errors or warnings, but result of the command "amx_plugins" is "bad load". Why?
Help me, please.

Code:
/* AMX Mod X
*   Anti Reconnect Plugin 2.0
*   Do not give to use "reconnect" or save frags and deaths of player when he use reconnect.
*/

#include <amxmodx>
#include <core>
#include <fun>

new PLUGIN[]="Anti reconnect"
new AUTHOR[]="JohnJ"
new VERSION[]="2.0"

new RTIME[]="amx_reconnect_time"
new RCAN[]="amx_reconnect_can"
new SCORESAVE[]="amx_reconnect_ss"

new t_disconnect[33] = {0, ...}
new sfrags[33] = {0, ...}
new sdeaths[33] = {0, ...}

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_dictionary("antireconnect.txt")
	register_cvar(RTIME, "7")
	register_cvar(RCAN, "1")
	register_cvar(SCORESAVE, "1")
}

public client_connect(id)
{
	new maxexit = get_cvar_float(RTIME)
	new canreconnect = get_cvar_num(RCAN)
	new ssave = get_cvar_num(SCORESAVE)

	if ((maxexit>0) && (canreconnect==0))
	{
		new Float:nexTime = get_gametime()
		
		if (t_disconnect[id] > nexTime)
		{
		 client_cmd(id,"echo ** %d ** Anti Reconnect - wait %d sec!",maxexit)
		 t_disconnect[id] = nexTime + maxexit
 	  	 server_cmd("kick #%d ^"%L^"", get_user_userid(id), id, "NO_ENTRY")
		 return PLUGIN_HANDLED
		}
	}
	if (ssave==1)
	{
		new Float:nexTime = get_gametime()

		if (t_disconnect[id] > nexTime)
		{
		 set_user_deaths(id,sdeaths[id])
		 set_user_frags(id,sfrags[id])
		}
		else
		{
		 sdeaths[id]=0
		 sfrags[id]=0
		}
	}

	return PLUGIN_CONTINUE
}

public client_disconnect(id)
{
	new maxexit = get_cvar_float(RTIME)
	new canreconnect = get_cvar_num(RCAN)
	new ssave = get_cvar_num(SCORESAVE)

	if (canreconnect==0)
	{
 	 new Float:theTime = get_gametime()
	 t_disconnect[id] = theTime + maxexit
	}
	if (ssave==1)
	{
	 sdeaths[id] = get_user_deaths(id)
	 sfrags[id] = get_user_frags(id)
	}
	return PLUGIN_CONTINUE
}
Thank you.
JohnJ3 is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 06-02-2006 , 09:33  
Reply With Quote #2

Place "debug" after your plugin in plugins.ini and then see what it says about the bad load in the AMXX log.

Your line in plugins.ini should look something like this:
Code:
antireconnect.amxx debug
__________________
Brad is offline
shino
Senior Member
Join Date: May 2006
Old 06-02-2006 , 09:41  
Reply With Quote #3

check your modules.ini if core and fun modules are enabled. also check if you have entered the right name of plugin in plugins.ini.
shino is offline
JohnJ3
Member
Join Date: May 2006
Location: Tomsk
Old 06-02-2006 , 10:28  
Reply With Quote #4

I'm use <cstrike> and "cs_set_user_deaths", but not "set_user_deaths". It's work. Thank for info about log
JohnJ3 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 16:22.


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