Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stock Float:GetPlayerPacketLoss(playerid) {
- new stats[401], stringstats[70];
- GetPlayerNetworkStats(playerid, stats, sizeof(stats));
- new len = strfind(stats, "Packetloss: ");
- new Float:packetloss = 0.0;
- if(len != -1) {
- strmid(stringstats, stats, len, strlen(stats));
- new len2 = strfind(stringstats, "%");
- if(len != -1) {
- strdel(stats, 0, strlen(stats));
- strmid(stats, stringstats, len2-3, len2);
- packetloss = floatstr(stats);
- }
- }
- return packetloss;
- }
- stock GetPlayerFPS(playerid) {
- new drunk2 = GetPlayerDrunkLevel(playerid);
- if(drunk2 < 100){
- SetPlayerDrunkLevel(playerid,2000);
- }else{
- if(Player[playerid][DLlast] != drunk2){
- new fps = Player[playerid][DLlast] - drunk2;
- if((fps > 0) && (fps < 200))
- Player[playerid][FPS] = fps;
- Player[playerid][DLlast] = drunk2;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment