Narutimmy Posted March 28, 2013 Share Posted March 28, 2013 Hola, bueno me bino esta diea y quiero saber que tengo que usar... quiero que cuando un user muera Spawne en un punto fijo pero solo al morir no al hacer login, pero si esa persona esta en un Team (clan) spawne en otro lugar, creo tengo que hacer una tabla si no mal me ekivoco. Que nesesito? Link to comment
Narutimmy Posted March 28, 2013 Author Share Posted March 28, 2013 Creo se empiesa asi no? function ReSpawn () spawnPlayer (source, -2616.3608, 2256.6555, 8.20, 0) addEventHandler ( "onPlayerWasted", getRootElement(), ReSpawn ) Link to comment
Plate Posted March 28, 2013 Share Posted March 28, 2013 function ReSpawn () local clanName = getTeamName(getPlayerTeam(source)) spawnPlayer (source, -2616.3608, 2256.6555, 8.20, 0) if clanNamwe == "El nombre" then spawnPlayer(source, x, y, z, etc) fadeCamera(source, true) end end addEventHandler ( "onPlayerWasted", getRootElement(), ReSpawn ) Link to comment
Agu# Posted March 28, 2013 Share Posted March 28, 2013 Proba con este y decime si te funciona. addEventHandler("onPlayerLogin", root, function() setTimer( spawnPlayer, 2000, 1, source, x, y, z ) --- 2000 son los milisegundos que tardara en spawnear --- Agrega las cordenadas en "x, y, z" --- end ) addEventHandler( "onPlayerWasted", getRootElement( ), function() setTimer( spawnPlayer, 2000, 1, source, x, y, z ) --- 2000 son los milisegundos que tardara en spawnear --- Agrega las cordenadas en "x, y, z" --- end ) Link to comment
Narutimmy Posted March 28, 2013 Author Share Posted March 28, 2013 function ReSpawn () local clanName = getTeamName(getPlayerTeam(source)) spawnPlayer (source, -2616.3608, 2256.6555, 8.20, 0) if clanNamwe == "El nombre" then spawnPlayer(source, x, y, z, etc) fadeCamera(source, true) end end addEventHandler ( "onPlayerWasted", getRootElement(), ReSpawn ) Así a como lo hizo plate esta bien, solamente debes eliminar el primer spawnPlayer, eso no debería ir allí. function ReSpawn () local clanName = getTeamName(getPlayerTeam(source)) if clanNamwe == "El nombre" then spawnPlayer(source, x, y, z, etc...) -- X, Y, Z las coordenadas,... etc para los otros demás argumentos adicionales. fadeCamera(source, true) end end addEventHandler ( "onPlayerWasted", getRootElement(), ReSpawn ) Creo que así, debería funcionar bien. De echo si lo ocupa, porque en caso de no tener clan quiero que spawnee ahi tenia un pequeño error pero ya esta funcionando. Link to comment
Plate Posted March 28, 2013 Share Posted March 28, 2013 para los que no tienen clan podrias poner if not clanName then spawnPlayer(x, y, z, etc) Link to comment
Narutimmy Posted March 28, 2013 Author Share Posted March 28, 2013 para los que no tienen clan podrias poner if not clanName then spawnPlayer(x, y, z, etc) No te preocupes, asi como esta funciona bien. Link to comment
Recommended Posts