Jump to content

[HELP] Slothbot bot not guarding, its hunting..


Sande

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...