Hi all.
PHP Code:
// Bot() creates a Bot, puts him in spectators
public Bot() {
new botid
botid = find_player("ali", bot_name)
if(!botid) {
botid = engfunc(EngFunc_CreateFakeClient, bot_name)
new ptr[128]
dllfunc(DLLFunc_ClientConnect, botid, bot_name, "127.0.0.1", ptr )
dllfunc(DLLFunc_ClientPutInServer, botid)
cs_set_user_team(botid, CS_TEAM_SPECTATOR)
}
return botid
}
...
//this should kick "username", but...
Bot()
client_cmd(id, "amx_kick %s", username) // id = id of Bot, got with get_user_userid
... i got this, and nothing happens!
L 01/24/2009 - 19:48:47: Invalid player id 18
L 01/24/2009 - 19:48:47: [AMXX] Run time error 10 (plugin "SupraBan.amxx") (native "client_cmd") - debug not enabled!
I want to, let's say, "port" the command amx_kick through the bot, so that it seems like the bot is kicking someone. Anyone help me pls?
Additional info: the bot IS in spect.