Lilibeth
Gold Elite
- Joined
- Jul 4, 2021
- Messages
- 186
- Reaction score
- 50,217
- Points
- 316
Hello VAG Forum Family
As you can see in the title, I will explain in detail the answer to the question "How to make FPS Optimization and Server Side optimization"
As you can see in the title, I will explain in detail the answer to the question "How to make FPS Optimization and Server Side optimization"
Client
Most native loops work. If you ask what the word native is.
Native: They are the codes that enable the creation of events or events that you see used on GTA Single player or GTA Online.
To give an example of this;
DrawMarker (create marker)
SetEntityCoords (teleport player)
CreateBlipForCoords (create blip)
(there are too many examples...)
Let's optimize the examples based on Draw Marker. Draw Marker is a code used in a loop. The code block of the loop;
Code:
CreateThread(function()
while true do
Citizen.Wait(10)
--kod veya kod bloğu
end)
What is Citizen.Wait(milliseconds) : It is how many milliseconds the loop will repeat.
Let's say there is DrawMarker in the code or code block section, let's say Citizen.Wait(milliseconds) value is 10.
According to this information, the marker is drawn every 10 seconds. For example, let's make its MS value 50 instead of 10. The marker will flash, but there will be a very serious decrease in the resmon values. If we make 100, our marker will probably disappear and this will have a greater effect on FPS values.
You can apply this to the ms value of all *NON-SENSITIVE* code or code blocks in the loop, not just DrawMarker.
ServerSide
TriggerServerEvent... So a code or code block that runs on a serverside & a triggered serverside over the client.
Among them, as I explained on the client, it may be looped. This puts a lot of pressure on the server. You will notice the difference when you increase the ms value without exaggeration.