11.06.2013, 20:58
Why do you need that timer?
Use OnPlayerStateChange like:
Use OnPlayerStateChange like:
pawn Код:
if(newstate == PLAYER_STATE_DRIVER || PLAYER_STATE_PASSENGER)
{
TextDrawShowForPlayer(playerid, Speedo0[playerid);
TextDrawShowForPlayer(playerid, Speedo1[playerid]);
TextDrawShowForPlayer(playerid, Speedo2[playerid]);
TextDrawShowForPlayer(playerid,Speedo3[playerid]);
TextDrawShowForPlayer(playerid, Speedo4[playerid]);
TextDrawShowForPlayer(playerid, Speedo5[playerid]);
TextDrawShowForPlayer(playerid, Speedo6[playerid]);
TextDrawShowForPlayer(playerid, Speedo7[playerid]);
TextDrawShowForPlayer(playerid, Speedo8[playerid]);
TextDrawShowForPlayer(playerid, Speedo9[playerid]);
TextDrawShowForPlayer(playerid, Speedo10[playerid]);
TextDrawShowForPlayer(playerid, Speedo11[playerid]);
TextDrawShowForPlayer(playerid, Speedo12[playerid]);
TextDrawShowForPlayer(playerid, Speedo13[playerid]);
}
if(oldstate == PLAYER_STATE_DRIVER || PLAYER_STATE_PASSANGER)
{
TextDrawHideForPlayer(playerid, Speedo0[playerid);
TextDrawHideForPlayer(playerid, Speedo1[playerid]);
TextDrawHideForPlayer(playerid, Speedo2[playerid]);
TextDrawHideForPlayer(playerid,Speedo3[playerid]);
TextDrawHideForPlayer(playerid, Speedo4[playerid]);
TextDrawHideForPlayer(playerid, Speedo5[playerid]);
TextDrawHideForPlayer(playerid, Speedo6[playerid]);
TextDrawHideForPlayer(playerid, Speedo7[playerid]);
TextDrawHideForPlayer(playerid, Speedo8[playerid]);
TextDrawHideForPlayer(playerid, Speedo9[playerid]);
TextDrawHideForPlayer(playerid, Speedo10[playerid]);
TextDrawHideForPlayer(playerid, Speedo11[playerid]);
TextDrawHideForPlayer(playerid, Speedo12[playerid]);
TextDrawHideForPlayer(playerid, Speedo13[playerid]);
}