0% found this document useful (0 votes)
10 views7 pages

V 6 RMfisc

Uploaded by

hakernayan12
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views7 pages

V 6 RMfisc

Uploaded by

hakernayan12
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 7

/*

CREDITS TO: Metroplex


*/
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>

#if defined FILTERSCRIPT

new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3;
new Text:Textdraw4;
new Text:Textdraw5;
new Text:Textdraw6;
new timer[MAX_PLAYERS];
new pingmonitor;
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("Ping Monitor by Metroplex has been loaded!");
print("--------------------------------------\n");
Textdraw0 = TextDrawCreate(621.000000, 350.000000, "_");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 0.570000, 6.000000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 0);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetShadow(Textdraw0, 1);
TextDrawUseBox(Textdraw0, 1);
TextDrawBoxColor(Textdraw0, 100);
TextDrawTextSize(Textdraw0, 480.000000, 0.000000);
TextDrawSetSelectable(Textdraw0, 0);

Textdraw1 = TextDrawCreate(506.000000, 350.000000, "ping monitor");


TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 2);
TextDrawLetterSize(Textdraw1, 0.300000, 1.000000);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 1);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetSelectable(Textdraw1, 0);

Textdraw2 = TextDrawCreate(513.000000, 363.000000, "LAGGING");


TextDrawBackgroundColor(Textdraw2, 255);
TextDrawFont(Textdraw2, 2);
TextDrawLetterSize(Textdraw2, 0.409999, 1.699999);
TextDrawColor(Textdraw2, -16776961);
TextDrawSetOutline(Textdraw2, 1);
TextDrawSetProportional(Textdraw2, 1);
TextDrawSetSelectable(Textdraw2, 0);

Textdraw3 = TextDrawCreate(516.000000, 363.000000, "STABLE");


TextDrawBackgroundColor(Textdraw3, 255);
TextDrawFont(Textdraw3, 2);
TextDrawLetterSize(Textdraw3, 0.409999, 1.699999);
TextDrawColor(Textdraw3, 16711935);
TextDrawSetOutline(Textdraw3, 1);
TextDrawSetProportional(Textdraw3, 1);
TextDrawSetSelectable(Textdraw3, 0);

Textdraw4 = TextDrawCreate(514.000000, 382.000000, "please close");


TextDrawBackgroundColor(Textdraw4, 255);
TextDrawFont(Textdraw4, 2);
TextDrawLetterSize(Textdraw4, 0.229999, 0.899999);
TextDrawColor(Textdraw4, -1);
TextDrawSetOutline(Textdraw4, 1);
TextDrawSetProportional(Textdraw4, 1);
TextDrawSetSelectable(Textdraw4, 0);

Textdraw5 = TextDrawCreate(516.000000, 389.000000, "unnecessary");


TextDrawBackgroundColor(Textdraw5, 255);
TextDrawFont(Textdraw5, 2);
TextDrawLetterSize(Textdraw5, 0.229999, 0.899999);
TextDrawColor(Textdraw5, -1);
TextDrawSetOutline(Textdraw5, 1);
TextDrawSetProportional(Textdraw5, 1);
TextDrawSetSelectable(Textdraw5, 0);

Textdraw6 = TextDrawCreate(488.000000, 396.000000, "apps in the background");


TextDrawBackgroundColor(Textdraw6, 255);
TextDrawFont(Textdraw6, 2);
TextDrawLetterSize(Textdraw6, 0.229999, 0.899999);
TextDrawColor(Textdraw6, -1);
TextDrawSetOutline(Textdraw6, 1);
TextDrawSetProportional(Textdraw6, 1);
TextDrawSetSelectable(Textdraw6, 0);
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

#else

main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
return 1;
}

public OnGameModeExit()
{
return 1;
}

public OnPlayerRequestClass(playerid, classid)


{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}

public OnPlayerConnect(playerid)
{
return 1;
}

public OnPlayerDisconnect(playerid, reason)


{
TextDrawHideForPlayer(playerid, Textdraw0);
TextDrawHideForPlayer(playerid, Textdraw1);
TextDrawHideForPlayer(playerid, Textdraw2);
TextDrawHideForPlayer(playerid, Textdraw3);
TextDrawHideForPlayer(playerid, Textdraw4);
TextDrawHideForPlayer(playerid, Textdraw5);
TextDrawHideForPlayer(playerid, Textdraw6);
KillTimer(timer[playerid]);
return 1;
}

public OnPlayerSpawn(playerid)
{
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)


{
return 1;
}

public OnVehicleSpawn(vehicleid)
{
return 1;
}

public OnVehicleDeath(vehicleid, killerid)


{
return 1;
}

public OnPlayerText(playerid, text[])


{
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])


{
if (strcmp("/debugpingmonitor", cmdtext, true, 10) == 0)
{
OnPlayerConnect(playerid);
return 1;
}
return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)


{
return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)


{
return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)


{
return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}

public OnRconCommand(cmd[])
{
return 1;
}

public OnPlayerRequestSpawn(playerid)
{
return 1;
}

public OnObjectMoved(objectid)
{
return 1;
}

public OnPlayerObjectMoved(playerid, objectid)


{
return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)


{
return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)


{
return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)


{
return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)


{
return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)


{
return 1;
}

public OnPlayerExitedMenu(playerid)
{
return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)


{
return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)


{
return 1;
}

public OnRconLoginAttempt(ip[], password[], success)


{
return 1;
}

public OnPlayerUpdate(playerid)
{
return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)


{
return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)


{
return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)


{
return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)


{
return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])


{
return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)


{
return 1;
}

forward CheckPing(playerid);
public CheckPing(playerid)
{
new ping = GetPlayerPing(playerid);
if(ping == 65535) return 1;
if(ping >= 600)
{
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw4);
TextDrawShowForPlayer(playerid, Textdraw5);
TextDrawShowForPlayer(playerid, Textdraw6);
TextDrawHideForPlayer(playerid, Textdraw3);
}
else
{
TextDrawHideForPlayer(playerid, Textdraw2);
TextDrawHideForPlayer(playerid, Textdraw4);
TextDrawHideForPlayer(playerid, Textdraw5);
TextDrawHideForPlayer(playerid, Textdraw6);
TextDrawShowForPlayer(playerid, Textdraw3);
}
return 1;
}

CMD:pingmonitor(playerid, params[])
{
if(pingmonitor == 0)
{
TextDrawHideForPlayer(playerid, Textdraw0);
TextDrawHideForPlayer(playerid, Textdraw1);
TextDrawHideForPlayer(playerid, Textdraw2);
TextDrawHideForPlayer(playerid, Textdraw3);
TextDrawHideForPlayer(playerid, Textdraw4);
TextDrawHideForPlayer(playerid, Textdraw5);
TextDrawHideForPlayer(playerid, Textdraw6);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
timer[playerid] = SetTimerEx("CheckPing", 1000, true, "i", playerid);
pingmonitor = 1;
SendClientMessage(playerid, -1, "Ping Monitor has been started.");
return 1;
}
else
{
TextDrawHideForPlayer(playerid, Textdraw0);
TextDrawHideForPlayer(playerid, Textdraw1);
TextDrawHideForPlayer(playerid, Textdraw2);
TextDrawHideForPlayer(playerid, Textdraw3);
TextDrawHideForPlayer(playerid, Textdraw4);
TextDrawHideForPlayer(playerid, Textdraw5);
TextDrawHideForPlayer(playerid, Textdraw6);
KillTimer(timer[playerid]);
pingmonitor = 0;
SendClientMessage(playerid, -1, "Ping Monitor has been started.");
return 1;
}
}

You might also like