Jump to content

Zango

Discord Moderators
  • Posts

    674
  • Joined

  • Last visited

  • Days Won

    6

Zango last won the day on September 18 2021

Zango had the most liked content!

4 Followers

About Zango

  • Birthday 19/09/1993

Member Title

  • Discord Moderator

Details

  • Location
    Denmark

Recent Profile Visitors

2,588 profile views

Zango's Achievements

Crime Partner

Crime Partner (30/54)

44

Reputation

  1. You can download the 1.5.9 release from moddb here. It should auto update to latest version when you launch it.
  2. Vehicles dont have armor, but you can make them damageproof with setVehicleDamageProof.
  3. Is UDP port 22564 open? Try pasting your IP in https://nightly.mtasa.com/ports/ to see if all 3 ports are open.
  4. Have a look at the createPickup function. The wiki page has the ID for the house and info icons. Check out the server and client events to handle the pickups.
  5. Make sure the script is set to type="client" in meta.xml Like this <script src="client.lua" type="client" />
  6. That's interesting. I would have guessed it was caused by MTA. There's a bug report about this issue here: https://github.com/multitheftauto/mtasa-blue/issues/1326 It's an old bug and even though it's only visual it's really annoying and happens on a lot of servers (also without peds) If anyone has information about it feel free to add!
  7. For reference, following the wiki explanation on dxSetBlendMode should fix the quality ("modulate_add" when drawing render target, "add" when drawing to screen) Between these two, I would pick CrystalMV's solution, using a trianglefan for this is neat.
  8. A solution is to use render targets and rotating half circles. It might not be less resource intensive than dxDrawCircle though. I hope the illustration makes sense You need 3 rendertargets (RT1, RT2, RT3) which are textures you can draw onto, instead of the screen. Create these once: local W, H = 100, 100 local RT1 = dxCreateRenderTarget(W, H, true) local RT2 = dxCreateRenderTarget(W/2, H, true) local RT3 = dxCreateRenderTarget(W/2, H, true) The main texture which you will eventually draw to the screen, is RT1. RT2 and RT3 will be drawn onto RT1. Split your circle image into two images of a semicircle. Both images need to be full size so they rotate around the center. Do the following "onClientRender" -- Set and clear RT2 dxSetRenderTarget(RT2, true) local RT2_rot = 0 dxDrawImage(0, 0, W, H, "semicircle_left.png", RT2_rot) -- Set and clear RT3 dxSetRenderTarget(RT3, true) local RT3_rot = 0 dxDrawImage(-W/2, 0, W, H, "semicircle_right.png", RT3_rot) -- Set and clear RT1 dxSetRenderTarget(RT1, true) -- Draw rotated circles onto RT1 dxDrawImage(0, 0, W/2, H, RT2) dxDrawImage(W/2, 0, W/2, H, RT3) -- Draw to screen dxSetRenderTarget() dxDrawImage(100, 100, W, H, RT1) Play around with RT2_rot and RT3_rot to make the loading bar work as you want.
  9. The image is invalid, can you upload it somewhere else like imgur? You can also paste a snippet from server.log related to the crash
  10. Hello You need to go through all players, with ipairs loop and getElementsByType, when the resource stops Then you can check for account and save oldTeam function onResstop() -- Loop all players for k,player in ipairs(getElementsByType("player")) do local playeraccount = getPlayerAccount(player) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then -- if the player is logged in local serial = getPlayerSerial(player) if oldTeam[serial] and getTeamFromName(oldTeam[serial]) then setAccountData ( playeraccount, "oldTeam", getTeamFromName(oldTeam[serial]) ) -- save it in his account end end end end addEventHandler("onResourceStop", resourceRoot, onResstop) And you should bind "onResourceStop" to the resourceRoot, if you bind it to the root element, it will trigger when any resource stops.
  11. srslyyyy provided some great tips. One thing I'd add is that you can compare the squared value, saving a sqrt operation, like this local maxRenderDistance = 7^2 if (x-px)^2 + (y-py)^2 + (z-pz)^2 < maxRenderDistance then end
  12. "getWeaponAmmoType" is not an MTA function but a custom one. I'm guessing you found this script somewhere, you need the rest of it to make it work
  13. getCameraMatrix only works serverside if the camera is fixed with setCameraMatrix, it doesn't return GTA camera values. Instead of element data, I recommend using triggerServerEvent to send the values to server, and triggerClientEvent to send to relevant (nearby) players.
  14. You need to sync the camera matrix between the player and the other players manually triggerServerEvent -- Send the camera matrix from the player to the server triggerClientEvent -- Send the camera matrix to the other players from the server
  15. Yeah ok, so there is a property for it, but I can't get it working either. There's a chance it was added in a later version (or maybe it never worked). MTA uses CEGUI 0.4.0, released 16 years ago. I searched through the changelog, but there was nothing about it though.
×
×
  • Create New...