ZuKi|R Posted November 4, 2017 Share Posted November 4, 2017 Hello that such as are I hope that well, the reason for thispublication is that I want to create a vehicle through aguiCreateButton and a guiCreateEdit --------------------------------------------------------------------------------------------------------------------------------- Client.lua --- Part of the function in the onClientGUIClick ------------------------------------------------------------------------------------------------------------------------------ elseif source == vehiclee then local CreateCarro = guiGetText(vehiclees) triggerServerEvent("CrearVehiculo", localPlayer, PlayerO,CreateCarro) --------------------------------------------------------------------------------------------------------------------------------- Server.lua function CrearCarroMod (nickC, CarroVehicle) playeer = getPlayerFromName(nickC) createVehicle(getPlayerFromName(nickC), CarroVehicle) outputChatBox("#FF0000"..getPlayerName(source).. " #00ff00Te Ha Dado Un "..CarroVehicle.."%", playeer, 255, 0, 0, true) outputChatBox("#00ff00Has Dado Un "..CarroVehicle.."% #00ff00al Jugador #FF0000"..getPlayerName(playeer).."", source, 255, 0, 0, true) end addEvent("CrearVehiculo", true) addEventHandler("CrearVehiculo", root, CrearCarroMod) ------------------------------------------------------------------------------------------------------------------------ This is my code in the client and server. Link to comment
Moderators IIYAMA Posted November 4, 2017 Moderators Share Posted November 4, 2017 Nice goal. And the problem is? ... Link to comment
ZuKi|R Posted November 4, 2017 Author Share Posted November 4, 2017 2 minutes ago, IIYAMA said: Buen gol. Y el problema es? ... I don't create the vehicle take the button and nothing Link to comment
Moderators IIYAMA Posted November 4, 2017 Moderators Share Posted November 4, 2017 (edited) Please follow the createVehicle syntax vehicle createVehicle ( int model, float x, float y, float z [, float rx, float ry, float rz, string numberplate, bool bDirection, int variant1, int variant2 ] ) https://wiki.multitheftauto.com/wiki/CreateVehicle You have to fill in the model and it's position (x, y, z). So for example: createVehicle(400, 0, 0, 10) This will create a vehicle with the skin/model 400 in the middle of the map. And if that doesn't work, please check if that part of the code gets executed. Edited November 4, 2017 by IIYAMA Link to comment
ZuKi|R Posted November 4, 2017 Author Share Posted November 4, 2017 6 minutes ago, IIYAMA said: Siga la sintaxis createVehicle https://wiki.multitheftauto.com/wiki/CreateVehicle Debe completar el modelo y su posición (x, y, z). Así por ejemplo: Esto creará un vehículo con la piel / modelo 400 en el medio del mapa. Thanks already found the solution 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