facebook

Welcome guest! You are not logged in on forum, so you may not have access to some features!
To solve this problem
log in or register new account.
>> NFS:SA Booster <<

Add antilag (PING)

Napisany przez SkillZ, 03-09-2017, 14:35
Add antilag (PING)

Offline Allerek

#12
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
Now he don't talk too much, talk too much
He's probably given up, given up
I think he's had enough, had enough
Cause he ran out of luck, out of luck

Reply


Messages In This Thread
Add antilag (PING) - by SkillZ - 03-09-2017, 14:35
RE: Add antilag - by Sardyna153 - 03-09-2017, 15:29
RE: Add antilag - by MechaNoxia - 03-09-2017, 15:39
RE: Add antilag - by SkillZ - 03-09-2017, 15:51
RE: Add antilag - by bartekPL - 03-09-2017, 20:41
RE: Add antilag - by DemK - 04-09-2017, 05:17
RE: Add antilag - by Paiint - 04-09-2017, 07:54
RE: Add antilag - by DemK - 04-09-2017, 16:39
RE: Add antilag - by M1NISH - 04-09-2017, 22:15
RE: Add antilag - by BShen-V12 - 05-09-2017, 11:02
RE: Add antilag - by Quindo - 05-09-2017, 16:03
RE: Add antilag - by Allerek - 05-09-2017, 16:10
RE: Add antilag - by Quindo - 05-09-2017, 16:13
RE: Add antilag - by Allerek - 05-09-2017, 16:13
RE: Add antilag - by Quindo - 05-09-2017, 16:19
RE: Add antilag - by Allerek - 05-09-2017, 16:21
RE: Add antilag (PING) - by Quindo - 05-09-2017, 16:38
RE: Add antilag (PING) - by Sardyna153 - 05-09-2017, 16:53
RE: Add antilag (PING) - by MisterJohnson - 04-10-2017, 19:31
RE: Add antilag (PING) - by Akamataa - 05-10-2017, 07:31
RE: Add antilag (PING) - by susis - 05-10-2017, 10:09
RE: Add antilag (PING) - by whiteseed - 05-10-2017, 12:58
RE: Add antilag (PING) - by HanzoITS - 05-10-2017, 18:42
RE: Add antilag (PING) - by Akamataa - 05-10-2017, 18:46

Forum Jump:

Users browsing this thread:
2 Guest(s)