14.06.2016, 13:33
new bool nCheck[ MAX_PLAYERS ] ;
public OnPlayerSpawn( playerid )
{
SetPlayerCheckpoint( playerid, 1982.6150 , -220.6680 , -0.2432 , 3.0 ) ;
onCheck [playerid ] = true;
return 1 ;
}
public OnPlayerEnterCheckpoint (playerid )
{
if( onCheck[ playerid ]) // if it's true
{
GivePlayerMoney ( playerid, 1000 ) ;
DisablePlayerCheckpoint ( playerid ) ;
onCheck [playerid ] = false;
}
return 1 ;
}
but i need not to end checkpoint instantly after someome enter it. I mean when someone end cp it will end after 2min
public OnPlayerSpawn( playerid )
{
SetPlayerCheckpoint( playerid, 1982.6150 , -220.6680 , -0.2432 , 3.0 ) ;
onCheck [playerid ] = true;
return 1 ;
}
public OnPlayerEnterCheckpoint (playerid )
{
if( onCheck[ playerid ]) // if it's true
{
GivePlayerMoney ( playerid, 1000 ) ;
DisablePlayerCheckpoint ( playerid ) ;
onCheck [playerid ] = false;
}
return 1 ;
}
but i need not to end checkpoint instantly after someome enter it. I mean when someone end cp it will end after 2min