Online Time Bonus?
#2

A one-hour bonus for a player, so one player one timer.

pawn Код:
#include < a_samp >

new
    bonusTimer[ MAX_PLAYERS ];
   
public OnPlayerConnect( playerid )
{
    bonusTimer[ playerid ] = SetTimerEx( "BonusOneHour", 3600 * 1000 /* 3600 x 1 seconds */, true, "i", playerid );
    return true;
}

public OnPlayerDisconnect( playerid, reason )
{
    KillTimer( bonusTimer[ playerid ] );
    return true;
}

forward BonusOneHour( playerid );
public BonusOneHour( playerid )
{
    SendClientMessage( playerid, -1, "Bonus! You got a ban for playing 1 hours." );
    BanEx( playerid, "Too much playing on the server." );
    return true;
}
A basic one should look like that.
Reply


Messages In This Thread
Online Time Bonus? - by LeeXian99 - 21.04.2013, 11:58
Re: Online Time Bonus? - by greentarch - 21.04.2013, 12:09
Re: Online Time Bonus? - by LeeXian99 - 21.04.2013, 12:14
Re: Online Time Bonus? - by greentarch - 21.04.2013, 12:26

Forum Jump:


Users browsing this thread: 1 Guest(s)