10.05.2018, 20:27
First, learn english, second show us more code. Provide us to know more about your problem, if you don't know
to give us more code, you can't be helped. This is a minor problem, you just have to add the function that i said into your code at "OnPlayerStateChange", in the moment that player is on foot.
to give us more code, you can't be helped. This is a minor problem, you just have to add the function that i said into your code at "OnPlayerStateChange", in the moment that player is on foot.
PHP код:
public OnPlayerStateChange( playerid, newstate, oldstate )
{
if( oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER )
{
killtimer[ playerid ] = SetTimerEx( "speed", 100, true, "i", playerid );
}
if( oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT )
{
KillTimer( killtimer[ playerid ] );
TextDrawHideForPlayer( playerid, your_textdraw_name_for_speedometer );
//you just have to edit "your_textdraw_name_for_speedometer" with your TD name.
}
return 1;
}