Raised This Month: $ Target: $400
 0% 

plugin load error


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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