Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Credits: Michael*/
- #include <a_samp>
- #include <foreach>
- #include <YSI\y_timers>
- #define Sec(%0) (( %0 ) * ( 1000 ))
- public OnFilterScriptInit() { return 1; }
- public OnFilterScriptExit() { return 1; }
- stock PlayerName(playerid)
- {
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
- return pName;
- }
- task PingProvjera[Sec(3)]()
- {
- foreach (Player, i)
- {
- new string[128],ping,virtual;
- ping = GetPlayerPing(i);
- virtual = GetPlayerVirtualWorld(i);
- if(ping == 65535) return 1;//izbjegavanje pinga na connectu(ne dirajte)
- if(ping > 250)//izbacuje text ako prelazi napisan ping(promjenite 250 po volji ako zelite)
- {
- //Ovdje dodati ako zelite po svojoj zelji nesto tipa ako je igrac u waru na eventu itd..
- format(string,sizeof(string),"[PingAC] Igrac %s[ID:%d] Ima prevelik ping! [%d]",PlayerName(i),i,ping);
- SendClientMessageToAll(-1,string);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement