Cris-ttt Posted April 19, 2021 Share Posted April 19, 2021 Hola, soy nuevo en esto de programar y quería saber si tienen alguna solución Lo que pasa es que esta este código para spawnear en un lugar; Al morir sirve pero 2 segundos después se va a algun spawn predeterminado del mta Gracias! addEventHandler("onResourceStart", resourceRoot, function() resetMapInfo() for i,player in ipairs(getElementsByType("player")) do spawn(player) end end ) function spawn(player) if not isElement(player) then return end repeat until spawnPlayer ( player, 1178+math.random(0,0), -1324+math.random(0,0), 15, 270, math.random(9,288), 0, 0) fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) end addEventHandler("onPlayerJoin", root, --Para cuanto un jugador se una al server, se activa de una function() spawn(source) end ) addEventHandler("onPlayerWasted", root, function() setTimer(spawn, 1800, 1, source) end ) Link to comment
Minez Posted April 24, 2021 Share Posted April 24, 2021 Amigo la solución es fácil, solo desactiva el modo de juego "play", por eso te ocurre ese bug. 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