Quited Posted May 11, 2013 Share Posted May 11, 2013 I search in community.multitheftauto.com for packet loss kicker , but No result Can someone give me Packet loss second + total kicker ? Packet loss kicker in gamemode (tactics + aspect) But i want it in BaseMode Link to comment
qaisjp Posted May 12, 2013 Share Posted May 12, 2013 You want things? Make things. You can check the differences in ping and kick accordingly. getPlayerPing() kickPlayer() setTimer() -- probably dont even need it Link to comment
Quited Posted May 12, 2013 Author Share Posted May 12, 2013 sorry , this is ping i want Packet loss second + total Link to comment
Quited Posted May 12, 2013 Author Share Posted May 12, 2013 (edited) -- PacketLoss Last second Kicker function packetLossCheck() local loss = getNetworkStats()["packetlossLastSecond"] if (loss > 33) then kickPlayer ( source , High PacketLoss 33) end end setTimer(packetLossCheck, 1000, 0) True or not ؟ And -- PacketLoss Total Kicker function packetLossCheck() local loss = getNetworkStats()["packetlossTotal"] if (loss > 33) then kickPlayer ( source , High PacketLoss 33) end end setTimer(packetLossCheck, 1000 , 0) Edited May 12, 2013 by Guest Link to comment
Castillo Posted May 12, 2013 Share Posted May 12, 2013 'kicked' and 'sourcePlayer' is not defined anywhere, also, you put the reason without the quotes ( to become a string ). Link to comment
Moderators IIYAMA Posted May 12, 2013 Moderators Share Posted May 12, 2013 Jep, + 3 --not very efficient... setTimer(function ()--packetLossCheck for player,i in pairs(getElementsByType("player")) do if getNetworkStats(player)["packetlossTotal"] > 33 then kickPlayer ( player , "High PacketLoss. ") end end end, 1000 , 0) Link to comment
Jesseunit Posted May 12, 2013 Share Posted May 12, 2013 Jep, + 3 --not very efficient... setTimer(function ()--packetLossCheck for player,i in pairs(getElementsByType("player")) do if getNetworkStats(player)["packetlossTotal"] > 33 then kickPlayer ( player , "High PacketLoss. ") end end end, 1000 , 0) ffs... timers? Use getTickCount()... Link to comment
arezu Posted May 13, 2013 Share Posted May 13, 2013 Jep, + 3 --not very efficient... setTimer(function ()--packetLossCheck for player,i in pairs(getElementsByType("player")) do if getNetworkStats(player)["packetlossTotal"] > 33 then kickPlayer ( player , "High PacketLoss. ") end end end, 1000 , 0) ffs... timers? Use getTickCount()... It's server sided, how are you expecting him to use getTickCount() to check if one second passed without having something that runs constantly? and there is no problem with timers when there is only one timer. Also, 'i' and 'player' should which places in the loop. Link to comment
Moderators IIYAMA Posted May 13, 2013 Moderators Share Posted May 13, 2013 ffs... timers?Use getTickCount()... It is just 1 timer at server side. I use(normally) tickcount but tickcount does not loop,,,.,.,.,. Loop on client render can also sometimes be laggy, now you use also GPU power to loop.(+1 event), of course it is the best solution at client side. @arezu ah yes, my bad. I wasn't really ..... and.. Link to comment
myonlake Posted May 13, 2013 Share Posted May 13, 2013 It wouldn't matter if you had 100 timers running at the same time if the server is just good enough to handle all that. One timer is nothing, not even if it had 50ms as it's duration and looped to infinite. Link to comment
Jesseunit Posted May 14, 2013 Share Posted May 14, 2013 Jep, + 3 --not very efficient... setTimer(function ()--packetLossCheck for player,i in pairs(getElementsByType("player")) do if getNetworkStats(player)["packetlossTotal"] > 33 then kickPlayer ( player , "High PacketLoss. ") end end end, 1000 , 0) ffs... timers? Use getTickCount()... It's server sided, how are you expecting him to use getTickCount() to check if one second passed without having something that runs constantly? and there is no problem with timers when there is only one timer. Also, 'i' and 'player' should which places in the loop. getTickCount() is still way better. Oh and by the way, both functions are client-sided too. Except for kickPlayer. ffs... timers?Use getTickCount()... It is just 1 timer at server side. I use(normally) tickcount but tickcount does not loop,,,.,.,.,. Loop on client render can also sometimes be laggy, now you use also GPU power to loop.(+1 event), of course it is the best solution at client side. @arezu ah yes, my bad. I wasn't really ..... and.. onClientRender laggy? I'd upgrade your PC if I were you, because San Andreas is built in 2004 lol. Also, what would you rather have... A lagging server or a lagging PC. Link to comment
Moderators IIYAMA Posted May 14, 2013 Moderators Share Posted May 14, 2013 Well maybe you should mind the differences. -- why make a loop at clientside? You can't check other players their packetlossTotal at client side. for player, i in pairs --etc. -- server getNetworkStats(player) -- or player is nill for the server network. -- client getNetworkStats() onClientRender laggy?I'd upgrade your PC if I were you, because San Andreas is built in 2004 lol. Also, what would you rather have... A lagging server or a lagging PC. - HD 7970 - CPU Type QuadCore Intel Core i7, 3700 MHz (37 x 100) (hyperthreading) - Module Name Corsair CML32GX3M4A1600C10 8 GB X 4 I am not laggy at all. Gta san is for that system a pathetic game. I am only play it, because I can modify it. But some people are playing at very weak pc's(especially laptops) . A little bit script performance would be welcome. I already told you that I use getTickCount()! I even use table(tickcount) timers to manage respawn from the players. Link to comment
TAPL Posted December 22, 2013 Share Posted December 22, 2013 not working Also, 'i' and 'player' should which places in the loop. Link to comment
Quited Posted December 22, 2013 Author Share Posted December 22, 2013 i don't understand Link to comment
TAPL Posted December 22, 2013 Share Posted December 22, 2013 i don't understand You see this? for player,i in pairs(getElementsByType("player")) do It should be: for i,player in pairs(getElementsByType("player")) do Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now