Jump to content

where to put this ?


Azten

Recommended Posts

Creating a simple command

Let's go back to the content of the script.lua file. As mentioned above, we want to provide a command to create a vehicle beside your current position in the game. Firstly we need to create a function we want to call and a command handler that creates the command the player will be able to enter in the console.

-- create the function the command handler calls, with the arguments: thePlayer, command, vehicleModel 
function createVehicleForPlayer(thePlayer, command, vehicleModel) 
   -- create a vehicle and stuff 
end 
  
-- create a command handler 
addCommandHandler("createvehicle", createVehicleForPlayer) 

Note: Function names are clickable in code examples on the wiki and linked to the functions' documentation.

where to put this i was reading the wiki and didnt know here to put this and i also wana know how to create an meta.xml or a script.lua tryed to press right click /new/text doucment then renamed it meta.xml but i doesnt change why

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