25.12.2011, 22:02
Quote:
Simples, mas ъtil...
... Exemplo: pawn Код:
pawn Код:
|
pawn Код:
public
OnPlayerCommandText ( playerid , cmdtext [ ] )
{
if ( strcmp ( "/contar" , cmdtext , true , 8 ) == 0 )
{
print ( "3" ) ;
SetTimerEx ( "Contar" , 1000 , false , "i" , 3 ) ;
return 1 ;
}
return 0 ;
}
forward Contar ( iR ) ;
public
Contar ( iR )
{
return ( iR ) ? ( iR-- , ( iR == 0 ) ? ( print ( "Go" ) ) : ( printf ( "%i" , iR ) ) , SetTimerEx ( "Contar" , 1000 , false , "i" , iR ) ) : ( 1 ) ;
}
pawn Код:
public
OnPlayerCommandText ( playerid , cmdtext [ ] )
{
if ( strcmp ( "/contar" , cmdtext , true , 8 ) == 0 )
{
return Contar ( 4 ) ;
}
return 0 ;
}
forward Contar ( iR ) ;
public
Contar ( iR )
{
return ( iR ) ? ( iR-- , ( iR == 0 ) ? ( print ( "Go" ) ) : ( printf ( "%i" , iR ) ) , SetTimerEx ( "Contar" , 1000 , false , "i" , iR ) ) : ( 1 ) ;
}