-.Paradox.- Posted November 15, 2013 Share Posted November 15, 2013 Hello, is there a tutorial about how to create bots and set to follow a specified player? thanks Link to comment
Castillo Posted November 15, 2013 Share Posted November 15, 2013 https://wiki.multitheftauto.com/wiki/Slothman/Slothbot Link to comment
-.Paradox.- Posted November 15, 2013 Author Share Posted November 15, 2013 I read it but i didnt understand how to work with Link to comment
Castillo Posted November 15, 2013 Share Posted November 15, 2013 Slothbots work with teams, so in order to make a bot follow you, you must be in the same team as he is ( as far as I know ). Link to comment
-.Paradox.- Posted November 15, 2013 Author Share Posted November 15, 2013 (edited) Okay EDIT I made this but i wanted to set to follow the player who spawned the bot and dont kill him, function Spawnbot1 (source) local x,y,z = getElementPosition (source) local rot = 90 local skin = 284 local interior = 0 local dimension = 0 local weapon =22 local team = getTeamFromName("Admin") local mode = "following" local modesubject = getLocalPlayer() call (getResourceFromName("slothbot"), "spawnBot", x+2, y, z+1, rot, skin, interior, dimension, team, weapon, mode, modesubject) end addCommandHandler("spawnbot", Spawnbot1) Edited November 17, 2013 by Guest Link to comment
-.Paradox.- Posted November 18, 2013 Author Share Posted November 18, 2013 Its already serverside Link to comment
WASSIm. Posted November 18, 2013 Share Posted November 18, 2013 and what about ( local modesubject = getLocalPlayer() ) ? Link to comment
-.Paradox.- Posted November 18, 2013 Author Share Posted November 18, 2013 It's a nil value Neither if you use getPlayerName(getLocalPlayer()) Link to comment
Castillo Posted November 18, 2013 Share Posted November 18, 2013 If you leave that getLocalPlayer there, the script won't work. Link to comment
-.Paradox.- Posted November 18, 2013 Author Share Posted November 18, 2013 Yes so I used only local modesubject = source It spawn the bot and he follow but if another player spawned the bot and he isn't in the team the bot kill him so i don't want to check the team Link to comment
WASSIm. Posted November 19, 2013 Share Posted November 19, 2013 use getPlayerFromName 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