[FilterScript] Ping Monitor
#9

Quote:
Originally Posted by Kyance
Посмотреть сообщение
pawn Код:
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 disable the 'pingmonitor', but yet send him the message that "Ping Monitor has been started", right.
Anyways, wouldn't this cause the textdraws to "fail" when there's more than 1 player online?

But, other than that, nice.
Yes, they would "fail" with more players, pingmonitor would be the variable used for the whole server not just one player.
Reply


Messages In This Thread
Ping Monitor - by Metroplex - 27.10.2014, 01:07
Re: Ping Monitor - by Crayder - 27.10.2014, 01:10
Re: Ping Monitor - by Metroplex - 27.10.2014, 01:35
Re: Ping Monitor - by Flake. - 27.10.2014, 02:06
Re: Ping Monitor - by fonia5 - 27.10.2014, 02:26
Re: Ping Monitor - by Crayder - 27.10.2014, 03:32
Re: Ping Monitor - by Adarsh007 - 27.10.2014, 05:58
Re: Ping Monitor - by Kyance - 27.10.2014, 07:49
Re: Ping Monitor - by Crayder - 27.10.2014, 12:01
Re: Ping Monitor - by Metroplex - 28.10.2014, 02:41

Forum Jump:


Users browsing this thread: 3 Guest(s)