Jump to content

Why this is not working?


Platin

Recommended Posts

Posted (edited)

This simple script dont work and i dont know why.

function SpawnOnBeach() 
    spawnPlayer (2938.6123046875, -2051.7548828125, 3.5480432510376, 90, math.random (7,288), 0, 0) 
end 
addEventHandler("OnPlayerJoin", getRootElement(), SpawnOnBeach) 
addEventHandler("OnPlayerWasted", getRootElement(), SpawnOnBeach) 

Anyone can help me? Thanks

EDIT

This dont work too

function join ()  
    local sound = playSound("joinsound.mp3") 
end 
  
addEventHandler("onClientPlayerJoin", getRootElement(), join) 

Edited by Guest
Posted
function SpawnOnBeach() 
    spawnPlayer (source,2938.6123046875, -2051.7548828125, 3.5480432510376, 90, math.random (7,288), 0, 0) 
end 
addEventHandler("OnPlayerJoin", getRootElement(), SpawnOnBeach) 
addEventHandler("OnPlayerWasted", getRootElement(), SpawnOnBeach) 

Posted (edited)
function SpawnOnBeach() 
    spawnPlayer(source, 2938.6123046875, -2051.7548828125, 3.5480432510376, 90, math.random (7,288)) 
    fadeCamera (source, true) 
    setCameraTarget(source) 
end 
addEventHandler("onPlayerJoin", getRootElement(), SpawnOnBeach) 
addEventHandler("onPlayerWasted", getRootElement(), SpawnOnBeach) 

-- No event needed 
local sound = playSound("joinsound.mp3") 

Edited by Guest
Posted

The sound work, thank you, but the spawn no.

I wanna create a spawn for players in Seville Beach, but I still respawning in the Freeroam Default Spawns.

Posted

I did it and I make sure there isn't other resource playing whit spawns. I dont know what's the problem, really, but, Thank you guys, i gonna see it later.

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