Advice + Help - Playing Minutes
#6

pawn Код:
// Global variable
new
    OnlineTimer[ MAX_PLAYERS ]
;

public OnPlayerConnect( playerid )
{
    OnlineTimer[ playerid ] = SetTimerEx( "Online", 60000, true, "i", playerid );
    return 1;
}

public OnPlayerDisconnect( playerid, reason )
{
    KillTimer( OnlineTimer[ playerid ] );
    return 1;
}

forward Online( playerid );
public Online( playerid )
{
    PlayerInfo[targetid][Minute] += 1;
    return 1;
}
@Mr_DjolE
- It's same.
pawn Код:
PlayerInfo[targetid][Minute] += 1;
// OR
PlayerInfo[targetid][Minute]++;
// OR
PlayerInfo[targetid][Minute] = PlayerInfo[targetid][Minute] + 1;
All these will add +1 on the variable.
Reply


Messages In This Thread
Advice + Help - Playing Minutes - by FL3GM4 - 26.12.2012, 12:38
Re: Advice + Help - Playing Minutes - by rbush12 - 26.12.2012, 12:42
Re: Advice + Help - Playing Minutes - by FL3GM4 - 26.12.2012, 12:44
Re: Advice + Help - Playing Minutes - by Konstantinos - 26.12.2012, 12:48
Re: Advice + Help - Playing Minutes - by FL3GM4 - 26.12.2012, 12:50
Re: Advice + Help - Playing Minutes - by Konstantinos - 26.12.2012, 12:56
Re: Advice + Help - Playing Minutes - by Djole1337 - 26.12.2012, 12:56
Re: Advice + Help - Playing Minutes - by FL3GM4 - 26.12.2012, 13:02
Re: Advice + Help - Playing Minutes - by Konstantinos - 26.12.2012, 13:08
Re: Advice + Help - Playing Minutes - by FL3GM4 - 26.12.2012, 13:11

Forum Jump:


Users browsing this thread: 1 Guest(s)