I need a help
#4

pawn Код:
public OnGameModeInit( )
{
    SetTimer( "opengate", (1 * 1000), 1 );
    SetTimer( "closegate", (1 * 1000), 1 );
    return true;
}
Down somewhere...
pawn Код:
forward opengate( );
public opengate( )
{
    for( new i = 0; i < MAX_PLAYERS; i++ )
    {
        if ( IsPlayerInRangeOfPoint( i, 5.0, Float:x, Float:y, Float:z ) ) // CHANGE THE X, Y, Z
            MoveObject( Minigame, 1845.92114258,-1898.49877930,36.24028015,3 );
    }
    return true;
}
pawn Код:
forward closegate( );
public closegate( )
{
    new a = 0;
    for( new i = 0; i < MAX_PLAYERS; i++ )
    {
        if ( IsPlayerInRangeOfPoint( i, 5.0, Float:x, Float:y, Float:z ) ) // CHANGE THE X, Y, Z TOO
        {
            a++;
        }
    }
    if ( a == 0 )  // If no one is close to the gates, it will close them!
        MoveObject( Minigame, 1877.67846680,-1875.85620117,36.24028015,3 );
    return true;
}
Reply


Messages In This Thread
I need a help - by Ironboy - 11.02.2011, 14:48
Re: I need a help - by Stigg - 11.02.2011, 14:56
Re: I need a help - by Ironboy - 11.02.2011, 15:15
Re: I need a help - by Mean - 11.02.2011, 16:07
Re: I need a help - by Ironboy - 11.02.2011, 19:56

Forum Jump:


Users browsing this thread: 3 Guest(s)