Snow-Man Posted October 28, 2022 Posted October 28, 2022 hello, i have started working on safeareas script by using slothbot for protection but bots attacks me whatever happens even if i cancel that addEvent("onPlayerHitSafeZone", true) addEventHandler("onPlayerHitSafeZone", root, function() if getElementType(source) == "player" then for i, v in ipairs(getElementsByType( "ped" ) ) do if getElementData(v, "slothbot") then createBlipAttachedTo( v, 21) if (getElementData(v, "BotTeam") == getTeamName(getPlayerTeam(source))) then setElementData(v, "attacking", false) setElementData(v, "target", false) iprint("friendly mode") else setElementData(v, "attacking", true) setElementData(v, "target", source) iprint("unfriendly mode..") end end end end end ) if that code isnt right, whats the solution to give bots order to hit or cancel attack
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