Need For Speed :: San Andreas
Add antilag (PING) - Printable Version

+- Need For Speed :: San Andreas (https://www.nfssa.com)
+-- Forum: English Forums (https://www.nfssa.com/forumdisplay.php?fid=6)
+--- Forum: New Suggestions (https://www.nfssa.com/forumdisplay.php?fid=11)
+--- Thread: Add antilag (PING) (/showthread.php?tid=7621)

Pages: 1 2 3


RE: Add antilag - Quindo - 05-09-2017

If we had a way to improve fps on server without breaking gameplay aspects, believe me it would be added right away.


RE: Add antilag - Allerek - 05-09-2017

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


RE: Add antilag - Quindo - 05-09-2017

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.


RE: Add antilag - Allerek - 05-09-2017

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!!!


RE: Add antilag - Quindo - 05-09-2017

Allerek, those things are useless as fuck for us. :V


RE: Add antilag - Allerek - 05-09-2017

(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=resources&s=details&id=7578


RE: Add antilag (PING) - Quindo - 05-09-2017

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.


RE: Add antilag (PING) - Sardyna153 - 05-09-2017

Welp, i tried to add to gta3.img some files that could remove some usseles shit (tress), but it didnt worked


RE: Add antilag (PING) - MisterJohnson - 04-10-2017

Does this guy really understand how internet connections works?


RE: Add antilag (PING) - Akamataa - 05-10-2017

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.