xeon17 Posted January 29, 2014 Posted January 29, 2014 Can someone give me a extample for CrateVehcile please.. and a extample to crate a spawn table
Karuzo Posted January 29, 2014 Posted January 29, 2014 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 )
xeon17 Posted January 29, 2014 Author Posted January 29, 2014 createVehicle ( 411, x, y, z + 10 ) whats +10 ?
Karuzo Posted January 29, 2014 Posted January 29, 2014 That the car spawns 10 units above him. you could use (x+ 5,y,z) that means that the car spawns 5 units near him and not above him.
Saml1er Posted January 29, 2014 Posted January 29, 2014 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
Karuzo Posted January 29, 2014 Posted January 29, 2014 I don't think that's what he asked for, i think he just didn't know what this z + 10 means.
Saml1er Posted January 29, 2014 Posted January 29, 2014 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.
xeon17 Posted January 29, 2014 Author Posted January 29, 2014 Thanks for your help guys , i understand it now going to crate a perfect vehcile script
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