Leaderboard
Popular Content
Showing content with the highest reputation on 30/12/19 in Posts
-
I'm just curious. Is there a way, to remove spawned cars on the Play/Freeroam gamemode. For example: monster trucks at Grove Street with bikes, along with Buffalo near Ryder's house. Just want to include some modded maps onto my server, and I don't want cars to bug out [from custom map]. If there's a script to it, or a line that i can change in a code - can you sent it here? Thanks in advance!1 point
-
-- replace line 3 with this if getVehicleID(vehicle) == 425 then EDIT: use getElementModel instead of getVehicleID. (I’m on mobile so can’t edit the snippet directly). Also add a check if vehicle exists or not.1 point
-
The first 4 args are same as dxDrawImage, its absolute x, y, width and height. The position on your screen, where you want to render the image section. The 5-8th args are the coordinates of the image section. If you have a 500x500px image and you want to render the left top corner of the image (50x50px section) on center of your screen: local sx, sy = guiGetScreenSize() dxDrawImageSection( sx/2-75/2, sy/2-75/2, 75, 75, -- the position on the screen 0, 0, 50, 50, -- coordinates of the section. "image.png" ) Hungarian: Első négy argument az a dxDrawImage-hez hasonlóan a kép pozíciója a képernyődön Viszont a 5-8. argumentet már magán a képen belül kell nézned, a képrészlet amit ki szeretnél vágni. Ha van egy 500x500 pixeles képed aminek a bal felső sarkát szeretnéd kivágni (egy 50x50 pixeles négyzetet), akkor fenti kódrészletben látod mit kell tenned. Természetesen ha egy 50x50 pixeles képed vágsz ki attól renderelheted nagyobb méretben, csak romlani fog a minősége, ahogy fent is csináltam.1 point
-
that's why i dont understand why we must specify a % for the animation ! ! so just need to speed it1 point
-
Aaaand I finally found a solution which I like and I want to share it with everyone. So basically now I am using "borderless keep res" mode in MTA. In the app Gamma Panel (link above) I set brightness profiles. One is "High" for MTA with a bit higher brightness and hotkey Num8, and one is normal, default, hotkey Num5. Of course it would be pain in the ass to click hotkeys everytime to change brightness, so there is a solution for this also! Install "AutoIt!", create a simple script and run it: While 1 WinWaitActive("[CLASS:Grand theft auto San Andreas]") Send("{NUMPAD8 down}") Send("{NUMPAD8 up}") WinWaitNotActive("[CLASS:Grand theft auto San Andreas]") Send("{NUMPAD5 down}") Send("{NUMPAD5 up}") Wend Now for me it works perfectly. I am personally happy with this tricky solution. Good if someone will use it too. P.S. never used AutoIt before, but hopefully did a correct script. It works then its correct I guess (CPU usage by script 0%)1 point
-
That is not ging to work. The GTA engine will adjust the running speed to the default until the ped leaves the ground. You could try to use a walk animation and speed it up: https://wiki.multitheftauto.com/wiki/SetPedAnimationSpeed1 point
-
It’s happening only with people that have an Nvidia GPU, it seems like AMD GPU’s are not affected, probably related to OS version & the GPU.1 point
-
1 point
-
Wow, I'm so stupid man XD, Thanks man, it works and, it was full code BTW, it is possible with clientside scripts ?1 point
-
for now project is frozen until first set of rendering functions will released1 point
-
For not scripts: (as title says) https://wiki.multitheftauto.com/wiki/TeaEncode1 point
-
Use toggleControl(player, "radar", false) EDIT:Jasyds read what getControlState does.1 point
-
Mesma coisa que o Lord Comentou, porém com animação e MUUUUITO mais linhas... -- tabela posição do radar local posSubir = { [1] = {218, 609, 168, 28}, [2] = {218, 647, 168, 28}, [3] = {218, 685, 168, 28}, } -- tabela posição acima do radar local posDescer = { [1] = {218, 426, 168, 28}, [2] = {218, 464, 168, 28}, [3] = {218, 502, 168, 28}, } -- dx quando o player ENTRAR no veiculo function onVeh() local x1, y1, z1 = interpolate(0, posSubir[1][2], 0, 0, posDescer[1][2], 0, inicio2, 1000, "Linear") -- animação retangulo 1 local x2, y2, z2 = interpolate(0, posSubir[2][2], 0, 0, posDescer[2][2], 0, inicio2, 1000, "Linear") -- animação retangulo 2 local x3, y3, z3 = interpolate(0, posSubir[3][2], 0, 0, posDescer[3][2], 0, inicio2, 1000, "Linear") -- animação retangulo 3 dxDrawRectangle(posSubir[1][1], y1, posSubir[1][3], posSubir[1][4], tocolor(255, 255, 255, 255), false) -- retangulo 1 dxDrawRectangle(posSubir[2][1], y2, posSubir[2][3], posSubir[2][4], tocolor(255, 255, 255, 255), false) -- retangulo 2 dxDrawRectangle(posSubir[3][1], y3, posSubir[3][3], posSubir[3][4], tocolor(255, 255, 255, 255), false) -- retangulo 3 end -- dx quando o player SAIR no veiculo function onFoot() if inicio then -- (anti-bug) verifica se a váriavel inicio existe, se ela existir então: local x1, y1, z1 = interpolate(0, posDescer[1][2], 0, 0, posSubir[1][2], 0, inicio, 1000, "Linear") -- animação retangulo 1 local x2, y2, z2 = interpolate(0, posDescer[2][2], 0, 0, posSubir[2][2], 0, inicio, 1000, "Linear") -- animação retangulo 2 local x3, y3, z3 = interpolate(0, posDescer[3][2], 0, 0, posSubir[3][2], 0, inicio, 1000, "Linear") -- animação retangulo 3 dxDrawRectangle(posDescer[1][1], y1, posDescer[1][3], posDescer[1][4], tocolor(255, 255, 255, 255), false) -- retangulo 1 dxDrawRectangle(posDescer[2][1], y2, posDescer[2][3], posDescer[2][4], tocolor(255, 255, 255, 255), false) -- retangulo 2 dxDrawRectangle(posDescer[3][1], y3, posDescer[3][3], posDescer[3][4], tocolor(255, 255, 255, 255), false) -- retangulo 3 else -- se a váriavel não existir então: dxDrawRectangle(218, 609, 168, 28, tocolor(255, 255, 255, 255), false) -- retangulo sem animação 1 dxDrawRectangle(218, 647, 168, 28, tocolor(255, 255, 255, 255), false) -- retangulo sem animação 2 dxDrawRectangle(218, 685, 168, 28, tocolor(255, 255, 255, 255), false) -- retangulo sem animação 3 end end addEventHandler("onClientRender", root, onFoot) -- evento onde o player entra no veículo function onVehEnter() inicio2 = getTickCount() -- salva o tempo addEventHandler("onClientRender", root, onVeh) -- adicionar o dx de entrar if isEventHandlerAdded( 'onClientRender', root, onFoot) then -- se o dx de sair existir então: removeEventHandler('onClientRender', root, onFoot) -- remove / destroi ele end end addEventHandler ("onClientVehicleEnter", root, onVehEnter) -- evento onde o player sai do veículo function onVehExit() inicio = getTickCount() -- salva o tempo addEventHandler("onClientRender", root, onFoot) -- adicionar o dx de sair if isEventHandlerAdded( 'onClientRender', root, onVeh) then -- se o dx de entrar existir então: removeEventHandler('onClientRender', root, onVeh) -- remove / destroi ele end end addEventHandler ("onClientVehicleExit", root, onVehExit) --------------------------------------------------------- funções uteis ------------------------------------------------------------------- -- interpolate posX posY posZ posX1 posY1 posX1 tick tempo tipo de animação function interpolate(varX1, varY1, varZ1, varX2, varY2, varZ2, tick1, timer, animation) local tick2 = getTickCount() local fim = tick1 + timer local tempoDecorrido = tick2 - tick1 local duracao = fim - inicio local progresso = tempoDecorrido / duracao if (progresso > 1) then progresso = 1 end local varX1, varY1, varZ1 = interpolateBetween (varX1, varY1, varZ1, varX2, varY2, varZ2, progresso, animation) return varX1, varY1, varZ1 end -- EventAdded nome evento elemento evento nome da função function isEventHandlerAdded( sEventName, pElementAttachedTo, func ) if type( sEventName ) == 'string' and isElement( pElementAttachedTo ) and type( func ) == 'function' then local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo ) if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then for i, v in ipairs( aAttachedFunctions ) do if v == func then return true end end end end return false end --------------------------------------------------------- funções uteis -------------------------------------------------------------------0 points
