Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin
Archive › Old Forum Threads › Help › Scripting Help › Plugin not reconized?
4 posts, 3 people · 830 views Thread Rating: ★★★★★
closedPlugin not reconized?
Started by [IAM]Pacifist on 08-08-2007, 07:51 PM
[ [IAM]Pacifist
started this thread
Posts: 2
Threads: 1
Joined: Aug 2007
08-08-2007, 07:51 PM #1

Hello everyone.rnrnI'm trying to build a simple plugin that interfaces with ShrikeBot.rnrn

#include <amxmodx>rn#include <amxmisc>rn#include <dodfun>rnrnnew PlayerCountrnpublic plugin_init()rn{rn	register_plugin("IAM DoD Bot Manager", "1.0","Pacifist")rn	register_cvar("iam_maxbots", "10")rn	rn	register_concmd("iam_botkicker", "kickbots", ADMIN_LEVEL_B, "- kicks all bots")rn	register_clcmd("say kickallbots", "kickbots", ADMIN_LEVEL_B, "- kicks all bots")rn	rn	register_concmd("iam_botadder", "addbot", ADMIN_LEVEL_B, "- add bot")rn	register_clcmd("say addbot", "kickbots", ADMIN_LEVEL_B, "- add bot")rn}rnpublic client_authorized(id)rn{rn	if(!is_user_bot(id))rn	{rn		PlayerCount++rn		if(PlayerCount >= get_cvar_num("iam_maxbots"))rn		{rn			server_cmd("shr ^"max_bots 0^"")rn			return PLUGIN_CONTINUErn		}rn	}rn	rn	if (is_user_bot(id) && is_user_connected(id))rn	{rn		set_task(1.0 , "bot_score" , id)rn	}rn	return PLUGIN_CONTINUErn}rnpublic client_disconnect(id)rn{rn	if(!is_user_bot(id))rn	{rn		PlayerCount--rn		if(PlayerCount < get_cvar_num("iam_maxbots"))rn		{rn			server_cmd("shr ^"max_bots %d^"",get_cvar_num("iam_maxbots"))rn			return PLUGIN_CONTINUErn		}rn	}rn	return PLUGIN_CONTINUErn}rnrnpublic bot_score(id)rn{rn	if (!is_user_connected(id) && !is_user_bot(id))rn		return PLUGIN_HANDLEDrnrn	dod_set_user_kills(id, 0, 1)rn	dod_set_user_score(id, 0, 1)rn	dod_set_pl_deaths(id, 0, 1)rn	rn	return PLUGIN_CONTINUErn}rnrnpublic kickbots(id, level, cid)rn{rn	if (!cmd_access(id,level,cid,1))rn	{rn		return PLUGIN_HANDLEDrn	}rn	rn	server_cmd("shr ^"max_bots 0^"")rn	return PLUGIN_CONTINUErn}rnrnpublic addbot(id, level, cid)rn{rn	if (!cmd_access(id,level,cid,1))rn	{rn		return PLUGIN_HANDLEDrn	}rn	rn	server_cmd("shr ^"addbot^"")rn	return PLUGIN_CONTINUErn}rnrnpublic addmaster(id, level, cid)rn{rn	if (!cmd_access(id,level,cid,1))rn	{rn		return PLUGIN_HANDLEDrn	}rn	rn	server_cmd("shr ^"addbot -1 -1 1^"")rn	return PLUGIN_CONTINUErn}
rnrnThis is what I have. I compiled with the latest AMXX and placed it in the proper folder, updated the plugins file. However when I restart the server it dosn't show it as active, or inactive. It dosn't show it all.rnrnNo compile errors were produced when I complied. DODFUN, AMXMISC are enabled.rnrnAny reason why this won't work?

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
08-08-2007, 07:56 PM #2

double check for spelling errors lol.. nnshows as running when i just tried it:n

n [ 55] IAM DoD Bot Manager     1.0      Pacifist          test_plugin.amx  runnin
(ignore the letters cut off from the amxx plugins output.. filename i used was test_plugin.amxx not .amx)nnntho even if its spelled wrong.. it would still show an error.. make sure the plugins.ini file you added it to is actually on the server lol

[ [IAM]Pacifist
started this thread
Posts: 2
Threads: 1
Joined: Aug 2007
08-10-2007, 09:45 PM #3

Thanks, I've fixed the problem and it seems to be running fine.rnrnrnIs there any documentation on the underlying functions? Or any good material writing for building plugins?

=|[76AD]|= TatsuSaisei
posted here
Posts: 794
Threads: 54
Joined: May 2005
08-15-2007, 01:25 AM #4
Archive › Old Forum Threads › Help › Scripting Help › Plugin not reconized?
DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC