KillTimer problem ?
#1

pawn Код:
if ( F_STEPS [ playerid ] == 0 ) {
        F_STEPS [ playerid ] = 1;
        TextDrawBoxColor        ( F_SCREEN, 0x00000000   );
        TextDrawShowForPlayer   ( playerid, F_SCREEN     );
       
        F_TIMER [ playerid ] = SetTimerEx_( "FADE_TIMER", 0, 50, -1, "i", playerid );
    }
This script is into OnPlayerDeath..

pawn Код:
Func:FADE_TIMER ( playerid )
{
    switch ( F_STEPS [ playerid ] )
    {
        case 1: TextDrawBoxColor( F_SCREEN, 0x00000011 );
        case 2: TextDrawBoxColor( F_SCREEN, 0x00000022 );
        case 3: TextDrawBoxColor( F_SCREEN, 0x00000033 );
        case 4: TextDrawBoxColor( F_SCREEN, 0x00000044 );
        case 5: TextDrawBoxColor( F_SCREEN, 0x00000055 );
        case 6: TextDrawBoxColor( F_SCREEN, 0x00000066 );
        case 7: TextDrawBoxColor( F_SCREEN, 0x00000077 );
        case 8: TextDrawBoxColor( F_SCREEN, 0x00000088 );
        case 9: TextDrawBoxColor( F_SCREEN, 0x00000099 );
        case 10: TextDrawBoxColor( F_SCREEN, 0x000000AA );
        case 11: TextDrawBoxColor( F_SCREEN, 0x000000BB );
        case 12: TextDrawBoxColor( F_SCREEN, 0x000000CC );
        case 13: TextDrawBoxColor( F_SCREEN, 0x000000DD );
        case 14: TextDrawBoxColor( F_SCREEN, 0x000000EE );
        case 15:
        {
            TextDrawBoxColor( F_SCREEN, 0x000000FF );
            KillTimer_( F_TIMER [ playerid ] );
            F_STEPS [ playerid ] = 0;
        }
    }
    TextDrawHideForPlayer ( playerid, F_SCREEN );
    TextDrawShowForPlayer ( playerid, F_SCREEN );
    printf ( "#FADE_TIMER ( %d ) called", playerid );
    return F_STEPS [ playerid ]++;
}
I use fixes2, but i can't destroy this timer.. the textdraw fade non-stop.
And i have a KillTimer_ in onplayerdisconnect, when i leave from server, the timer don't death.

I have others timers, but i can destroy..
Where is the problem? Possible bug ?
Reply
#2

resolved..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)