-
Posts
1,141 -
Joined
-
Last visited
-
Days Won
42
Everything posted by Patrick
-
@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)
-
I think the only way if you merge them to one. Can you upload both of them, with shader files?
-
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
-
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.
-
Ayuda. Error CL04 durante juego
Patrick replied to elhuawei's topic in Ayuda relacionada al cliente/servidor
Moved to Spanish section. -
[AJUDA]Estou com problemas num script de MTA no ServerSide
Patrick replied to ThigasDEV's topic in Programação em Lua
Moved to Portuguese section. -
Moved to Portuguese section.
-
Moved to Portuguese section.
-
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)
-
Wrong language, moved to Spanish section.
-
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.
- 2 replies
-
- paradiserp
- downtownrp
-
(and 6 more)
Tagged with:
-
Auto model loader available in latest version.
-
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
-
[SCRIPT] ellementAttach - Bolsa em Loja de Assalto [SCRIPT]
Patrick replied to Trinityz's topic in Programação em Lua
Wrong language, moved to Portuguese section. -
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
-
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:
-
I can't see estimatedCosts calculation part here.
-
then show the full client sided code
-
Is this on server side? You have to calculate this on client-side too.
-
You have to calculate the price, or isn't changing?
-
estimatedCosts isn't defined, so it's nil. (nothing)
-
Wrong language, moved to Portuguese section.
-
Check if vehicle is nearby by vehicle's plate?
Patrick replied to thund3rbird23's topic in Scripting
Find nearest vehicle by platetext looks unnecessary, if plates are unique. -
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.
-
I don't think that's in MTA.