Giovany Mito Posted August 1, 2019 Share Posted August 1, 2019 Olá, Então galera no meu script quando o player loga no servidor ele nasce na base do team dele, ai quando ele morre ele nasce na base do team denovo, eu queria uma dica de como faço para ele quando morrer nascer em um hospital, no caso cada team nasce em um hospital diferente quando morrer function spawner() setTimer(function(source) local teamCoords = coords[getTeamName(getPlayerTeam(source))] local rndN = 0 if teamCoords then rndN = math.random(1,#teamCoords) setElementPosition(source, teamCoords[rndN][1], teamCoords[rndN][2], teamCoords[rndN][3]) else rndN = math.random(1,#novato) setElementPosition(source, novato[rndN][1], novato[rndN][2], novato[rndN][3]) end end,1000,1,source) end addEventHandler("onPlayerSpawn",getRootElement(),spawner) ------ ------ function getSpawnSede (thePlayer) if (thePlayer) then if (getPlayerTeam(thePlayer)) then if (coords[getTeamName(getPlayerTeam(thePlayer))][1]) then return coords[getTeamName(getPlayerTeam(thePlayer))][1], coords[getTeamName(getPlayerTeam(thePlayer))][2], coords[getTeamName(getPlayerTeam(thePlayer))][3] end end end end setOcclusionsEnabled( false ) Link to comment
Other Languages Moderators Lord Henry Posted August 1, 2019 Other Languages Moderators Share Posted August 1, 2019 Troque seu onPlayerSpawn pra onPlayerLogin para fazer o jogador aparecer na base ao logar. Use onPlayerSpawn para fazer ele ir pro hospital ao spawnar. 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