07.06.2012, 11:40
Hey, i have a problem. why my timer 'gLaikamtis1' is indestructible?
[pawn]
[pawn]
pawn Код:
new gLaikmatis1[ MAX_PLAYERS ];[pawn/]
forward Ligonine( playerid );
public Ligonine( playerid )
{
SetPlayerHealth ( playerid, 100 );
ResetPlayerWeapons( playerid );
SetPlayerPos ( playerid, -331.4417,1050.7646,19.7392);
SetPlayerCameraPos(playerid, -2571.64, 779.23, 103.15);
SetPlayerCameraLookAt(playerid, -2573.92, 775.19, 101.29);
TogglePlayerControllable( playerid, false );
zInfo[ playerid ][ GydimoLaikas ] = 59;
KillTimer( gLaikmatis[ playerid ] );
gLaikmatis1[playerid]=SetTimerEx("LigoninePabaiga",1500,true,"i",playerid);
return true;
}
forward LigoninePabaiga( playerid );
public LigoninePabaiga( playerid )
{
new
String[ 50 ]
;
format ( String, sizeof( String ), "~n~Jus paleistas busite is ligonines uz: ~r~%d",zInfo[ playerid ][ GydimoLaikas ] );
GameTextForPlayer( playerid, String, 30000, 5 );
zInfo[ playerid ][ GydimoLaikas ]--;
if( zInfo[ playerid ][ GydimoLaikas ] <=0 )
{
TogglePlayerControllable( playerid, true );
print("ts");
KillTimer( gLaikmatis1[ playerid ] );
}
//return true;
}