Jump to content

GTX

Members
  • Posts

    1,273
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by GTX

  1. local markerp = createMarker( -1868.72, 46.16, 1054.2, 'Cylinder', 1.5, 255, 255, 0, 170 ); setElementDimension(markerp, 2) function Pilotjob(hitElement, matchingDimension) if getElementType(hitElement) == "player" and (hitElement == localPlayer) and (matchingDimension == true) then if not guiGetVisible(Wnd) then guiSetVisible(Wnd, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", markerp, Pilotjob)
  2. GTX

    Help ?

    guiSetInputMode("no_binds_when_editing")
  3. https://wiki.multitheftauto.com/wiki/On ... dingFailed This maybe? Here's an example of onClientBrowserWhitelistChange: https://wiki.multitheftauto.com/wiki/Re ... serDomains
  4. Do you mean driveby? Use default realdriveby resource.
  5. There are like thousands of dxGUIs around here, you didn't even give us the code.
  6. GTX

    dxDrawImage

    Better check dxCreateTexture syntax again. dxCreateTexture("sonido/moon.png")
  7. Would be helpful if you told us which dxGUI you use.
  8. GTX

    dxDrawImage

    Use: dxDrawMaterialLine3D
  9. If you still don't know how to do it with Perfect his post: function Pilotjob(hitElement, matchingDimension) if getElementType(hitElement) == "player" and (hitElement == localPlayer) and (getElementDimension(hitElement) == matchingDimension) then if not guiGetVisible(Wnd) then guiSetVisible(Wnd, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", markerp, Pilotjob) Your marker must be in dimension 2.
  10. You forgot to pass source to function inside setTimer. addEventHandler("onWeaponFire", root, function() local currentWeaponID = getPedWeapon(source) if(currentWeaponID == 17) then cancelEvent() setTimer(function(source) takeWeapon(source, currentWeaponID) end, 1000, 1, source) end end ) Or: addEventHandler("onWeaponFire", root, function() local currentWeaponID = getPedWeapon(source) if(currentWeaponID == 17) then cancelEvent() -- You can also remove this. setTimer(takeWeapon, 1000, 1, source, currentWeaponID) end end )
  11. You're using server-side event in client-side part. Server: addEventHandler("onWeaponFire", root, function() local tear = getPedWeapon(source) if tear == 17 then cancelEvent() takeWeapon(tear) end end )
  12. That's because you didn't make functions for it.
  13. I said what is not working, not why. Anyways, try this: GUIEditor_Button = {} GUIEditor_Grid = {} GUIEditor_Marker = {} GUIEditor_Window = {} local marker = {} local groupName = 'Military' vehicleId = {402} marker = createMarker(270.71, 2045.76, 34.32,"cylinder",1.5,0,0,150,150) local x,y = guiGetScreenSize() local x = x - 208 local y = y - 321 GUIEditor_Window[1] = guiCreateWindow(500,147,246,413,"Select Car",false) guiSetVisible(GUIEditor_Window[1],false) guiSetAlpha(GUIEditor_Window[1],1) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Grid[1] = guiCreateGridList(9,34,228,255,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) column = guiGridListAddColumn(GUIEditor_Grid[1],"vehicle name",0.5) GUIEditor_Button[2] = guiCreateButton(20,308,210,41,"Select",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(20,352,210,41,"Close",false,GUIEditor_Window[1]) for i,id in ipairs ( vehicleId ) do guiGridListSetItemText ( GUIEditor_Grid[1], guiGridListAddRow( GUIEditor_Grid[1] ), column, getVehicleNameFromModel( id ), false, false ) end addEventHandler ("onClientMarkerHit", marker, function( player ) if not isPedInVehicle( player ) and player == localPlayer and getElementData ( player , "Group" ) == groupName then x999,y999,z999 = getElementPosition( localPlayer ) setElementFrozen ( localPlayer, true ) guiSetVisible(GUIEditor_Window[1],true) showCursor( true ) end end )
  14. Putting clothes on? addPedClothes
  15. 2 minute timer? This: setTimer(yourFunction, 120000, 1) And we can't make script for you, do it by yourself and we can fix errors.
  16. Refer to those, I think: engineLoadTXD engineImportTXD
  17. What is not working specifically? Any errors in /debugscript 3?
  18. Yes, do wrappers, override functions, store them into table and then destroy them if they're elements or set them to their default state or whatever. EDIT: An example would be: -- Override the function. _playSound = playSound sounds = {} res = "" function playSound(filepath, looped) local music = _playSound("cache/"..res.."/"..filepath, looped) -- Filepath is song (music.mp3) if music then table.insert(sounds, music) -- You can unload it later. Just loop through this table and use stopSound. end end function loadScript(content, resourceName) res = resourceName -- Your map name. local loadit = loadstring(content) local loaded = pcall(loadit) if loaded then -- ? end end
  19. From my old roleplay gamemode back in the days, I hope it can help you. (Its purpose is to check if driver is driving backwards and then do animation out of it.) function checkBackwardAnimation() if isPedInVehicle(localPlayer) then local veh = getPedOccupiedVehicle(localPlayer) if veh and getVehicleController(veh) == localPlayer then local ax, ay, az = getElementVelocity(veh) local m = getElementMatrix(veh) local rx = ax*m[1][1] + ay*m[1][2] + az*m[1][3] local ry = ax*m[2][1] + ay*m[2][2] + az*m[2][3] local rz = ax*m[3][1] + ay*m[3][2] + az*m[3][3] if ry >= 0 then setElementData(localPlayer, "braking", false) else setElementData(localPlayer, "braking", true) end end end end addEventHandler("onClientPreRender", root, checkBackwardAnimation)
  20. GTX

    help ?

    You must also configure your ACL, it's all written on wiki.
  21. Check /debugscript 3 or use default race from community.
  22. GTX

    Help

    All I can tell you is, use the code correctly. executeSQLQuery("INSERT INTO LogAdmin (Fecha, Admin, Premio, Cantidad, SelecTodos, Jugador) VALUES ('a', 'b', 'c', 'd', 'e', 'f')")
  23. GTX

    Help

    That's problem on other side of the script, not mine.
  24. Well, you should blame GTA physics for that. Maybe try another object or is it a specific one?
  25. exports.scoreboard:scoreboardAddColumn("zombieskilled", root, 70, "Zombies Killed", 3)
×
×
  • Create New...