18.04.2011, 11:01
can i make every 100 score my player Variable increase of 1?
in a simple code? with a timer
in a simple code? with a timer
SetTimerEx( "LevelUp",1000,true,"i",playerid );
forward LevelUp( playerid );
public LevelUp( playerid )
{
GetPlayerScore( playerid,SetPlayerScore( playerid )+1 );
if( GetPlayerScore( playerid ) >= 100 )
{
//Your Variable
}
return true;
}
Okey maybe i understend
pawn Код:
|
SetTimer( "LevelUp",1000,true );
forward LevelUp( );
public LevelUp( )
{
for( new playerid = 0; playerid != MAX_PLAYERS; playerid++ )
{
if( !IsPlayerConnected( playerid )) continue;
GetPlayerScore( playerid,SetPlayerScore( playerid )+1 );
if( GetPlayerScore( playerid ) >= 100 )
{
//Your Variable
}
}
return true;
}