Is this a good idea?
#7

Or this:

pawn Код:
#include <a_samp>

new bool:g_switch[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    g_switch[playerid] = true;
    return true;
}

forward SwitchVar(playerid);
public SwitchVar(playerid)
{
    if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid)) g_switch[playerid] = true;
    return true;
}

public OnPlayerUpdate(playerid)
{
    if(g_switch[playerid])
    {
        g_switch[playerid] = false;
        SetTimerEx("SwitchVar", 1000, false, "i", playerid);
        SendClientMessage(playerid, -1, "Update/sec..");
    }
    return true;
}
But with lots of players in your server, its laggy (i think)
Reply


Messages In This Thread
Is this a good idea? - by iPLEOMAX - 17.09.2011, 19:17
Re: Is this a good idea? - by TheArcher - 17.09.2011, 19:18
Re: Is this a good idea? - by wouter0100 - 17.09.2011, 19:21
Re: Is this a good idea? - by iPLEOMAX - 17.09.2011, 19:22
Re: Is this a good idea? - by TheArcher - 17.09.2011, 19:24
Re: Is this a good idea? - by iPLEOMAX - 17.09.2011, 19:27
Re: Is this a good idea? - by wouter0100 - 17.09.2011, 19:28
Re: Is this a good idea? - by iPLEOMAX - 17.09.2011, 19:30
Re: Is this a good idea? - by wouter0100 - 17.09.2011, 19:31
Re: Is this a good idea? - by TheArcher - 17.09.2011, 19:32

Forum Jump:


Users browsing this thread: 6 Guest(s)