Turn Signal timer
#2

Код:
forward TurnSignalOFF(playerid);
public TurnSignalOFF(playerid)
{
	if(turnleft[playerid] == 1)
	{
        PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][22]);
        PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][22], -2139062017);
        PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][22]);
        return 1;
	}
    if(turnright[playerid] == 1)
	{
        PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][21]);
        PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][21], -2139062017);
        PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][21]);
		return 1;
	}
     if(turnright[playerid] == 1 || turnleft[playerid] == 1)
    SetTimerEx("TurnSignalON", 1000, false, "i", playerid);
    return 1;
}
forward TurnSignalON(playerid);
public TurnSignalON(playerid)
{
	if(turnleft[playerid] == 1)
	{
        PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][22]);
        PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][22], 16711935);
        PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][22]);
        return 1;
	}
    if(turnright[playerid] == 1)
	{
        PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][21]);
        PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][21], 16711935);
        PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][21]);
		return 1;
	}
     if(turnright[playerid] == 1 || turnleft[playerid] == 1)
            SetTimerEx("TurnSignalOFF", 1000, false, "i", playerid);
    return 1;
}
this maybe
Reply


Messages In This Thread
Turn Signal timer - by AlexBlack - 31.03.2015, 15:54
Re: Turn Signal timer - by Sascha - 31.03.2015, 18:03

Forum Jump:


Users browsing this thread: 2 Guest(s)