Jump to content

BolonZX

Members
  • Posts

    37
  • Joined

  • Last visited

Everything posted by BolonZX

  1. really ? I feel like there is a catch.
  2. Thank you, the code is much more cleaner now, however it doesn't work I will have try using other functions but at least the dummy works
  3. So I'm making this script which consists of a moving steering wheel, however I'm having a few issues this is the code: client local theWheel = steer_dummy function SteerLeftDown(theVeh, player) local targetPlayer = getLocalPlayer (player) if isPedInVehicle(targetPlayer) then local rx, ry, rz = getVehicleComponentRotation(theVeh, "theWheel") setVehicleComponentRotation(theVeh, "theWheel", rx+1, ry, rz) end end function SteerLeftUp(theVeh, player) local targetPlayer = getLocalPlayer (player) if isPedInVehicle(targetPlayer) then local rx, ry, rz = getVehicleComponentRotation(theVeh, "theWheel") setVehicleComponentRotation(theVeh, "theWheel", rx+1, ry, rz) end end --# Right function SteerRightDown(theVeh, player) local targetPlayer = getLocalPlayer (player) if isPedInVehicle(targetPlayer) then local rx, ry, rz = getVehicleComponentRotation(theVeh, "theWheel") setVehicleComponentRotation(theVeh, "theWheel", rx-1, ry, rz) end end function SteerRightUp(theVeh, player) local targetPlayer = getLocalPlayer (player) if isPedInVehicle(targetPlayer) then local rx, ry, rz = getVehicleComponentRotation(theVeh, "theWheel") setVehicleComponentRotation(theVeh, "theWheel", rx-1, ry, rz) end end bindKey("vehicle_left", "down", SteerLeftDown) bindKey("vehicle_left", "up", SteerLeftUp) bindKey("vehicle_right", "down", SteerRightDown) bindKey("vehicle_right", "up", SteerRightUp)
  4. Well it is a mod too (imvehft) but I know it's possible with lua, some car servers have this.
  5. Is there any script like this available to the public? I remember there use to be one but the owner removed it, if there is one I would appreciate a download link. Thanks in advance
  6. Hello guys so I have a little doubt on what functions to use to create a movable steering wheel script, I know its possible because I've played on servers that have this type of script I also know that the wheel will need a dummy to be able to move (ImVehFt) but right now my concern is what functions should I use.
  7. so I've been working all night on trying to make a new menu button using dx functions (dxDrawRectangle, dxDrawText, etc) and I want to give it animation, for example: the button would be like this by default.. but when a player clicks on it the button should slide to the left with an animation. so far this is what I got, I managed to display the dxRectangles using dxDrawAnimWindow . You can still see the InterpolateBetween function is there but I really don't know what to do, I got a really big mess here. local x, y = guiGetScreenSize ( ) function main() start = getTickCount() addEventHandler ( "onClientRender", getRootElement(), window ) end addEventHandler("onClientResourceStart", getResourceRootElement(), main ) function window (ancho, alto) local color = tocolor(211, 211, 211, 66) xdDrawAnimWindow("hue",x * 0.1179,y * 0.0807,color,"default-bold","OutBounce") end function xdDrawAnimWindow(text,alto,ancho,color,font,anim) btAncho = ancho btAlto = alto/20 local now = getTickCount() local elapsedTime = now - start local endTime = start + 1500 local duration = endTime - start local progress = elapsedTime / duration local x1, y1, z1 = interpolateBetween ( 0, 0, 0, ancho, alto, 255, progress, anim) local x2, y2, z2 = interpolateBetween ( 0, 0, 0, btAncho, btAlto, btAlto/11, progress, anim) posx = (x/2)-(x1/2) posy = (y/2)-(y1/2) dxDrawRectangle ( x * 0.8712, y * 0.0039, x * 0.1179, y * 0.0807, tocolor(211, 211, 211, 66) ) dxDrawRectangle ( x * 0.8514, y * 0.0039, x * 0.0198, y * 0.0807, tocolor(10, 190, 188, 255) ) --Para obtener mas animaciones visita [url=https://wiki.multitheftauto.com/wiki/Easing]https://wiki.multitheftauto.com/wiki/Easing[/url] end
  8. sorry for the late reply guys and thanks for the replies
  9. so I always wondered if MTA was compatible with other programming languages such as c++ or Java if so is there any library for it?
  10. ah man thats gonna take a while
  11. you mean with the map editor ?
  12. Hello guys, so my question is how to remove a default map like LS or SF or LV. I was playing in this JDM server were they remove the whole Los Santos city and put a custom one. I know the function is removeWorldModel() but I want to remove an specific city (Los Santos) and the wiki only shows one example of removing cities and it removes all 3 cities.
  13. Yes something like that but more like touge races
  14. what? the gamemode or the race?
  15. Hello MTA Community so I am about to make a custom gamemode in which I want to include races and wanted to know if that is possible and if it is what are some functions I can use.
  16. I know is a late reply but thank you
  17. both scripts work thanks guys. Cheez3D what do you mean when you say "use client instead of source for security"
  18. I am to trying to make a script that when a player joins my server it shows a black background and it doesn't spawn the user until he/she downloads all the resources. So the problem is that when the user is done downloading all the resources it does not spawn the user instead it shows the sky and nothing happens. here is the code: client: addEventHandler("onClientResourceStart",resourceRoot,function() fadeCamera(true) triggerServerEvent("onPlayerFilesDownloaded",localPlayer) end) server: addEventHandler("onPlayerJoin",root,function() fadeCamera(source,false,0) end) addEvent("onPlayerFilesDownloaded",true) addEventHandler("onPlayerFilesDownloaded",root,function() spawnPlayer(source,2125.7995605469,-1545.5288085938,302.15188598633) end)
  19. did everything you said but still same thing happens
  20. okay so use something like this? stopResource(freeroam)
  21. nop still spawns the player even if he/she is downloading the resources
  22. no, the player does spawn when the resources are downloading
  23. no no its not the progress bar (sorry if I didn't explain myself correctly)what I want is when a player joins, the server would show a black background and won't spawn the player until he/she downloads all the resources.
×
×
  • Create New...