Sande Posted November 28, 2013 Share Posted November 28, 2013 Help, i need this bot to guard the commander. but its just hunting all time. function Spawnbot1 (thePlayer) if getAccountData ( getPlayerAccount(thePlayer), "viplevel" ) == 1 then local x,y,z = getElementPosition (thePlayer) local rot= 90 local skin=287 local interior=0 local dimension= 0 local team=false local weapon=38 local mode= guard local modesubject= getElementPosition(thePlayer) call (getResourceFromName("slothbot"), "spawnBot", x, y+5, z, rot, skin, interior, dimension, team, weapon, mode, modesubject) exports [ "slothBot" ]:setBotGuard(thePlayer, x, y, z, true) outputChatBox("[sERVER] Guard bot spawned to guard "..getPlayerName(thePlayer)..".", thePlayer, 255,0,0) else outputChatBox("[sERVER] Error when spawning bot.", thePlayer, 255,0,0) end end addCommandHandler("spawn-guard", Spawnbot1) Link to comment
Renkon Posted November 28, 2013 Share Posted November 28, 2013 mode = "guard" I guess Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now