Jump to content

Search the Community

Showing results for tags 'sync'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Member Title


Gang


Location


Occupation


Interests

Found 6 results

  1. Hello, please tell me how to organize the synchronization of the movement of an object between two players in 3D, like this L
  2. This is the code: requestBrowserDomains({"www.convertmp3.io"}) local browser = createBrowser( 0, 0, false ) local currentSound = {} function start(_,link) fetch(link) end addCommandHandler("play",start) function fetch(url) if (url) then fetchRemote("http://www.convertmp3.io/fetch/?format=JSON&video="..url, callback) end end function callback(data, error) if (error ~= 0) then return outputChatBox(error) end if (data == "ERROR") then return outputChatBox("data error") end local data = fromJSON("["..data.."]") if (data) then outputChatBox("Title: "..data.title) outputChatBox("Length: "..data.length) outputChatBox("Link: "..data.link) loadBrowserURL( browser, data.link ) end end addEventHandler( "onClientBrowserNavigate", browser, function( link ) if not link:find("www.convertmp3.io") then local vehicle = getPedOccupiedVehicle ( localPlayer ) local x, y, z = getElementPosition(vehicle) currentSound[localPlayer] = playSound3D( link, x, y, z ) attachElements(currentSound[localPlayer],vehicle) setSoundMaxDistance(currentSound[localPlayer],30) setSoundVolume(currentSound[localPlayer],50) end end ) How to synchronise to all players?
  3. Всем привет, в процессе разработки игрового мода, не могу решить пару вопросов. 1. При присоеденении прицепа к грузовику, у того, кто цепляет - все в порядке, другие же видят как голова едет гораздо дальше чем прицеп, т.е. между ними промежуток (иногда огромный). 2. При езде на велосипеде, зависают или изменяются произвольно анимации езды или положения игрока на велосипеде (например игрок едет на нем лежа или вовсе стоит на велосипеде). 3. Как во время разработки кастомной системы бана/тюрьмы/блокировки чата, расчитывать временной интервал например бан на 30 дней, значит что в MySQL добавляется запись о том, что для определенного игрока срок бана заканчивается через ИМЕННО 30 дней, а по тюрьме, например через 40 минут? Временные интервалы как реализовать в MySQL понятно, не понятно как полученную информацию на сервере (в формате ngnix (time)) расчитывать интервалом как например в той же функции mySQL.
  4. Hi! This script makes possible to play a 3d sound (looped sound) by pressing the CTRL button, and stop the sound when the CTRL button is "up". Well, it has a really annoying sync bug. As you can see, there is a setElementData function in my client side script, that stores the sound element. When the player stops pressing the CTRL button then the script stops the sound with the stored element. Well the problem is that when another player press the CTRL button then the setElementData will be overwritted, and will cause really strange, annoying bugs. So the bug is: when player1 press CTRL, and after that player2 also press CTRL then the sound for player1 will not stop anymore, because player2 owerwrited the setElementData, when he pressed CTRL. Well, its not easy to explain, so i hope you understood me. Is the any way to avoid this owerwriting? or do i have to do this another way, without setElementData? Thanks in advance. client --start sound function start_fire_sound() if isPedInVehicle (localPlayer) then local veh = getPedOccupiedVehicle(localPlayer) if getElementModel(veh) == 476 then triggerServerEvent ( "start_fire_sound", resourceRoot, veh ) end end end bindKey("lctrl", "down", start_fire_sound) function start_fire_c(veh) local x,y,z = getElementPosition (veh) local sound_fire = playSound3D("files/fire.wav",x,y,z, true) setSoundMaxDistance( sound_fire, 500 ) setSoundVolume(sound_fire, 1) attachElements ( sound_fire, veh, 0,0,0 ) setElementData(localPlayer, "sound_fire", sound_fire) end addEvent( "start_fire_sound", true ) addEventHandler( "start_fire_sound", localPlayer, start_fire_c ) --stop sound function stop_fire_sound() if isPedInVehicle (localPlayer) then local veh = getPedOccupiedVehicle(localPlayer) if getElementModel(veh) == 476 then triggerServerEvent ( "stop_fire_sound", resourceRoot, veh ) end end end bindKey("lctrl", "up", stop_fire_sound) function stop_fire_sound_c(veh) local x,y,z = getElementPosition (veh) local sound_fire_lastshot = playSound3D("files/fire_lastshot.wav",x,y,z, false) setSoundMaxDistance( sound_fire_lastshot, 500 ) setSoundVolume(sound_fire_lastshot, 1) attachElements ( sound_fire_lastshot, veh, 0,0,0 ) local sound_fire = getElementData(localPlayer, "sound_fire") stopSound(sound_fire) end addEvent( "stop_fire_sound", true ) addEventHandler( "stop_fire_sound", localPlayer, stop_fire_sound_c ) server function start_fire_sound(veh) triggerClientEvent ("start_fire_sound", getRootElement(), veh) end addEvent( "start_fire_sound", true ) addEventHandler( "start_fire_sound", getRootElement(), start_fire_sound ) function stop_fire_sound(veh) triggerClientEvent ("stop_fire_sound", getRootElement(), veh) end addEvent( "stop_fire_sound", true ) addEventHandler( "stop_fire_sound", getRootElement(), stop_fire_sound )
  5. Hey, I need to get the positions of vehicles that are occupied by players clientside. But as soon as they are far away, those positions are not accurate anymore. Actually, they just don't change for about 1500 ms before they are updated again. I changed the "lightweight_sync_interval" in the server config file to 200 ms, but that didn't help. So, is there a solution to get the actual values, or does only the server have them at any time? Bonsai
  6. NegativeIQ

    Ped sync

    Hey folks, just a quick questions about peds (not players). If ped's sync interval is 400ms (default) is there anything else sent every 400ms except https://github.com/multitheftauto/mtasa-blue/blob/master/Client/mods/deathmatch/logic/CPedSync.cpp ? Also is every info always sent (like pos,velocity,hp,armor...) or just the ones that have changed?
×
×
  • Create New...