Jump to content

How i can 2?


Touho

Recommended Posts

In file broph.lua there is a function spawnThePlayer, you'll need to change the coords there. To make a random spawn points you'd need to make a table and store the spawns' coords in there. Eg.:

local spawns = { } 
spawns[1].x = 123.4567 
spawns[1].y = 234.5678 
spawns[1].z = 345.6789 
spawns[1].rot = 46.7891 
  
spawns[2].x = 423.2495 
spawns[2].y = 453.2564 
spawns[2].z = 564.6321 
spawns[2].rot = 120.6928 
  
local rnd = math.random( #spawns ) 
spawnPlayer( player, spawns[rnd].x, spawns[rnd].y, spawns[rnd].z, spawns[rnd].rot ) 

Link to comment

Sorry, that was a quick reply...

Try to make a table in a table before assigning values. Eg.

spawns = { } 
spawns[1] = { } -- table should be created on each spawns index, like: spawns[2] = { }, etc. 
spawns[1].x = 123.2494 

Link to comment
Sorry, that was a quick reply...

Try to make a table in a table before assigning values. Eg.

spawns = { } 
spawns[1] = { } -- table should be created on each spawns index, like: spawns[2] = { }, etc. 
spawns[1].x = 123.2494 

Where i put that?

Link to comment

Touho, one advice:

Get your questions on IRC please, or scripting forum is going to have one (or more later ^^) B.L.A.S.T. threads which is quite unneeded.

I was asking on IRC when I was starter, and I ask now too :P

It just keeps forums cleaner because the subjects aren't so clear (like "How I can do 2?" because people don't get straight what do you need.

Link to the #mta.scripting channel

irc://irc.multitheftauto.com/mta.scripting

Cheers ;)

Nidza

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