Проблема с таймерами.
#4

pawn Код:
CALLBACK: UpdateSpeed()
{
    for(new i = GetPlayerPoolSize(); i != -1; i--)
    {
        if(!IsPlayerConnected(i) || IsPlayerNPC(i) || GetPlayerState(i) != PLAYER_STATE_DRIVER) continue;
        new vehicleid = GetPlayerVehicleID(i), string_big[65];
        format(string_big, sizeof(string_big), "Fuel:~g~~h~%d", Gas[vehicleid]);
                PlayerTextDrawSetString(i, Speedo[1][i], string_big);
                format(string_big, sizeof(string_big), "Speed: ~b~~h~%d ~w~KM/.", GetVehicleSpeed(vehicleid));
                PlayerTextDrawSetString(i, Speedo[0][i], string_big);
        if(!VehicleInfo[vehicleid][pEngineStatus]) format(string_big, sizeof(string_big), "~r~E", SpeedOnly(vehicleid));
                else format(string_big, sizeof(string_big), "~b~E", SpeedOnly(vehicleid));
                PlayerTextDrawSetString(i, Speedo[5][i], string_big);
        if(!VehicleInfo[vehicleid][pLightsStatus]) format(string_big, sizeof(string_big), "~r~L", SpeedOnly(vehicleid));
                else format(string_big, sizeof(string_big),"~b~L", SpeedOnly(vehicleid));
                PlayerTextDrawSetString(i, Speedo[6][i], string_big);
        if(!CarInfo[vehicleid][cLock]) format(string_big, sizeof(string_big), "~r~D", SpeedOnly(vehicleid));
                else format(string_big, sizeof(string_big), "~g~D", SpeedOnly(vehicleid));
                PlayerTextDrawSetString(i, Speedo[7][i], string_big);
    }
    return 1;
}
А теперь? И вообще такие вещи лучше делать персональными таймерами.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)