Need For Speed :: San Andreas

Full Version: Add antilag (PING)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
If we had a way to improve fps on server without breaking gameplay aspects, believe me it would be added right away.
Just
s.lua
function kickPing() -- Creates a function called kickPing
for i, player in ipairs(getElementsByType("player")) do -- Loop every player
if (getPlayerPing(player) >= 500) then -- If their ping is over 500
kickPlayer(player, "Ping over 500!") -- Kick them
end
end
end
setTimer(kickPing, 5000, 0) -- Every 5 seconds, the kickPing function is called.
c.lua
function checkPing()
local ping = getPlayerPing(getLocalPlayer()) -- get the ping from the source element (the player who joined)
if (ping > 100) then -- if it's higher than 100...
outputChatBox("Your ping is pretty high! Please try to lower it if possible.") -- output a message to the player
end
end
addCommandHandler("ping", checkPing)

//Source:https://wiki.multitheftauto.com/wiki/GetPlayerPing
We don't have any reason to kick players with high ping, high ping doesn't matter with this gameplay at all. He is talking about fps drops as lags.
And

s.lua
function getCurrentFPS()
for i, player in ipairs(getElementsByType("player")) do
if (getCurrentFPS(player) <= 30) then
kickPlayer(player,"Your FPS is too low!")
end
end
end
setTimer(getCurrentFPS,5000, 0)

I DONT KNOW IS IT WORKS!!!
Allerek, those things are useless as fuck for us. :V
(05-09-2017, 16:19)Quindo Wrote: [ -> ]Allerek, those things are useless as fuck for us. :V

Maybe... but i saw a lot of times a 'teleporting manana'... bartek should add it, it's very easy...
i looked for some my old scripts and i got this: (I think i was edited it but i'm not 100% sure).
http://www118.zippyshare.com/v/jltmvUBj/file.html
----------------------------------------------------------------
Yeah, i got it by name:
https://community.mtasa.com/index.php?p=...ls&id=7578
It shouldn't be added, it's problematic for people from countries far from Europe for example. The teleporting cars aren't any problem on server. Time in race is confirmed with server, it's not some dayz server where you have to shoot others, etc. Players can enjoy server even with high ping/low fps without breaking the gameplay for others.
Welp, i tried to add to gta3.img some files that could remove some usseles shit (tress), but it didnt worked
Does this guy really understand how internet connections works?
I think that auto kick players after 30 mins or 1 hour afk will improve server performance, and reduce lags and freezes (mostly on Doherty). Ale it should not be hard to make.
Pages: 1 2 3