Jump to content

Hadif

Members
  • Posts

    73
  • Joined

  • Last visited

Everything posted by Hadif

  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
  12. More explanation pls, it looks useful!
  13. i think the problem is that dff/txd file is not a script, change it on meta.xml to file. eg: same as txd
  14. Hmhhh, how do I make my own? I don't want to includes the other resource. Any idea? By the way, thanks!
  15. How do I create edit box with DX?
  16. Ok dude, thanks! Ill try..
  17. Hello guys! How do I make a registration with an option to put Email?
  18. Hello guys! I need to modify my script, I want to get times remaining. Example: If player get out from Tierra Robada and Bone County for 10 seconds, that player will be kill or vehicle will be explode. Any help will be appreciate! Script: addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource ( ) ), function ( ) startLocator ( ) end ) function theLocator ( ) local allLocations = { "Las Venturas", "San Fierro", "Whetstone", "Flint County", "Red County", "Los Santos" } local allPlayers = getElementsByType ( "player" ) local allVehicles = getElementsByType ( "vehicle" ) for index, thePlayer in ipairs ( allPlayers ) do local theLocation = getElementZoneName ( thePlayer, true ) for index, allLocations in ipairs ( allLocations ) do if ( theLocation == allLocations ) then killPed ( thePlayer ) end end end for index, theVehicle in ipairs ( allVehicles ) do local theLocation = getElementZoneName ( theVehicle, true ) for index, allLocations in ipairs ( allLocations ) do if ( theLocation == allLocations ) then blowVehicle ( theVehicle ) end end end end function startLocator ( ) setTimer ( theLocator, 50, 0 ) end
  19. Are you sure? Ill try this later. Anyway, thanks for your help.
×
×
  • Create New...