bosslorenz Posted March 12, 2015 Posted March 12, 2015 teamLV = getTeamFromName ("Las Venturas Mafia") function bot1() bots1 = exports.slothbot:spawnBot (2494.6000976563, 1587, 10.7, 0, 108, 0, 0, teamLV, 31, "guarding", true ) end addEventHandler ( "onResourceStart", getResourceRootElement(), bot1 ) why does the bot still shoots at me even when Im on team "Las Venturas Mafia"? I have created a team [Las Venturas Mafia] on another lua script. Is there a problem here on my script. Maybe the bots1 is not on teamLV yet?
3B00DG4MER Posted March 12, 2015 Posted March 12, 2015 Maybe you're not on that team SAF/SAO - 30% Skype: Themerzoug2020 in-game name:3B00DG4MER
JR10 Posted March 12, 2015 Posted March 12, 2015 Based on your code, you're retrieving the team as soon as the script starts, the team will probably not have been created by then. If the team is created in the same resource then, move the getTeamFromName line to onResourceStart. If not, you might want to delay the bot creation till the team is created. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
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