ice_brasil Posted May 19, 2013 Share Posted May 19, 2013 I use this function to spawn more I want a second spawn point that is Randow function SpawnPlayer(thePlayer,skin,skin2,r,g,b) spawnPlayer ( thePlayer, 2005,1545,14, 90.0, skin ) spawnPlayer ( thePlayer, -1495,921,8, 90.0, skin2 ) ~~> Second spawn point setCameraTarget (source, source) createBlipAttachedTo(source,0,2,r,g,b) setPlayerMoney(thePlayer,StartMoney) playerSkin[thePlayer] = {skin,r,g,b} setElementData(thePlayer,"Score",0) setPlayerNametagShowing ( thePlayer, false) end addEvent( "onClientWantsToSpawn", true ) addEventHandler( "onClientWantsToSpawn", getRootElement(), SpawnPlayer ) But all players born in only one spawnpoint What do I have to add more for a spawnpoint? Sorry my bad english I'm Brazilian Link to comment
Jacob Lenn Posted May 19, 2013 Share Posted May 19, 2013 U mean random spawn? local n = math.random(1,2) if n == 1 then spawnPlayer ( thePlayer, 2005,1545,14, 90.0, skin ) else spawnPlayer ( thePlayer, -1495,921,8, 90.0, skin2 ) end I can be wrong, but it should work. 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