Jump to content

Race spawn vehicle script!


N9.Xzi

Recommended Posts

This is my script for race spawn vehicles, but RotZ (randomSpawn[7]) for vehicle don't want to work:

  
local spawns = getElementData(Race.currentMap, "spawnPoints") 
  spawnID = spawnID + 1 
  if spawnID > #spawns then 
    spawnID = 1 
  end 
  local randomSpawn = spawns[spawnID] 
  local raceVehicle = getElementData(player, "raceVehicle") 
  if isElement(raceVehicle) then 
    destroyElement(raceVehicle) 
  end 
  
  raceVehicle = createVehicle(randomSpawn[1], randomSpawn[2], randomSpawn[3], randomSpawn[4], randomSpawn[5], randomSpawn[6], randomSpawn[7], string.sub(getPlayerName(player):gsub("#%x%x%x%x%x%x", ""), 1, -- s8) -->) 
  
  outputChatBox("veh: "..randomSpawn[1], player, 255, 255, 255, true) 
  outputChatBox("x: "..randomSpawn[2], player, 255, 255, 255, true) 
  outputChatBox("y: "..randomSpawn[3], player, 255, 255, 255, true) 
  outputChatBox("z: "..randomSpawn[4], player, 255, 255, 255, true) 
  outputChatBox("rx: "..randomSpawn[5], player, 255, 255, 255, true) 
  outputChatBox("ry: "..randomSpawn[6], player, 255, 255, 255, true) 
  outputChatBox("rz: "..randomSpawn[7], player, 255, 255, 255, true) 
  

What I missed or did not write correctly? Help please, do not load a spawn for vehicle (randomSpawn[7]). :cry:

Edited by Guest
Link to comment
createVehicle(model, x, y, z , rx, ry, rz) 

i hope that will help

I'm create the vehicle from map:

  
createVehicle(randomSpawn[1], randomSpawn[2], randomSpawn[3], randomSpawn[4], randomSpawn[5], randomSpawn[6], randomSpawn[7]) 
  

randomSpawn[1], randomSpawn[2], randomSpawn[3], randomSpawn[4], randomSpawn[5], randomSpawn[6], randomSpawn[7] = model, x, y, z , rx, ry, rz. And this don't work.

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