Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Riječ je o Ping Limitu da ispiše gore iznad para
- /*Ovo je po meni unikatan sistem nema ga bas na serverima
- */
- new bool: USE_ANTI_HIGHPING = false;
- // Maksimalan ping prije kicka igraca
- #define MAX_PING 650
- new PingTimer[MAX_PLAYERS];
- // PacketLoos kao na Counter Strike 1.6 hhhh Ajstajn war einer!
- new PlayerText: FPSPingPacket[MAX_PLAYERS]; // Pokazuje FPS Loost
- // TextDraw Paketici <3!
- LoadPlayerTextDraws(playerid)
- {
- FPSPingPacket[playerid] = CreatePlayerTextDraw(playerid,500.5, 1.4, "_");
- PlayerTextDrawBackgroundColor(playerid, FPSPingPacket[playerid], 0x00000044);
- PlayerTextDrawFont(playerid, FPSPingPacket[playerid], 1);
- PlayerTextDrawLetterSize(playerid, FPSPingPacket[playerid], 0.190000, 0.93000);
- PlayerTextDrawColor(playerid, FPSPingPacket[playerid], 16711935);
- PlayerTextDrawSetOutline(playerid, FPSPingPacket[playerid], 1);
- PlayerTextDrawSetProportional(playerid, FPSPingPacket[playerid], 1);
- PlayerTextDrawSetShadow(playerid, FPSPingPacket[playerid],0);
- PlayerTextDrawAlignment(playerid, FPSPingPacket[playerid], 1);
- }
- KillTimer(PingTimer[playerid]); //ovo dodane ispod onPlayerDisconect
- PingTimer[playerid] = SetTimerEx("CheckPing",1000,1,"i",playerid); // ovo dodane ispoud Public OnPlayerSpawn
- forward CheckPing(playerid);
- public CheckPing(playerid)
- {
- if(USE_ANTI_HIGHPING == true)
- {
- SendClientMessage(playerid, COLOR_RED, "{539600}[ANTI-CHEAT]{74D400} Kikovani ste s servera radi pinga by Ajstajn. (above 600)");
- if(GetPlayerPing(playerid) > MAX_PING) Kick(playerid);
- }
- }
- //OVO ZNATE GDJE SE DODANE NISTE BOTOVI VALJDA >.<
- stock GetAntiHighPingStatus()
- {
- new status[32];
- if(USE_ANTI_HIGHPING == true) { status = ""COL_NICEGREEN"ENABLED"COL_WHITE""; }
- else { status = ""COL_NICERED"DISABLED"COL_WHITE""; }
- return status;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement