Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by hackermagus

  1. Okay, I don't get any error message but the vehicle is currently go faster then 30 km/h. I try setPedControlState(ped, "accelerate", false) But it's not help.
  2. local vehicle = createVehicle(596, 2392.09009, -1729.73193, 13.38281, 0, 0, 90) local ped = createPed(281, 2400, -1735, 13.38281) setVehicleSirensOn(vehicle, true) warpPedIntoVehicle(ped, vehicle) setPedControlState(ped, "accelerate", true) addEventHandler("onClientResourceStart", root, function () local ownSpeed = getElementSpeed(vehicle, 1) end) Like this? This not work to
  3. Hi I made a script local vehicle = createVehicle(596, 2392.09009, -1729.73193, 13.38281, 0, 0, 90) local ped = createPed(281, 2400, -1735, 13.38281) local ownSpeed = getElementSpeed(vehicle, 1) setVehicleSirensOn(vehicle, true) warpPedIntoVehicle(ped, vehicle) setPedControlState(ped, "accelerate", true) if (ownSpeed > 29) then setPedControlState(ped, "brake_reverse", true) end And when I start the game in debugscript 3 it says "attempt to call global 'getElementSpeed' (a nil value)'"
  4. Ohh... And how can I do to make the vehicle move?
  5. I made a script local vehicle = createVehicle(596, 2392.09009, -1729.73193, 13.38281, 0, 0, 90) local ped = createPed(281, 2400, -1735, 13.38281) warpPedIntoVehicle(ped, vehicle) moveObject(vehicle, 30000, 2229.23389, -1729.73193, 13.38281) And as you can see, I want the vehicle to move on posX 2229.23389 in 30 seconds, but it not working. It creates the vehicle, the ped, insert the ped into the vehicle, but it not moving.
  6. https://drive.google.com/file/d/1ZBAJXL5H_o2Xfc15ggXSTOAFAZHr4UPD/view?usp=sharing I made a video to show my problem and I'm not the best at english so I dont know to write it.. But (video) the red marker is knows when I go in that in chat box there are shown my text but I want to show when I go into the yellow marker. The red marker is from a script and this script types is map. I made a script to the yellow marker: local myMarker = createMarker(1675.8000488281, -1004.5, 23.10000038147, 'cylinder', 1, 191, 148, 0, 255) -- create myMarker function MarkerHit( hitElement, matchingDimension ) -- define MarkerHit function for the handler local elementType = getElementType( hitElement ) -- get the hit element's type outputChatBox( "ASdasdasdasdasdasdasdasd" ) -- attach the element's type with the text, and output it end addEventHandler( "onMarkerHit", myMarker, MarkerHit ) -- attach onMarkerHit event to MarkerHit function And I know the createMarker position is the yellow marker position not the red one. I hope you understand what i write xd Thanks for helping
  7. I made a script function drawPanel() dxDrawRectangle(406.0,277.0,650.0,235.0,tocolor(0,0,0,175),false) dxDrawLine(447.0,318.0,1005.0,318.0,tocolor(255,255,255,255),1.0,false) dxDrawText("Rádió",456.0,285.0,642.0,319.0,tocolor(0,0,0,255),1.0,"pricedown","left","top",false,false,false) dxDrawText("Rádió",451.0,289.0,637.0,323.0,tocolor(255,255,0,170),1.0,"pricedown","left","top",false,false,false) end function openandclose() if removeEventHandler("onClientRender", root, drawPanel) then removEventHandler("onClientRender", root, drawPanel) guiSetVisible(prev, false) guiSetVisible(nxt, false) else addEventHandler("onClientRender", root, drawPanel) guiSetVisible(prev, true) guiSetVisible(nxt, true) end end bindKey("r","down",openandclose) prev = guiCreateButton(453, 335, 35, 35, "<", false) guiSetFont (prev, "default-bold-small") nxt = guiCreateButton(999, 335, 35, 35, ">", false) guiSetFont (nxt, "default-bold-small") And the buttons show up everytime if the visible or not.. The debugscript 3 says: "Attempt to call global'removeEventHandler' (a nil value)" How to solve that?
  8. It's worked thank you! And how can I do when the panel not showed up and I press "r" it showing up and when it's showed up and I press "r" it not showing up
  9. Hy all' I made this script bindKey ( "r", "down", dxWindow ) function dxWindow() dxDrawRectangle(406.0,277.0,650.0,235.0,tocolor(0,0,0,175),false) dxDrawLine(447.0,318.0,1005.0,318.0,tocolor(255,255,255,255),1.0,false) dxDrawText("Rádió",456.0,285.0,642.0,319.0,tocolor(0,0,0,255),1.0,"pricedown","left","top",false,false,false) dxDrawText("Rádió",451.0,289.0,637.0,323.0,tocolor(255,255,0,170),1.0,"pricedown","left","top",false,false,false) dxDrawText("Parancsok:",453.0,335.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false) dxDrawText("/vs - Visszaszámláló indítása",478.0,350.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false) dxDrawText("/enableauto - Autómatikus bejelentkezés engedélyezése (amennyiben van már regisztrált fiókod)",478.0,365.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false) dxDrawText("/disableauto - Autómatikus bejelentkezés letiltása (amennyiben van már regisztrált fiókod)",478.0,380.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false) dxDrawText("Gombok:",453.0,395.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false) dxDrawText("F1 - Freeroam menü",478.0,410.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false) dxDrawText("F2 - Teleportok",478.0,425.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false) dxDrawText("F5 - Telefon",478.0,440.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false) dxDrawText("F6 - Segítség",478.0,455.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false) dxDrawText("F11 - Térkép",478.0,470.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false) dxDrawText("K - Tempomat",478.0,485.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false) dxDrawText("Az F6 - tal zarhatod be",650.0,655.0,200.0,200.0,"pricedown","left","top",false,false,false) end And it's not working.. I turn on the debugscript 3 and it says "Bad argument @ 'bindKey' [Expected function at argument 3 got nil]" How can I solve that?
  10. If I spawn a vehicle thats ok and I know to spawn another. But when l want to spawn like 5 thats not possible because I only know to spawn 2 vehicles. How can I solve that?
  11. When I hit a marker I want to Display "GG" in the chat. I have got a resource which is a garage system that will have a marker. I write this code: Marker = createMarker(1702.7998046875, -1079.2001953125, 22.89999961853, "cylinder", 2, 0, 0, 255) local myMarker = createMarker(1702.7998046875, -1079.2001953125, 22.89999961853, 'cylinder', 2.0, 0, 0, 255, 150) function MarkerHit( Element, matchingDimension ) triggerClientEvent ( "onMarkerHit", getRootElement()) outputChatBox("GG") end addEventHandler( "onMarkerHit", Marker, MarkerHit ) And when I go to the marker I created, nothing happened. But when I go to the garage system marker, that works. And the marker position in this code is not the same as the garage system marker. Please help!!
  12. Map name: 2019-08-16-4 When I type restart 2019-08-16-4 then it says map 2019-08-16-4 restarted But when I type restart2019-08-16-4 (Without space) it will nothing happens
  13. The marker is not created. I don't know to restart the resource because it's not a resource, it's a map. And when I restart in the console the map is restart, i got black screen, but I know to move, and open panels and there is no any problems
  14. <meta> <script src="teleport.Lua" type="client"></script> <info gamemodes="play" type="map" version="1.0.0"></info> <map src="2019-08-16-4.map" dimension="0"></map> <settings> <setting name="#maxplayers" value="[ 128 ]"></setting> <setting name="#useLODs" value="[ false ]"></setting> <setting name="#gamespeed" value="[ 1 ]"></setting> <setting name="#minplayers" value="[ 0 ]"></setting> <setting name="#gravity" value="[ 0.0080000004 ]"></setting> <setting name="#waveheight" value="[ 0 ]"></setting> <setting name="#locked_time" value="[ false ]"></setting> <setting name="#weather" value="[ 0 ]"></setting> <setting name="#time" value="12:0"></setting> </settings> <script src="mapEditorScriptingExtension_s.Lua" type="server"></script> <script src="mapEditorScriptingExtension_c.Lua" type="client" validate="false"></script> </meta>
  15. Sorry I'm not so good at english but I do that.
  16. Hi , I want to make a teleport like when I go to a marker that teleports me to another position. I make a script, but it!s not workig. I add the script to the meta file, I add the cript to the map folder, I load the map but it!s not working. Please help local marker1 = createMarker(-2295.099609375, 1866.2998046875, 1.8999999761581 "arrow", 3.5, 255, 255, 255, 255) function teleport1(player) if player == localPlayer then setElementPosition(player, -2344.0385742188, 2398.6096191406, 8.5596084594727) setPedRotation (player, 90) setElementFrozen(player, false) setTimer(setElementFrozen, 1, 1, player, false) end end addEventHandler("onClientMarkerHit", marker1, teleport1)
  17. Hi, My Name is Attila and I want to make a server. I make the map in the editor but I dont know how to insert to the server. Does everyone help me? Thanks
  18. I want a garage syystem like when I'm type /save car in the chat this will be saves my car with the handling, color, etc.. And when I type /get car there is a panel where I select cars that I saved. The car name in the panel is the real car name. Does everyone do make me a full script? Thanks a lot! And sorry for my english, I'm from hungary but I hope you understand what I'm writing to here.
  • Create New...