Hafiza Posted August 22, 2021 Share Posted August 22, 2021 Estou tentando arrumar um script pronto mais já tentei de tudo, quero com que o player quando morrer reviva com a skin que já estava usando! De resto está tudo configurado! -- Configurações para quando um jogador entrar -- XYZ coodenadas local joinX = -3796.318359375 local joinY = -414.93161010742 local joinZ = 11.104686737061 -- Armas e tiros local joinWeapon = 0 local joinAmmo = 0 -- Menssagem para o jogador local joinMessage = "" -- Pele do jogador local joinSkin = 230 -- Configurações para quando um jogador morrer -- XYZ coördinates local spawnX = -3796.318359375 local spawnY = -414.93161010742 local spawnZ = 11.104686737061 -- Armas e tiros local spawnWeapon = 0 local spawnAmmo = 0 -- Pele do jogador local spawnSkin = 230 -- Definições para as quantidades de dinheiro -- Dinheiro por matar um jogador local killerMoney = 500 -- O dinheiro retirado do jogador quando morrem local deadPlayerMoney = 0 -- Dinheiro ganho quando entra no server local joinMoney = 5000 -- Functions -- This function spawns players when they join function spawnOnJoin() spawnPlayer(source, joinX, joinY, joinZ, 0 , joinSkin) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox(joinMessage, source) giveWeapon(source, joinWeapon, joinAmmo) givePlayerMoney(source, joinMoney) end -- This function spawns players after they died function spawnOnDead(ammo, killer, weapon, bodypart) outputChatBox(getPlayerName(source).." Você morreu, levante e mate mais! ") takePlayerMoney(source, deadPlayerMoney) if (killer) and (killer ~= source) then givePlayerMoney(killer, killerMoney) end setTimer(spawnPlayer, 3000, 1, source, spawnX, spawnY, spawnZ, 0, spawnSkin) setCameraTarget(source, source) setTimer(giveWeapon, 3000, 1, source, spawnWeapon, spawnAmmo) end -- Event handlers addEventHandler("onPlayerJoin", getRootElement(), spawnOnJoin) addEventHandler("onPlayerWasted", getRootElement(), spawnOnDead) Link to comment
Administrators Tut Posted August 22, 2021 Administrators Share Posted August 22, 2021 Thread's moved into the Portuguese scripting section for best results. I recommend adding your code into a <> code block which can be accessed from the advanced text editor mode. 1 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