- 
                Posts3,875
- 
                Joined
- 
                Days Won67
Everything posted by DNL291
- 
	would be better if you show us the other part of the script and debugscript and root is the same as getRootElement()
- 
	function PinCar(thePlayer,carname) local carname = getPedOccupiedVehicle(source) local vehicule = getVehicleName(carname) if (vehicule) then local blip = createBlipAttachedTo (vehicule, 19, 4, 255, 0, 0, 255, 0, 99999.0, thePlayer) else outputChatBox("vehicule not found",thePlayer,255,0,0) end end addEvent("PinCar", true) addEventHandler("PinCar", getRootElement(), PinCar)
- 
	topic should be moved. posted in the wrong place
- 
	You set the id of the vehicle? stop just copy the code and say it does not work.
- 
	addEventHandler( "onPlayerJoin", root, function () x = 1762.18774 y = 815.470336 z = 10.4135589 local _vehicle = createVehicle(id, x, y, z) spawnPlayer(source, x, y, z) setElementModel(source, math.random(0,312)) warpPedIntoVehicle(source, _vehicle) setCameraTarget( source, source ) outputChatBox("* Successfully spawn ", source, 0, 255, 0) end )
- 
	You're asking to create a list of vehicles for you, nobody will work on a script for you for free. you could have done it and ask for help in the rest. you can learn no one is born knowing Lua scripting. viewtopic.php?f=148&t=40809
- 
	You're waiting for someone to create for you. Nobody will do the script for you for free.(Probably no one). learn Lua and make your scripts yourself
- 
	where is event carCreateTest ?
- 
	yeah, forgot to set the variable above. is because the code that I tested did not have this error.
- 
	I think you better test on some server before speaking it. the label is updated when the player enters and exits the vehicle, though the script needs to be corrected. but I will not do it all for him. he can learn.
- 
	the label has been updated for me, when I enter and leave the vehicle
- 
	GUIEditor_Label = {} theWindow = guiCreateWindow(300,200,250,200,"Sistema de Veiculos",false) guiWindowSetSizable(theWindow,false) guiSetVisible (theWindow, false) guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) guiSetFont(GUIEditor_Label[1],"default-bold-small") guiCreateButton(0.005, 0.250, 0.6, 0.130, "Vehiculo :", true, theWindow) guiCreateButton(0.005, 0.400, 0.6, 0.130, "Vehiculo :", true, theWindow) guiCreateButton(0.650,0.100,0.3,0.2,"Trancar / Destrancar",true,theWindow) guiCreateButton(0.650,0.330,0.3,0.2,"Blip",true,theWindow) destroyBut = guiCreateButton(0.650,0.560,0.3,0.2,"Visivel / Invisivel",true,theWindow) guiCreateButton(0.005,0.560,0.3,0.2,"Vender",true,theWindow) guiCreateButton(0.345,0.560,0.3,0.2,"Seila",true,theWindow) guiCreateLabel(0.080, 0.780, 0.6, 0.2, "Tabela feita por Ninguem", true, theWindow) function buttonLabel() local theVehicle = getPedOccupiedVehicle(localPlayer) if ( theVehicle ) then spawnBut1 = guiCreateButton(0.005, 0.100, 0.6, 0.130, "Veiculo: "..getVehicleName(theVehicle).."", true, theWindow) destroyElement(spawnBut2) else spawnBut2 = guiCreateButton(0.005, 0.100, 0.6, 0.130, "Veiculo: nenhum", true, theWindow) destroyElement(spawnBut1) end end function refreshLabel() setTimer(buttonLabel, 50, 1) end addEventHandler("onClientVehicleEnter", root, refreshLabel) addEventHandler("onClientVehicleExit", root, refreshLabel) addEventHandler("onClientResourceStart", root, refreshLabel) function resourceStart () bindKey ("F3", "down", menuShow) end addEventHandler ("onClientResourceStart", getResourceRootElement ( getThisResource () ), resourceStart) function menuShow () visableornot = guiGetVisible (theWindow) if (visableornot == true) then guiSetVisible (theWindow, false) showCursor (false) end if (visableornot == false) then guiSetVisible (theWindow, true) showCursor (true) end end addEvent ("carSpawn", true) addEvent ("carDestroy", true) function guiClick () if (source == spawnBut1 or source == spawnBut2) then triggerServerEvent ("carSpawn", getLocalPlayer()) elseif (source == destroyBut) then triggerServerEvent ("carDestroy", getLocalPlayer()) end end addEventHandler ("onClientGUIClick", getRootElement(), guiClick)
- 
	local button = guiCreateButton(0.005, 0.100, 0.6, 0.130, "Veiculo:", true, theWindow, 255, 0, 0) addEventHandler("onClientGUIClick", button, root, function () local vehicle = getPedOccupiedVehicle(source) if vehicle then guiSetText( button, "Veiculo: "..getVehicleName(vehicle).."" ) else guiSetText( button, "Veiculo: nenhum" ) end end ) not sure if it works.
- 
	local button = guiCreateButton(0.005, 0.100, 0.6, 0.130, "Veiculo :", true, theWindow, 255, 0, 0) addEventHandler("onClientGUIClick", button, root, function () local vehicle = getPedOccupiedVehicle(source) if vehicle then outputChatBox("your current vehicle is: "..getVehicleName(vehicle).."") else outputChatBox("you dont have any vehicle") end end )
- 
	maybe it works local _markers = getElementsByType("marker") for i,marker in ipairs(_markers) do
- 
	you can make a table with the coordinates. if I understand well i not understand
- 
	What? you want ideas for the script?
- 
	worked for me 'PLAYERNAME' must be the name of the player.
- 
	https://community.multitheftauto.com/index.php?p= ... ls&id=4236
- 
	and this is wrong oncientResourceStart
- 
	Muitos brasileiros nao ligam pra aprender Lua. que preferem roubar/editar scripts. seria bom se pedisem ajuda com scripts para ser ajudado e aprender. mais não é o brasileiro em sí, e tbm não é só brasileiro que faz isso. e ficar atacando dizendo que sao todos burros por exemplo é um insulto. E aqui está offTopic, melhor pararem com as postagens.
- 
	r2 g2 b2 is optional, do not need to add if you want to change only the first color
- 
	https://community.multitheftauto.com/index.php?p= ... ls&id=3247
- 
	he wants the script to not the function.

 
        