Essentially want to catch the movement of Bots. It isn't accurate. Works fine with humans though.
Code:
public plugin_init( )
{
register_forward(FM_CmdStart, "fw_cmdstart")
}
public fw_cmdstart(id, uc, seed)
{
static buttons
buttons = get_uc(uc, UC_Buttons)
if(buttons & IN_MOVELEFT && hasMoved[id] != LEFT)
{
write_file(g_random_file, "Latest Key:", 0)
write_file(g_key_file, "Left", 0)
hasMoved[id] = LEFT
}
else if(buttons & IN_MOVERIGHT && hasMoved[id] != RIGHT)
{
write_file(g_random_file, "Latest Key:", 0)
write_file(g_key_file, "Right", 0)
hasMoved[id] = RIGHT
}
}
*Not complete code but, is there a better way to go about this for bots? Like i said, it works but it isn't accurate but for humans its great. Thx, I'm using podbots.