PDA

View Full Version : Plugin not reconized?


[IAM]Pacifist
08-08-2007, 08:51 PM
Hello everyone.

I'm trying to build a simple plugin that interfaces with ShrikeBot.

#include <amxmodx>
#include <amxmisc>
#include <dodfun>

new PlayerCount
public plugin_init()
{
register_plugin("IAM DoD Bot Manager", "1.0","Pacifist")
register_cvar("iam_maxbots", "10")

register_concmd("iam_botkicker", "kickbots", ADMIN_LEVEL_B, "- kicks all bots")
register_clcmd("say kickallbots", "kickbots", ADMIN_LEVEL_B, "- kicks all bots")

register_concmd("iam_botadder", "addbot", ADMIN_LEVEL_B, "- add bot")
register_clcmd("say addbot", "kickbots", ADMIN_LEVEL_B, "- add bot")
}
public client_authorized(id)
{
if(!is_user_bot(id))
{
PlayerCount++
if(PlayerCount >= get_cvar_num("iam_maxbots"))
{
server_cmd("shr ^"max_bots 0^"")
return PLUGIN_CONTINUE
}
}

if (is_user_bot(id) && is_user_connected(id))
{
set_task(1.0 , "bot_score" , id)
}
return PLUGIN_CONTINUE
}
public client_disconnect(id)
{
if(!is_user_bot(id))
{
PlayerCount--
if(PlayerCount < get_cvar_num("iam_maxbots"))
{
server_cmd("shr ^"max_bots %d^"",get_cvar_num("iam_maxbots"))
return PLUGIN_CONTINUE
}
}
return PLUGIN_CONTINUE
}

public bot_score(id)
{
if (!is_user_connected(id) && !is_user_bot(id))
return PLUGIN_HANDLED

dod_set_user_kills(id, 0, 1)
dod_set_user_score(id, 0, 1)
dod_set_pl_deaths(id, 0, 1)

return PLUGIN_CONTINUE
}

public kickbots(id, level, cid)
{
if (!cmd_access(id,level,cid,1))
{
return PLUGIN_HANDLED
}

server_cmd("shr ^"max_bots 0^"")
return PLUGIN_CONTINUE
}

public addbot(id, level, cid)
{
if (!cmd_access(id,level,cid,1))
{
return PLUGIN_HANDLED
}

server_cmd("shr ^"addbot^"")
return PLUGIN_CONTINUE
}

public addmaster(id, level, cid)
{
if (!cmd_access(id,level,cid,1))
{
return PLUGIN_HANDLED
}

server_cmd("shr ^"addbot -1 -1 1^"")
return PLUGIN_CONTINUE
}

This 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.

No compile errors were produced when I complied. DODFUN, AMXMISC are enabled.

Any reason why this won't work?

diamond-optic
08-08-2007, 08:56 PM
double check for spelling errors lol..

shows as running when i just tried it:

[ 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)


tho 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
08-10-2007, 10:45 PM
Thanks, I've fixed the problem and it seems to be running fine.


Is there any documentation on the underlying functions? Or any good material writing for building plugins?

=|[76AD]|= TatsuSaisei
08-15-2007, 02:25 AM
http://www.amxmodx.org/funcwiki.php?go=all_func