Jump to content

Spawn Point changing?


th3cross3r

Recommended Posts

Sorry... i forgot.. its Play ;)

@Jesseunit

Ok thanks first... i will look and test my best!

UPDATE:

Ok sorry... i dont know what to do!

My broph.lua data:

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, -711+math.random(1,5), 957+math.random(5,9), 12.4, 90, math.random(312), 0, 0) 
    fadeCamera(player, true) 
    setCameraTarget(player, player) 
    showChat(player, true) 
end 
  
addEventHandler("onPlayerJoin", root, 
    function() 
        spawn(source) 
    end 
) 
  
addEventHandler("onPlayerWasted", root, 
    function() 
        setTimer(spawn, 1800, 1, source) 
    end 
) 

Link to comment

So.. this is doesnt works .

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, -711+math.random(1,5), 957+math.random(5,9), 12.4, 90, math.random(9,288), 0, 0) 
    fadeCamera(player, true) 
    setCameraTarget(player, player) 
    showChat(player, true) 
end 
  
addEventHandler("onPlayerJoin", root, 
    function() 
    local x = -1656 
    local y = -425 
    local z = 15 
    elseif 
    local x = 1327 
    local y = 1537 
    local z = 15 
    spawnPlayer(source, x, y, z) 
    fadeCamera(source, true) 
    setCameraTarget(source, source) 
    end 
) 
  
addEventHandler("onPlayerWasted", root, 
    function() 
    local x = -1656 
    local y = -425 
    local z = 15 
    elseif 
    local x = 1327 
    local y = 1537 
    local z = 15 
    spawnPlayer(source, x, y, z) 
    fadeCamera(source, true) 
    setCameraTarget(source, source) 
    end 
) 

Link to comment

This should work.

addEventHandler("onPlayerJoin", root, 
    function() 
    local x = 1327 
    local y = 1537 
    local z = 15 
    spawnPlayer(source, x, y, z) 
    fadeCamera(source, true) 
    setCameraTarget(source, source) 
    end 
) 
  
addEventHandler("onPlayerWasted", root, 
    function() 
    local x = 1327 
    local y = 1537 
    local z = 15 
    spawnPlayer(source, x, y, z) 
    fadeCamera(source, true) 
    setCameraTarget(source, source) 
    end 
) 

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...