Jump to content

'-'


xeon17

Recommended Posts

Posted

wiki example.

function scriptCreateInf ( commandName ) 
      local luckyBugger = getLocalPlayer() -- get the local player 
      local x, y, z = getElementPosition ( luckyBugger ) -- retrive the player's position 
      createVehicle ( 411, x, y, z + 10 ) -- create the tank 10 units above them 
      outputChatBox ( "You got a Infernus!!", 255, 0, 0) 
end 
--Attach the 'scriptCreateTank' function to the "infernus" command 
addCommandHandler ( "infernus", scriptCreateInf ) 

Posted

When you get the coordinates then you actually get the value in numbers for example.

z = 1 
z = z + 10  
outputChatBox(z)  -- this will output 11  

Posted
I don't think that's what he asked for, i think he just didn't know what this z + 10 means.

I was just trying to explain it in more details. There should be more than hundred new scripters viewing this thread. :D

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