Timer Help
#2

If the player is registering, what's the need for loading the ini file?
It doesn't even exist..

And to do your 10 minute thing, you need to do something like this:
Код:
new
    connectTime[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    connectTime[playerid] = gettime();
    return 1;
}

CMD:register(playerid)
{
    if (gettime() - 10 * 60 < connectTime[playerid])
        return // You can't use this command right now..

    // Your register command
    return 1;
}
Reply


Messages In This Thread
Timer Help - by CarRamper - 23.06.2016, 08:14
Re: Timer Help - by Stinged - 23.06.2016, 08:25
Re: Timer Help - by CarRamper - 23.06.2016, 08:31
Re: Timer Help - by CarRamper - 23.06.2016, 08:41
Re: Timer Help - by CarRamper - 23.06.2016, 08:43
Re: Timer Help - by Sjn - 23.06.2016, 08:47
Re: Timer Help - by Stinged - 23.06.2016, 08:49
Re: Timer Help - by CarRamper - 23.06.2016, 09:06
Re: Timer Help - by CarRamper - 23.06.2016, 09:09
Re: Timer Help - by Sjn - 23.06.2016, 09:15

Forum Jump:


Users browsing this thread: 1 Guest(s)