Jump to content

Patrick

Moderators
  • Posts

    1,141
  • Joined

  • Last visited

  • Days Won

    42

Everything posted by Patrick

  1. @85242 Something like this, but I can't test it. Shader local screenX, screenY = guiGetScreenSize() local screenSource = dxCreateScreenSource(screenX, screenY) local blurStrength = 6 local blurShader = dxCreateShader("fx/BlackAndWhiteBlurShader.fx") dxSetShaderValue(blurShader, "BlurStrength", blurStrength); dxSetShaderValue(blurShader, "UVSize", screenWidth, screenHeight); function blur() if (blurShader) then dxUpdateScreenSource(screenSource) dxSetShaderValue(blurShader, "ScreenSource", screenSource); dxDrawImage(0, 0, screenX, screenY, blurShader) end end addEventHandler("onClientPreRender", getRootElement(), blur)
  2. I think the only way if you merge them to one. Can you upload both of them, with shader files?
  3. Make sure about inventoryItems[newMenu][itemSlot] is exists (with a simple IF-statement), and don't execute this part of code if it's not exists: triggerServerEvent("deleteItem", localPlayer, localPlayer, localPlayer, elementSource, inventoryItems[newMenu][itemSlot]["ID"]) saveAction() inventoryItems[newMenu][itemSlot] = nil if (elementSource == localPlayer) then playerItems[newMenu][itemSlot] = nil end
  4. The error message (attempt to index field '?' (a nil value)) refers to the table. Probably inventoryItems[newMenu][itemSlot] is not exists. (so it is nil). And you can't get the "ID" of nothing.
  5. root is not the player's element. You have to use source instead of root, but for this you need to modify triggerServerEvent and set client's element (localPlayer) as event's source instead of getRootElement(). triggerServerEvent("checkPlayerAccount", localPlayer, username, password)
  6. Wrong language, moved to Spanish section.
  7. This is not MTA Server error. You have to contact your hosting, because it's a Pterodactyl error, you can't solve it. Or if you installed Pterodactyl, you can ask for help on their forum.
  8. Auto model loader available in latest version.
  9. Just insert the player's element into a table instead of return it immediately. And return this table at the end. -- SHARED function findPlayers(part) local found = {} local players = getElementsByType("player") for i = 1, #players do local player = players[i] if tonumber(part) and getElementData(player, "id") == tonumber(part) and getElementData(player, "loggedIn") then table.insert(found, player) else local part = tostring(part):lower() local name = getPlayerName(player):lower():gsub("#%x%x%x%x%x%x", "") if name:find(part) then table.insert(found, player) end end end return found end
  10. The repository is no longer available. I'm gonna close this thread to avoid future inconveniences/bumps. Here is the latest MTA DayZ gamemode: https://github.com/mtadayz/MTADayZ
  11. Don’t expect from me to tell you what’s wrong in the code from phone screenshots. Here is a good tutorial how to debug your codes:
  12. I can't see estimatedCosts calculation part here.
  13. then show the full client sided code
  14. Is this on server side? You have to calculate this on client-side too.
  15. You have to calculate the price, or isn't changing?
  16. estimatedCosts isn't defined, so it's nil. (nothing)
  17. Wrong language, moved to Portuguese section.
  18. Find nearest vehicle by platetext looks unnecessary, if plates are unique.
  19. The repository is no longer available. I'm gonna close this thread to avoid future inconveniences/bumps. @yourpalenes Please send me a private message, if you want to reopen it, thanks.
  20. I don't think that's in MTA.
×
×
  • Create New...