Admin Bot Commands

The following is a list of Admin commands that can be used in-game to control the bots.

Most of the commands can be used on all bots by specifying 999 as the target ID.

The SAMP plugin that controls the bots was written by Sacky, the PAWN code to control them was written by Matite.

Bot Commands…

Command Lvl Description
/spawn <Name|999> na If a name is specified a new bot will be created with the name supplied. If 999 is specified then 10 bots will be created with the default name "GXBot".
/respawn <BotID|999> na If a bot id is specified the bot will be respawned. If 999 is specified then all bots will be respawned.
/disconnect <BotID|999> na If a bot id is specified the bot will be disconnect (leave the game). If 999 is specified then all bots will be disconnected.
/sbk <BotID|999> na Sets the bot keys to the value supplied. If 999 is specified then all bots will have their keys set to the value supplied. Example of valid values are: Clear/Idle = 0, Crouch = 2, Fire = 4, Jump = 32
/anim <BotID|999> <AnimLibName> <AnimName> na Sets the bot animation to the animation name supplied. If 999 is specified then all bots will be set to the animation name supplied. Examples: /anim 999 ped walk_drunk OR /anim 999 strip strip_a OR /anim 999 strip str_loop_a A list of all animations is available here: http://pastebin.ca/989558
/angle <BotID|999> <Angle> na If a bot id is specified its facing angle will be set to the value supplied. If 999 is specified then all bots will have their facing angle set to the value supplied. Example: /angle 999 180
/bab na Brings all bots to your location and sets their facing angle to your facing angle.

Bot INC File…
The DLL comes with an INC file which adds the following:

native ConnectBot(name[]);
native DisconnectBot(botid);
native SetBotKeys(botid,key1,key2,key3);
native KillBot(botid,killerid,reason);
native IsPlayerBot(playerid);
native SetBotAimVector(botid,Float:rX,Float:rY,Float:rZ,Float:rW);
native GetPlayerAimVector(playerid,&Float:rX,&Float:rY,&Float:rZ,&Float:rW);

Working Functions…
The following player functions work with all bots:

SetSpawnInfo
SpawnPlayer
SetPlayerTeam
SetPlayerName
SetPlayerSkin
SetPlayerPos
SetPlayerHealth
SetPlayerColor
SetPlayerInterior
SetPlayerScore
SetPlayerFacingAngle
GivePlayerMoney
ResetPlayerMoney
ResetPlayerWeapons
GivePlayerWeapon
SetPlayerArmour
SetPlayerAmmo
SetPlayerWantedLevel
SetPlayerVirtualWorld
ApplyAnimation
ClearAnimation
SetPlayerSpecialAction

page_revision: 9, last_edited: 1208614920|%e %b %Y, %H:%M %Z (%O ago)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.