Jump to content

MIKI785

Members
  • Posts

    1,131
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by MIKI785

  1. As far as I understand from reading the wiki, it creates a GUI element. This means that you are to treat it as any other GUI element, not like dx functions. Basically, there's no need to render it yourself using onClientRender -> the resource does that for you. So, what your code does is that it's creating a new GUI element on every render, that's why you're not able to destroy it. You're only storing the latest instance of that GUI element inside of the blur variable.
  2. How to make a topic in this section:
  3. Is it server or client? If it's on the server, there is no need to declare the files in meta.xml for it to work. However, the resource that does the loading needs access to the general.ModifyOtherObjects permission to be able to read files located in other resources.
  4. There is no 'local player' on the serverside. It makes no sense as who would be 'local' to the server?
  5. No, engineLoadTXD takes either a file path or raw txd data.
  6. Are you just trying to move an object? Wouldn't using moveObject be sufficient?
  7. Can you post the code? onClientPreRender is a client event, it has nothing to do with the server.
  8. What? You should probably read this:
  9. I'm not sure about the nitro, I think it just gives you the nitro upgrade and that's it, the duration is handled by GTA itself. The vehicle change is here: https://github.com/multitheftauto/mtasa-resources/blob/master/[gamemodes]/[race]/race/race_client.Lua#L510 So it should be 1 metre.
  10. Simply use getPedOccupiedVehicle. ddEventHandler( "onClientRender",root, function( ) local px, py, pz, tx, ty, tz, dist px, py, pz = getCameraMatrix( ) for _, v in ipairs( getElementsByType 'player' ) do --if(player ~= localPlayer) then if not getPedOccupiedVehicle(v) then tx, ty, tz = getElementPosition( v ) dist = math.sqrt( ( px - tx ) ^ 2 + ( py - ty ) ^ 2 + ( pz - tz ) ^ 2 ) if dist < 30.0 then if isLineOfSightClear( px, py, pz, tx, ty, tz, true, false, false, true, false, false, false,localPlayer ) then local sx, sy, sz = getPedBonePosition( v, 6 ) local x,y = getScreenFromWorldPosition( sx, sy, sz +1.5 ) if x then -- getScreenFromWorldPosition returns false if the point isn't on screen dxDrawLine3D ( sx, sy, sz+0.2,sx, sy, sz+1.35, tocolor ( 0, 210,0, 90 ), 1.45,false) dxDrawText( "Warrior", x-9.5, y, x, y, tocolor(0,210,0,150), 0.85 + ( 15 - dist ) * 0.035, "default-bold" ) end end end end end end )
  11. See this: https://wiki.multitheftauto.com/wiki/EngineRequestModel
  12. You can find older builds here: https://nightly.multitheftauto.com/ although I don't understand why would you want an older one.
  13. local scale = {(sX/1920) * (sY/1080)}/2 You're making a table here, isn't it supposed to be regular brackets here? local scale = ((sX/1920) * (sY/1080))/2
  14. You can replace any texture with shaders and you are not limited by IDs here. That applies to all elements, not only vehicles. But yeah, models are limited.
  15. Where are team and colour defined?
  16. Maybe it's a compiled script? That sometimes messes up the debug output, but usually it's only the line number that is missing, not the resource name (at least in my case).
  17. 400 is a Bad Request. So maybe the webhook expects JSON? Most APIs do. But even if form data is accepted, you're passing a table as the form data, but it's supposed to be a string. See fetchRemote.
  18. Well, guiSetFont works for any GUI element, it's not limited to labels, so you can try that. But I really don't know if it will work.
  19. I think the problem is that the font size used by the actual input boxes (that you have hidden) is smaller than that of the labels used to show the input. So the text width doesn't match.
  20. Well, first of all, Ubuntu 16 is an old version (albeit still in support), you should use 18.04 if you want a newer LTS version. Now to answer your question, you have two options: The first option is to shutdown the server by using the 'shutdown' command inside the server console. If you used the 'screen' program mentioned in the tutorial you linked, you first have to re-attach the mtasa console by running 'screen -r mtasa'. After the server is off, you can edit the ACL and then start the server again after you're done. If you edit the ACL while the server is running, it will get overwritten upon shutdown. The second option is to use the 'reloadacl' command. Simply edit the ACL while the server is running, re-attach the server console as described above and execute the 'reloadacl' command in the server console. No server restart is needed here.
  21. You can use SFTP and connect to the VPS using the same credentials as you use for SSH (WinSCP is a nice SFTP client you can use). Navigate to wherever your mta server is and put the resources under mods/deahtmatch/resources/, either as a .zip or a regular directory. Then run the 'refresh' command either in the server console or in-game (you have to be logged in with an account with sufficient permissions). The new resources should load and you can then start them using the 'start' command. You can find a list of built-in server commands here: https://wiki.multitheftauto.com/wiki/Server_Commands.
  22. Or you could use a shader to replace the wanted star icons, that would allow you to keep using the built-in functions while displaying a custom icon.
  23. https://wiki.multitheftauto.com/wiki/Resource:Admin
  24. Isn't using these better? toggleVehicleRespawn setVehicleRespawnDelay setVehicleIdleRespawnDelay
×
×
  • Create New...