Jump to content

bot


Kenix

Recommended Posts

please help with the script I want to make that command created a bot.

client

  
function onResourceStart(thisResource,thePlayer) 
 local team = getTeamFromName("funners") 
 local ai= "following" 
 local x,y,z = getElementPosition(thePlayer) 
 local rot = getPedRotation(thePlayer) 
   x = x + ((math.cos(math.rad(rot + 90))) * 2.5) 
   y = y + ((math.sin(math.rad(rot + 90))) * 2.5) 
 call (getResourceFromName("slothbot"), "spawnBot", x,y,z,rot, 0, 287, 0, 0, team, 38, ai) 
 end 
   
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), onResourceStart ) 
addCommandHandler ( "createbot", onResourceStart ) 
  

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...