Jump to content

gerlachmax98

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by gerlachmax98

  1. Thank-you ) In front of the vehicle will be good, but it will Not work to all vehicle, or?
  2. okay ty can you make it so that you may standing in front of the car and not as driver?
  3. https://wiki.multitheftauto.com/wiki/Animations this exist, but there is no Animation...
  4. so? function getNearestVehicle( player ) local x, y, z = getElementPosition( player ) local prevDistance local nearestVehicle for i, v in ipairs( getElementsByType( "vehicle" ) ) do local distance = getDistanceBetweenPoints3D( x, y, z, getElementPosition( v ) ) if distance <= ( prevDistance or distance + 1 ) then prevDistance = distance nearestVehicle = v end end return nearestVehicle or false end function doSomethingWithTheNearestVeh( player ) local vehicle = getNearestVehicle( player ) -- get the nearest vehicle to the player who used the command if vehicle then setPedAnimation( player, "wash_up", "anim") -- set your animation to a player setTimer( setPedAnimation, 30000, 1, player ) -- set a timer to cancel the anim after 30 seconds setElementHealth( vehicle, 800 ) -- fix the nearest vehicle. this is just an example, you can do here anything else end end addCommandHandler( "repaircar", doSomethingWithTheNearestVeh )
  5. Yes, but i need a animation on a timer... I do not know how to do it...
  6. Thank you so much!!!! How i can set a timer, when the vehicle is repairing. For a half minute. Can be there a animation when the vehicle is repairing ? (Half minute)
  7. [2013-01-24 20:51:05] WARNING: vio_lite\reparieren\server.lua:85: Bad argument @ 'getElementPosition' [Expected element at argument 1, got nil] [2013-01-24 20:51:05] WARNING: vio_lite\reparieren\server.lua:89: Bad argument @ 'getDistanceBetweenPoints3D' [2013-01-24 20:51:05] ERROR: vio_lite\reparieren\server.lua:90: attempt to perform arithmetic on local 'distance' (a boolean value) I have it now so: function getNearestVeicle() local x, y, z = getElementPosition( localPlayer ) local prevDistance local nearestVehicle for i, v in ipairs( getElementsByType( "vehicle" ) ) do local distance = getDistanceBetweenPoints3D( x, y, z, getElementPosition( v ) ) if distance <= ( prevDistance or distance + 1 ) then prevDistance = distance nearestVehicle = v setElementHealth ( v, 800 ) end end return nearestVehicle or false end addCommandHandler("repaircar", getNearestVeicle)
  8. How i get the nearest vehicle. For example is stand in front of a vehicle, and with the command /open you can open the vehicle bonnet from the nearest vehicle. Please help...
  9. client: function SubmitAbbrechenBtn( button ) guiSetVisible(GUIEditor.window[1],false) showCursor(false) triggerServerEvent ( "cancel_gui_server", lp ) end GUIEditor.window[1] = {} function createGui () local screenwidth, screenheight = guiGetScreenSize () GUIEditor.window[1] = guiCreateWindow(screenwidth/2-411,screenheight/2-285/2,411, 285, "miau", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(-10, 32, 434, 15, "miau", false, GUIEditor.window[1]) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) GUIEditor.label[2] = guiCreateLabel(-21, 11, 15, 15, "", false, GUIEditor.label[1]) GUIEditor.label[3] = guiCreateLabel(30, 69, 357, 15, "miau", false, GUIEditor.window[1]) GUIEditor.label[4] = guiCreateLabel(28, 86, 360, 18, "miau", false, GUIEditor.window[1]) GUIEditor.label[5] = guiCreateLabel(0, 18, 354, 16, "", false, GUIEditor.label[4]) GUIEditor.label[6] = guiCreateLabel(26, 104, 363, 18, "miau", false, GUIEditor.window[1]) guiLabelSetHorizontalAlign(GUIEditor.label[6], "center", false) GUIEditor.label[7] = guiCreateLabel(25, 123, 364, 19, "miau.", false, GUIEditor.window[1]) guiLabelSetHorizontalAlign(GUIEditor.label[7], "center", false) GUIEditor.label[8] = guiCreateLabel(109, 50, 201, 15, "miau.", false, GUIEditor.window[1]) guiLabelSetHorizontalAlign(GUIEditor.label[8], "center", false) GUIEditor.label[9] = guiCreateLabel(36, 161, 336, 20, "miau", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[9], 222, 101, 20) guiLabelSetHorizontalAlign(GUIEditor.label[9], "center", false) GUIEditor.button[1] = guiCreateButton(99, 191, 210, 53, "miau", false, GUIEditor.window[1]) GUIEditor.button[2]Schliessen = guiCreateButton(328, 260, 73, 15, "Schliessen", false, GUIEditor.window[1]) addEventHandler("onClientGUIClick", GUIEditor.button[2]Schliessen, SubmitAbbrechenBtn, true) end addEvent ( "_createGui", true ) addEventHandler ( "_createGui", getRootElement (), createGui ) server: markerzurpruefung = createMarker ( 1173.176, 1348.323, 10.922, "cylinder", 1, 255, 0, 0, 170 ) function pruefung_marker ( marker ) local player = source if getPedOccupiedVehicle ( player ) == false then if marker == markerzurpruefung then triggerClientEvent ( player, "_createGui" , player ) showCursor ( player, true) end end end addEventHandler ( "onPlayerMarkerHit", getRootElement (), pruefung_marker) Error: Help me
  10. I will put down my current weapon by Command? How i can do this?
×
×
  • Create New...