Jump to content

Hydra

Members
  • Posts

    277
  • Joined

  • Last visited

  • Days Won

    1

Hydra last won the day on January 25

Hydra had the most liked content!

5 Followers

About Hydra

  • Birthday 13/06/2003

Details

  • Gang
    -
  • Location
    Romania & Italy
  • Occupation
    Developer
  • Interests
    -

Recent Profile Visitors

3,227 profile views

Hydra's Achievements

Pee-Wee

Pee-Wee (21/54)

70

Reputation

  1. Nu mai am de gand sa fac nimic pe MTA sau ce detine de el, a devenit plictisitor si mai ales mort la noi in tara. Asa ca nu o sa mai fac niciun proiect pe aceasta platforma sau sa petrec timp jucand.
  2. If you want more vehicle parts just don't use vehicle variants and use setVehicleComponentVisible instead. You can make how many parts you want for a car and when you start the resource use setVehicleComponentVisible(vehicle, theComponent(from the chassis only), state(false/true)) and use ElementStreamIn functions to sync the car parts for everyone
  3. Proiectul a fost cancelat deoarece este prea multa munca pentru o singura persoana!
  4. Hydra

    Fuel System Help

    function CheckFuel() for k, v in ipairs(getElementsByType("vehicle")) do if v == getPedOccupiedVehicle(localPlayer) then if getElementData(v, "fuel") <= 0 then setVehicleEngineState(getPedOccupiedVehicle(localPlayer), false) else getElementData(v, "fuel") >= 1 then setVehicleEngineState(getPedOccupiedVehicle(localPlayer), false) end end end end addEventHandler("onClientRender", root, CheckFuel) Not sure if it will work and not sure if I did it right but you can try it
  5. Nobody will do these things for you for free, you should ask this request on this section:https://forum.mtasa.com/forum/149-looking-for-staff/ and specify how much money you can give for the developers that might be interesed in your request.
  6. function checkHungerAndThirst() local getHunger = getElementData(localPlayer, "Player:Hunger") local getThirst = getElementData(localPlayer, "Player:Thirst") if getHunger <= 0 then setElementHealth(localPlayer, 0) end if getThirst <= 0 then setElementHealth(localPlayer, 0) end end setTimer(checkHungerAndThirst, 1000, 0)
  7. You can use the element data, it does not produce lag as some people say. I have 10+ element datas on my server and I have no lag. Depends on how you use it too
  8. --// DX Draw local sx, sy = guiGetScreenSize() local resW = sx/1920 --// I put sx/1920 bcs my resolution is 1920x1080 you can put sx/your resolution width, I use resW for text scalling function ShowInfo() local theCash = getPlayerMoney(localPlayer) dxDrawRectangle(sx * 0.1300, sy * 0.2300, sx * 0.2300, sy * 0.3000, tocolor(0, 0, 0, 210), false) dxDrawText("Player Money: "..theCash.."", sx * 0.1400, sy * 0.2700, sx * 0.0300, sy * 0.0300, tocolor(255, 255, 255, 255), 1.00*resW, "default-bold", "left", "top") end function CheckInfo() if not infoState then infoState = true addEventHandler("onClientRender", root, ShowInfo) else infoState = false removeEventHandler("onClientRender", root, ShowInfo) end end addCommandHandler("info", CheckInfo) --// GUI local window = guiCreateWindow(etc...) local label = guiCreateLabel(etc....) guiSetVisible(window, false) local timerUpdateInfo = nil function updateInfo() local theCash = getPlayerMoney(localPlayer) guiSetText(label, "Player Money: "..theCash.."") end function CheckInfo() if guiGetVisible(window) == false then guiSetVisible(window, true) timerUpdateInfo = setTimer(updateInfo, 1000, 0) else guiSetVisible(window, false) if isTimer(timerUpdateInfo) then killTimer(timerUpdateInfo) timerUpdateInfo = nil end end end addCommandHandler("info", CheckInfo) You can use GUI or DX without any problem, now it also depends on what kind of interface you want your server to have. If you want something classic you can use GUI but if you want something based on design and animations then DX it's the best way. I put an example above for the player info
  9. Yea, sorry Try to do it like this local button1 function test1() window1test1 = guiCreateWindow((sW - 419) / 2, (sH - 165) / 2, 280, 310, "test1", false) button1 = guiCreateButton ( 5, 25, 120, 25, "btn1", false, window1test1) addEventHandler("onClientGUIClick", root, test2) end addEvent("test1", true) addEventHandler("test1", root, test1) addCommandHandler("test1",test1) function test2() if source == button1 then guiSetEnabled (button1,false) removeEventHandler("onClientGUIClick", root, test2) end end
  10. function buttonClick() if source == button1 then iprint("You clicked me") end addEventHandler("onClientGUIClick", root, buttonClick) or function buttonClick() iprint("You clicked me") addEventHandler("onClientGUIClick", button1, buttonClick)
  11. Poti sa folosesti serverul oficial de MTA si poti vorbi in categoria romaneasca: https://discord.gg/mtasa De asemenea, postul tau nu include informatii exacte despre ce proiect vrei sa faci si cat esti dispus sa platesti developeru respectiv. Pe viitor incearca sa faci o descriere la posturile pe care le faci nu sa postezi doar ,,caut scripter"
  12. function changeWalkSettings (arg) toggleControl(source, "sprint", arg) toggleControl(source, "jump", arg) toggleControl(source, "aim_weapon", arg) toggleControl(source, "next_weapon", arg) toggleControl(source, "previous_weapon", arg) toggleControl(source, "fire", arg) toggleControl(source, "enter_exit", arg) end addEvent("changeWalkSettings", true) addEventHandler("changeWalkSettings", root, changeWalkSettings) --// In another script it will be like this triggerClientEvent(source, "changeWalkSettings", source, true or false) --// for client to server triggerServerEvent("changeWalkSettings", localPlayer, true or false) --// for server to client triggerEvent("changeWalkSettings", localPlayer, true or false) --// if you trigger the client function in another client script triggerEvent("changeWalkSettings", source, true or false) --// if you trigger the server function in another server script or via exports exports.theResourceWhereTheFunctionIs:theFunction(arguments) Example: exports.myScript:changeWalkSettings(true) If you want to use the export method you need to put in meta.xml this: <export function="changeWalkSettings" type="(client, server or shared)" /> ( type="client" will mean the function can be exported only in client scripts ) ( type="server" will mean the function can be exported only in server scripts ) ( type="shared" will mean the function can be exported in client and server scripts ) In my opinion, I recommend using the trigger method I hope I helped you
  13. Nice but you should use Showroom category next time because this category is only for scripting help and people will get confused.
  14. Download a clean version of the game and use GTAALL.com instead for vehicle mods, you have an uninstall .exe for the respective mod using GTAALL.com and you don't need to backup your files every time you put a custom mod
  15. You have in client: triggerServerEvent("onHacking",localPlayer,Difficulty) But in server you have the ,,SOURCE" argument so it should be: triggerServerEvent("onHacking", localPlayer, localPlayer, Difficulty)
×
×
  • Create New...