Jump to content


  • Posts

  • Joined

  • Last visited

About Hadif

  • Birthday 01/04/1999


  • Gang
  • Location

Hadif's Achievements


Transformer (11/54)



  1. When this function will be enable again? Im waiting it for a year. https://wiki.multitheftauto.com/wiki/EngineLoadIFP
  2. I think this should work, but.. addEvent("onRaceStateChanging") addEventHandler("onRaceStateChanging", getRootElement(), function(newState, oldState) if (newState == "GridCountdown") then addEventHandler("onPlayerVehicleEnter", getRootElement(), setPlayerVehicle()) end end ) function setPlayerVehicle(player) local vehicle = getPedOccupiedVehicle(player) if getElementModel(vehicle) then setElementModel(vehicle, 400) -- Test outputChatBox("setPlayerVehicle") end end I get an error, 11: Bad Argument @ 'getPedOccupiedVehicle' [expected ped at argument 1, got nil] 12: Bad Argument @ 'getElementModel' [expected element at argument 1, got boolean] 5: Bad Argument @ 'addEventHandler' [expected function at argument 3, got none]
  3. No error but not working , I think I have to research how's race gamemode works.
  4. Not working bro, I have made a new one but i got an error: addEventHandler("onResourceStart", getRootElement(), function() setPlayerVehicle(startedResource) end ) function setPlayerVehicle(startedResource) -- gamemodes="race" type="map" local gamemodes = getResourceInfo(startedResource, "gamemodes") local types = getResourceInfo(startedResource, "type") if (gamemodes == "race") and (types == "map") then for index, vehicle in pairs(getElementsByType("vehicle")) do setElementModel(vehicle, 409) end end end
  5. How do I save player account in XML file? I just want to manage the player account easily. How do I start? Any examples? Any help will be appreciate, thank you.
  6. What a genius! Thank you so much, ill try it asap.
  7. Hello, anyone knows how to replace vehicle model in race game-mode when the race map start? There's a event when the race game-mode map start called onMapStarting (source: https://wiki.multitheftauto.com/wiki/Resource:Race). So, how do I start?
  8. Thanks, that example works but.. I have another problem, when I click and try to type, the character appears in both edit field. How do I solve this? addEventHandler("onClientRender", getRootElement(), function() panelLogin() end ) local font = {"title", "subtitle", "display", "button"} ... font["display"] = dxCreateFont("file/ttf/roboto-regular.ttf", 9) ... local word = {"username", "password"} word["username"] = "" word["password"] = "" function panelLogin() ... local display = {} ... display[5] = dxDrawText(word["username"], 603, 366, 843, 382, tocolor(255, 255, 255, 255), 1.00, font["display"], "left", "center", false, false, false, false, false) display[6] = dxDrawText(word["password"], 603, 392, 843, 408, tocolor(255, 255, 255, 255), 1.00, font["display"], "left", "center", false, false, false, false, false) ... end function isMouseInPosition(absoluteX, absoluteY, screenW, screenH) if (not isCursorShowing()) then return false end local screenX, screenY = guiGetScreenSize() local cursorX, cursorY = getCursorPosition() local cursorX, cursorY = (cursorX * screenX), (cursorY * screenY) if (cursorX >= absoluteX and cursorX <= absoluteX + screenW) and (cursorY >= absoluteY and cursorY <= absoluteY + screenH) then return true else return false end end addEventHandler("onClientClick", getRootElement(), function() onClientClickEditPassword() onClientClickEditUsername() end ) function onClientClickEditUsername() if isMouseInPosition(603, 366, 240, 16) then addEventHandler("onClientCharacter", getRootElement(), onClientEditUsername) end end function onClientEditUsername(character) word["username"] = word["username"]..character end function onClientClickEditPassword() if isMouseInPosition(603, 366, 240, 16) then addEventHandler("onClientCharacter", getRootElement(), onClientEditPassword) end end function onClientEditPassword(character) word["password"] = word["password"]..character end And by the way, how do I simplify the function? I think that my edit field will have a lot in my script and I don't want to repeat the script, there must be the way to make it own function, any help will be appreciate. Thank you for your time, may god bless your kindness and make you more genius!
  9. This example works without edit nothing?
  10. I guess this way is what I want, but... Can you explain more?
  11. Hmhhh, how do I make my own? I don't want to includes the other resource. Any idea? By the way, thanks! Perhaps you could download that resource, check the code and see how it works? im not understand deutch language
  • Create New...