Platin Posted January 17, 2015 Share Posted January 17, 2015 (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 January 17, 2015 by Guest Link to comment
Mizudori Posted January 17, 2015 Share Posted January 17, 2015 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) Link to comment
TAPL Posted January 17, 2015 Share Posted January 17, 2015 (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 January 17, 2015 by Guest Link to comment
Platin Posted January 17, 2015 Author Share Posted January 17, 2015 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. Link to comment
TAPL Posted January 17, 2015 Share Posted January 17, 2015 Copy the code again and make sure you have stopped resource play. Link to comment
Platin Posted January 17, 2015 Author Share Posted January 17, 2015 I appear in the hospital and i dont know why. Link to comment
xeon17 Posted January 17, 2015 Share Posted January 17, 2015 Stop the freeroam/Play resource as TAPL said , and make sure there isn't any other resource which spawn players. Link to comment
Platin Posted January 17, 2015 Author Share Posted January 17, 2015 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. 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