asd123 Posted June 17, 2013 Share Posted June 17, 2013 Hey all i was making a Cops and robber map but then i had a problem i need to make a certain vehicle spawn point the first spawn point a person spawns with. For example there could be a server with 5 people on and 100 spawn points 99 of the spawns are police cars and 1 is the robber spawn i need to make the robber spawn the first spawn so 1 of the 5 people on the server will get a robber car and the rest police. How can i do this? Link to comment
Mossy Posted June 17, 2013 Share Posted June 17, 2013 I suppose this is possible by a script. Link to comment
asd123 Posted June 17, 2013 Author Share Posted June 17, 2013 I am pretty sure there is a way to do this with map editor? Link to comment
Jaysds1 Posted June 17, 2013 Share Posted June 17, 2013 Ya it is, but you will still need to script this Link to comment
asd123 Posted June 18, 2013 Author Share Posted June 18, 2013 How can i script something like that? Link to comment
Jaysds1 Posted June 18, 2013 Share Posted June 18, 2013 Well in the script you would first need to loop through the map file with all the vehicles being spawned, while looping through it, you could get the positions of them, store them in to a table and destroy the vehicle. After that's done, when ever a player joins the server and they're the police then use this: local x,y,z = unpack(tableName[math.random(1,#tableName)] --The table would basically look like this: local tableName = {{x,y,z}} to get the random position of a police car, after just send them to that position and warp them into the car. Link to comment
asd123 Posted June 18, 2013 Author Share Posted June 18, 2013 oh i have no clue sorry i cant do this but thanks for the help anyway 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