yoya99 Posted October 2, 2018 Share Posted October 2, 2018 Law = createTeam("Law") function makeaped(source) local x, y, z = getElementPosition( source ) guy = createPed(299, x+5, y, z) end addCommandHandler("victim", makeaped) function givestars(totalAmmo, killer, killerWeapon, bodypart) local level = getPlayerWantedLevel ( killer ) if (level < 1) then triggerClientEvent(killer, "playsound", killer) setPlayerWantedLevel ( killer, 1) elseif (level < 2) then triggerClientEvent(killer, "playsound", killer) setPlayerWantedLevel ( killer, 2) elseif (level < 3) then triggerClientEvent(killer, "playsoundtwo", killer) setPlayerWantedLevel ( killer, 3) elseif (level < 4) then triggerClientEvent(killer, "playsoundtwo", killer) setPlayerWantedLevel ( killer, 4) elseif (level < 5) then triggerClientEvent(killer, "playsoundthree", killer) setPlayerWantedLevel ( killer, 5) elseif (level < 6) then triggerClientEvent(killer, "playsoundthree", killer) setPlayerWantedLevel ( killer, 6) end end addEventHandler("onPedWasted", getRootElement(), givestars) function takestars() local level = getPlayerWantedLevel ( source ) if (level > 0) then setPlayerWantedLevel ( source, 0) end end addEventHandler("onPlayerWasted", getRootElement(), takestars) function policelvlone() local x, y, z = getElementPosition( source ) police = exports [ "slothBot" ]:spawnBot ( x+7, y, z, 90, 280, 0, 0, Law, 3,"hunting", true ) exports [ "slothBot" ]:setBotFollow( police , source) setElementData(police,"police",true) end addEvent("policelvlone", true) addEventHandler("policelvlone", getRootElement(), policelvlone) function policelvltwo() local x, y, z = getElementPosition( source ) police = exports [ "slothBot" ]:spawnBot ( x+7, y, z, 90, 281, 0, 0, Law, 23,"hunting", true ) exports [ "slothBot" ]:setBotFollow( police , source) setElementData(police,"police",true) end addEvent("policelvltwo", true) addEventHandler("policelvltwo", getRootElement(), policelvltwo) function policelvlthree() local x, y, z = getElementPosition( source ) police = exports [ "slothBot" ]:spawnBot ( x+7, y, z, 90, 284, 0, 0, Law, 28,"hunting", true ) exports [ "slothBot" ]:setBotFollow( police , source) setElementData(police,"police",true) end addEvent("policelvlthree", true) addEventHandler("policelvlthree", getRootElement(), policelvlthree) function policelvlfour() local x, y, z = getElementPosition( source ) police = exports [ "slothBot" ]:spawnBot ( x+7, y, z, 90, 286, 0, 0, Law, 27,"hunting", true ) exports [ "slothBot" ]:setBotFollow( police , source) setElementData(police,"police",true) end addEvent("policelvlfour", true) addEventHandler("policelvlfour", getRootElement(), policelvlfour) function policelvlfive() local x, y, z = getElementPosition( source ) police = exports [ "slothBot" ]:spawnBot ( x+7, y, z, 90, 285, 0, 0, Law, 31,"hunting", true ) exports [ "slothBot" ]:setBotFollow( police , source) setElementData(police,"police",true) end addEvent("policelvlfive", true) addEventHandler("policelvlfive", getRootElement(), policelvlfive) function policelvlsix() local x, y, z = getElementPosition( source ) police = exports [ "slothBot" ]:spawnBot ( x+7, y, z, 90, 285, 0, 0, Law, 38,"hunting", true ) exports [ "slothBot" ]:setBotFollow( police , source) setElementData(police,"police",true) end addEvent("policelvlsix", true) addEventHandler("policelvlsix", getRootElement(), policelvlsix) Hello, this is my police chase script. I amnot sure how to make police cars follow you. How is it possible to make police cars spawn some meters around you and make them drive towards you. Just a straight line. It does not have to be a following by nodes. This would be too complicated, it just needs to be a straight line for some meters. Thank you for useful hints Link to comment
LyricalMM Posted October 2, 2018 Share Posted October 2, 2018 download the public slothbot resource https://community.multitheftauto.com/index.php?p=resources&s=details&id=672 and look on the wiki, who have options to spawn peds with the task "follow" or "chase" https://wiki.multitheftauto.com/wiki/Slothman/Slothbot Link to comment
yoya99 Posted October 12, 2018 Author Share Posted October 12, 2018 On 02/10/2018 at 12:49, LyricalMM said: download the public slothbot resource https://community.multitheftauto.com/index.php?p=resources&s=details&id=672 and look on the wiki, who have options to spawn peds with the task "follow" or "chase" https://wiki.multitheftauto.com/wiki/Slothman/Slothbot I was searching for an option spawning cars behind the player. I woudl pay for it as well. Link to comment
LyricalMM Posted October 13, 2018 Share Posted October 13, 2018 13 hours ago, yoya99 said: I was searching for an option spawning cars behind the player. I woudl pay for it as well. i can't make a full script for you but you cand try with: createPed createVehicle warpPedIntoVehicle setPedControlState and copy the script from slothbot with following 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