RekZ Posted March 19, 2013 Share Posted March 19, 2013 (edited) debugscript dont give me errors... i donw know why zombies dont spawn :7 local ZTeam = createTeam( "Zombies" , 255 , 0 , 0) function SpawnZombieBot() local Posx,Posy,Posz = getElementPosition (source) local rotation = 0 local interior = getElementInterior(source) local dimension = getElementDimension(source) local weapon = false setTeamFriendlyFire( ZTeam ,false) for i = 1,10 do local skin = math.random(21,23) exports [ "slothbot" ]:spawnBot( Posx,Posy,Posz, rotation , skin, interior, dimension , ZTeam , weapon) end end addEvent("onSpawnSlothBot",true) addEventHandler("onSpawnSlothBot",getRootElement(),SpawnZombieBot) function BotZombieDie() if (attacker) then local Posx,Posy,Posz = getElementPosition(attacker) local rotation = 0 local interior = getElementInterior(attacker) local dimension = getElementDimension(attacker) local weapon = false local skin = math.random(21,23) exports [ "slothbot" ]:spawnBot( Posx,Posy,Posz, rotation , skin, interior , dimension , ZTeam , weapon) end end addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(),BotZombieDie) Edited March 20, 2013 by Guest Link to comment
EstrategiaGTA Posted March 19, 2013 Share Posted March 19, 2013 So which is the error? What happens? Link to comment
Castillo Posted March 20, 2013 Share Posted March 20, 2013 You are spawning one bot when another dies, and the other 10 bots, you want to spawn them when a slothbot spawns. Link to comment
RekZ Posted March 20, 2013 Author Share Posted March 20, 2013 mmm and how i can fix it, using other event? Link to comment
Castillo Posted March 20, 2013 Share Posted March 20, 2013 You can create one when resource start. Link to comment
Moderators IIYAMA Posted March 20, 2013 Moderators Share Posted March 20, 2013 You can see this error as: if 1 == true then -- error Probably one of your export data isn't a number. Maybe: --local weapon = false local weapon = 0 --? As far the syntax, when you don't fill in, it starts at 0. element spawnBot ( float x, float y, float z, int rotation = 0, [ int skinID = 0, int interior = 0, int dimension = 0, team theTeam = nil, int weapon = 0, string theMode = "hunting", element theModesubject = nil ] ) Link to comment
RekZ Posted March 20, 2013 Author Share Posted March 20, 2013 now sont give me errors again, but bots doesnt spawn You can see this error as: if 1 == true then -- error Probably one of your export data isn't a number. Maybe: --local weapon = false local weapon = 0 --? As far the syntax, when you don't fill in, it starts at 0. element spawnBot ( float x, float y, float z, int rotation = 0, [ int skinID = 0, int interior = 0, int dimension = 0, team theTeam = nil, int weapon = 0, string theMode = "hunting", element theModesubject = nil ] ) Link to comment
Moderators IIYAMA Posted March 21, 2013 Moderators Share Posted March 21, 2013 Well first check which value gives this boolean(true/false).... I can't help you, if I can't even see the line that went wrong. After that you should trace this value and find the creation of it. 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