-
Posts
741 -
Joined
-
Days Won
16
Everything posted by Tails
-
Something else must be off in your script. For example the way you're drawing the GUI, the positions may be off, or you might have to adjust the mouse pos accordingly. Show us how you're drawing the stuff, in e.x. the positions. Multiplying the positions by the screen size makes it as accurate as it can be. The relative positions that getCursorPosition gives you are just values between 0 and 1, they're fixed they never change. Each pixel you move to will have the same float. It's not a matter of accuracy.
-
Tell him to clear his cache MTA\mods\deathmatch\resources
-
http://dev.prineside.com/en/gtasa_samp_model_id/search/?q=fence http://dev.prineside.com/en/gtasa_samp_model_id/model/987-elecfence_BAR/ http://dev.prineside.com/en/gtasa_samp_model_id/model/8210-vgsSelecfence12/
-
This is a perfectly normal way of doing it. Sometimes you want to take some data from an existing table into a new one and use that for sorting without messing with the original. But go ahead and post your solution here, OP needs it.
-
You don't have to change your table format (at least it depends on what you're doing and how your script is functioning). Check this old post of mine for an easy solution:
-
Show us the whole thing
- 10 replies
-
Check if you have multiple comment blocks like this: --[[ some code --[[ some other code --]] --]] you can't do this.
- 10 replies
-
https://wiki.multitheftauto.com/wiki/FadeCamera
-
Use this addEventHandler("onClientRender", root, function() if getKeyState("2") then objectRotation = objectRotation + 1.20 setElementRotation(objeto, 0, 0, objectRotation) end end)
-
givePlayerMoney, Returns true if the money was added, or false if invalid parameters were passed. According to wiki, so not the amount. If you still want to output it, use tostring(money_for_iron)
-
You should use OnClientBrowserDocumentReady
-
What I do in my server is I run set the camera interior to 1 then I disable the sounds then a start a timer to set it it back after 2 seconds. Camera.interior = 1 setAmbientSoundEnabled("general", false) setAmbientSoundEnabled("gunfire", false) setWorldSoundEnabled(0, 0, false) setWorldSoundEnabled(0, 29, false) setWorldSoundEnabled(0, 30, false) Timer(function() Camera.interior = 0 end, 2000, 1) This works as a workaround, I don't currently know a better working solution, if you find it please let me know
-
Looking for this? https://wiki.multitheftauto.com/wiki/DxGetTextWidth
- 1 reply
-
- 1
-
-
local parts = { {"Engine", ":guieditor/images/examples/mtalogo.png"}, {"Tuning", ":guieditor/images/examples/mtalogo.png"}, {"Paint", ":guieditor/images/examples/mtalogo.png"}, } local t = 1 addEventHandler("onClientRender", root, function() local v = parts[t] dxDrawRectangle(527, 130, 202, 127, tocolor(0, 0, 0, 146), false) dxDrawText(v[1], 554, 137, 700, 159, tocolor(255, 255, 255, 255), 1.00, "default", "center", "top", false, false, false, false, false) dxDrawImage(583, 164, 84, 73, v[2], 0, 0, 0, tocolor(255, 255, 255, 255), false) outputChatBox(t) end ) bindKey ("arrow_r", "down", function() t = t ~= #parts and t + 1 or t end) bindKey ("arrow_l", "down", function() t = t ~= 1 and t - 1 or t end) The thing is: local v = parts[t]. t being the index, no need to loop it.
-
No just add if hitElement == localPlayer then instead of if getElementType (hitElement) == "player" then also, it's onClientMarkerHit for the client side.
-
Client side playSound("http://streaming.shoutcast.com/RadioHunter-TheHitzChannel")
-
Here's a snippet from an old resource of mine. I'm using mass handling and it works just fine function setVehiclePushable(veh,pushable) if not pushable then setVehicleHandling(veh,"mass",7000) setVehicleHandling(veh,"turnMass",120000) setVehicleHandling(veh,"brakeDeceleration",100000) else local model = getElementModel(veh) local propTable = getOriginalHandling(model) for k,v in pairs(propTable) do setVehicleHandling(veh,k,v) end end end addEventHandler("onVehicleEnter",root, function() setVehiclePushable(source,true) end ) You'll probably need to add the function to onVehicleExit and maybe some other events like onVehicleRespawn or onVehicleExplode so the vehicles get reset properly. My use case is different so I'm using different events. Hope this helps, good luck!
-
@Dzemous I think you're looking for this? https://wiki.multitheftauto.com/wiki/GetElementAttachedOffsets
-
@Sami_~> Make sure you have enabled remote websites in your settings under Web Browser tab. Also make sure you haven't accidentally blocked the youtube/google urls (check your blacklist). If you have too many in there, you can clear it by editing this file: MTA San Andreas 1.5\MTA\CEF\browserdata.xml
-
Use this local pos = localPlayer.matrix:transformPosition(Vector3(0, 2, 0))
-
Not sure exactly what you're trying to do but, here's just a really quick example of what you could do. You really only need one event handler. local positions = { {x = 3, y = 3, w = 4, h = 4}, {x = 8, y = 8, w = 4, h = 4}, } local colshapes = {} for i=1, #positions do local pos = positions[i] local col = createColRectangle(pos.x, pos.y, pos.w, pos.h) colshapes[col] = {} -- you could attach more data here and get it within onColShapeHit end addEventHandler("onColShapeHit", root, function(player, dimension) if colshapes[source] then outputChatBox("player entered the col shape", player) end end) Hope this helps.
-
Not really owned vehicle but just basic spawner that I made a while ago. You can add/change positions in the lua files or change the vehicle ids. There's two different versions, use whichever you like better. https://files.fm/u/rmd7rgzf
-
https://wiki.multitheftauto.com/wiki/GetPlayerCount https://wiki.multitheftauto.com/wiki/FileCreate