Azten Posted December 30, 2010 Share Posted December 30, 2010 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
Castillo Posted December 30, 2010 Share Posted December 30, 2010 <meta> <script src="FILE NAME HERE.lua" type="server" /> </meta> https://wiki.multitheftauto.com/wiki/Resources Link to comment
Castillo Posted December 30, 2010 Share Posted December 30, 2010 post here what you tryied to do. Link to comment
Azten Posted December 30, 2010 Author Share Posted December 30, 2010 ok first i tyed to create a new documnet and i named it meta.xml still didnt change so tryed to rename it script.lua but still didnt work Link to comment
Castillo Posted December 30, 2010 Share Posted December 30, 2010 I don't get you, that is not a scripting problem. check your PC maybe it won't let you edit anything. Link to comment
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