Raised This Month: $ Target: $400
 0% 

Catch PodBot Movement.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Paulster1022
Member
Join Date: Apr 2006
Old 08-12-2014 , 18:57   Catch PodBot Movement.
Reply With Quote #1

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.
Paulster1022 is offline
Send a message via AIM to Paulster1022
 


Thread Tools
Display Modes

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 13:19.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode