-
Posts
6,058 -
Joined
-
Last visited
-
Days Won
208
Everything posted by IIYAMA
-
Position synchronization is already handled by the server. Better to try something else.
-
More consistent and at the right timing. Not sure about 'smoother'.
-
The 100ms function is not the issue. The issue is the synchronization with the server. Which means that the syncer has to keep track of what the ped is actually doing. And only send a message to the server and other players when the ped is doing something else.
-
That data rate is a bit too high, especially if you are sending the data separately, that is a multiplier after all. All data merged in to 1 packet/message: triggerServerEvent/triggerClientEvent Do not send data double. If you set the ped to sprinting, do not tell the other players that over and over.
-
Yes A small one, you have to fill in the blanks: --[[...]] Syncer (clientside): triggerServerEvent(--[[...]]) Server: addEvent(--[[...]]) function functionName (ped, action, status) -- get all players except for the one that triggered the the event -- local players = getElementsByType("player") for i=1, #players do if players[i] == client then table.remove(players, i) break end end -- -- triggerClientEvent(players, --[[...]]) end addEventHandler(--[[...]]) Other players (clientside): addEvent(--[[...]]) function functionName (ped, action, status) end addEventHandler(--[[...]])
-
Every function that makes the ped do anything, that also includes the "forward" state. (You are able to do that. Take a closer look at the zombie resource. That is if you want that.)
-
It looks pretty good. I have seen worse. One of the reasons for the stuttering is because some ped interactions are based on each client individuality. At the moment the peds are resynced by the syncer (position, rotation and velocity are being reset), the interactions that are set by the syncer player does not match up with the non syncer players. Interactions like: Animations Initial running speed Jumping etc. That being said, there is always some variation of stuttering involved when streaming element orientations. How to solve this interaction de-sync problem? You might want to consider doing some of the ped interactions serverside. Or the same way as the streamer works: You set an <animation/interaction> for your ped Send a message to serverside. Serverside sends a message to all other clients (excluding yourself). And those clients set the <animation/interaction>.
-
open the file meta.xml Remove the following line: <min_mta_version client="1.5.4" server="1.5.4" /> The script will start, but some of the new features will not work (like increased draw distance for vehicles and peds). You could notice some errors in the console at the following lines, but that should be fine. https://gitlab.com/IIYAMA12/draw-distance/-/blob/master/scripts/main_c.lua#L259 https://gitlab.com/IIYAMA12/draw-distance/-/blob/master/scripts/main_c.lua#L260 https://gitlab.com/IIYAMA12/draw-distance/-/blob/master/scripts/main_c.lua#L267 https://gitlab.com/IIYAMA12/draw-distance/-/blob/master/scripts/main_c.lua#L268
- 27 replies
-
- 1
-
- repository
- draw
-
(and 8 more)
Tagged with:
-
Is that really necessary? All you have to do is start the script. [v1.0.2] The script will start reading the element tree of running resources and mirror the objects with lowLOD elements. That is all there is to it at the very basic.
- 27 replies
-
- repository
- draw
-
(and 8 more)
Tagged with:
-
According to wiki the minimum for peds value is 200. If you can set it to 100, it shouldn't be working, that is if wiki is up to date. Will it hurt the server? That depends on the internet connection of the players. ?
-
You can reduce the ped sync interval from 400 to 200 (mtaserver.conf): https://wiki.multitheftauto.com/wiki/Server_mtaserver.conf#ped_sync_interval (https://wiki.multitheftauto.com/wiki/SetServerConfigSetting) The server has to be stopped first in case of editing the config file.
-
Try this: function gatefuncclose( ) if isMoving then stopObject(parkgate1) stopObject(parkgate2) moveObject ( parkgate1, 2000, 2777.123, 905.84, 10.666, 0, 90, 0) moveObject ( parkgate2, 2000, 2777.127, 920.71, 10.62, 0, -90, 0) setTimer(function() isMoving = false end,2000,1) end end addEventHandler( "onMarkerLeave", parkmarker, gatefuncclose )
-
Then it is a scripting request, moved to resources. The code has been scraped from the following topic:
-
Not sure which option you are referring to (I do not have access to my pc at the moment so I can't check). But the following function contains some of the settings, maybe it is in there: https://wiki.multitheftauto.com/wiki/DxGetStatus
-
local endTime = 0 function drawTime () local timeNow = getTickCount() if timeNow < endTime then local remainingTime = endTime - timeNow dxDrawText("remainingTime:" .. remainingTime, 300, 300) else -- (re)set endTime = timeNow + 60000 end end addEventHandler("onClientRender", root, drawTime) A small example. You have to make the code iterations yourself.
-
Here is your multiplier: Each pc/player is running a copy of this file: function botdamaged ( attacker, weapon, bodypart ) if getElementType ( source ) == "ped" then local bot = getElementData(source, "bot") local settlementguard = getElementData(source, "settlementguard") local boss = getElementData(source, "boss") local zombie = getElementData(source, "zombie") local zombieSpecial = getElementData(source, "zombieSpecial") if boss then --[[ ... ]] This file will check if ANY ped is damaged: addEventHandler ( "onClientPedDamage", root, botdamaged) The event "onClientPedDamage" does not only trigger when <you> damage the ped. It triggers always when a ped is damaged. (If it happens in the game of player, this can differ when the ping is higher/lower) When that happens, each player will do this: triggerServerEvent ("botdamages", source, source, attacker, weapon, bodypart ) And this (serverside): addEventHandler( "botdamages", root, botdamages ) To solve the issue, you have to check if the attacker is <you>. if attacker == localPlayer then end
-
Disable the the GUI element: https://wiki.multitheftauto.com/wiki/GuiSetEnabled
-
My opinion: Then he will fix it and send it again. Or he comes to the forum and ask for help. Being transparent is your only way to get things done in the scripting section.
-
Sounds a bit like the saying: 'My cat ate my homework' To be honest in my opinion I see no reason for you to ask help. Your friend should be the one fixing the resource or be the one asking for help. Not you.
-
With other words you want a packet sniffer. Locked
-
You mean the switching time of the model? Or switching/swapping time of the lowLOD?
-
That function is only available on clientside. See docs: https://wiki.multitheftauto.com/wiki/EngineLoadDFF
-
Oh perfect. In that case, create 2 objects at the same place and link them together: -- non lowLOD obj = createObject( 5164, 2839.0313,-2371,9531,7.29688, 0, 0, 270, false ) -- lowLOD objLOD = createObject( 5164, 2839.0313,-2371,9531,7.29688, 0, 0, 270, true ) setLowLODElement(obj, objLOD) When the non lowLOD variant streams out, the lowLOD variant will kick-in.