Jump to content

apos morte player permanecer no mesmo local da morte


Recommended Posts

    local joinX = 815.41870117188
    local joinY = -1103.0462646484
    local joinZ = 25.789876937866
    local joinSkin = 20 -- skin ao entrar no servidor
    local spawnSkin = 20
    local joinMoney = 10000 -- Dinheiro ao entrar no servidor
    
    local spawnX = 815.41870117188
    local spawnY = -1103.0462646484
    local spawnZ = 25.789876937866


-- Functions
-- This function spawns players when they join
function spawnOnJoin()
    spawnPlayer(source, joinX, joinY, joinZ, 20 , joinSkin) 
    fadeCamera(source, true)
    setCameraTarget(source, source)
    givePlayerMoney(source, joinMoney)
end

function spawnOnDead(killer, bodypart)
    setTimer(spawnPlayer, 3000, 1, source, spawnX, spawnY, spawnZ, 0, spawnSkin)
    setCameraTarget(source, source)
end

-- Event handlers
addEventHandler("onPlayerJoin", getRootElement(), spawnOnJoin)
addEventHandler("onPlayerWasted", getRootElement(), spawnOnDead)

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...