Jump to content

[REZOLVAT] Intrebare(Cum pot sa modific speedo pe gm burned?)


CRGAdv
 Share

Recommended Posts

Intrebare: Cum pot sa modific speedo pe gm burned? Gen sa fie ca pe B-hood.

Dau +2.

Functia:

function Checkvehinfo(playerid) {
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) {
if(InRaceArena[playerid] == 1 && !RaceStarted) return true;
 
new engine, lights, alarm, doors, bonnet, boot, objective, string[256];
GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
 
if(CarInfo[FindSpawnID(GetPlayerVehicleID(playerid))][cID] != -2 && FindSpawnID(GetPlayerVehicleID(playerid)) != 0 && !IsAPlane(GetPlayerVehicleID(playerid))) {
if(!IsABike(GetPlayerVehicleID(playerid)) && !IsAPlane(GetPlayerVehicleID(playerid))) format(string, sizeof string, "Speed: ~r~%d~w~~h~ km/h~w~~h~~n~Odometer: ~r~%0.2f~n~Radio: ~r~%s~n~~r~%s~n~Fuel: ~r~%s%d%s", Carspeed(playerid), CarInfo[FindSpawnID(GetPlayerVehicleID(playerid))][KM], GetVehicleRadio(GetPlayerVehicleID(playerid)),
(doors == 1) ? ("~w~Doors: ~r~Locked~w~~h~") : ("~w~Doors: ~g~Unlocked~w~~h~"), (Gas[GetPlayerVehicleID(playerid)] > 20) ? ("") : ("~r~"), Gas[GetPlayerVehicleID(playerid)], "%");
} else {
if(!IsABike(GetPlayerVehicleID(playerid)) && !IsAPlane(GetPlayerVehicleID(playerid))) format(string, sizeof string, "Speed: ~r~%d~w~~h~ km/h~w~~h~~n~Radio: ~r~%s~n~~r~%s~n~Fuel: ~r~%s%d%s", Carspeed(playerid), GetVehicleRadio(GetPlayerVehicleID(playerid)),
(doors == 1) ? ("~w~Doors: ~r~Locked~w~~h~") : ("~w~Doors: ~g~Unlocked~w~~h~"), (Gas[GetPlayerVehicleID(playerid)] > 20) ? ("") : ("~r~"), Gas[GetPlayerVehicleID(playerid)], "%");
} PlayerTextDrawSetString(playerid, Speedo, string); PlayerTextDrawShow(playerid, Speedo);
}
return 1;
}
 

 

 

 

Link to comment
Share on other sites

 

Intrebare: Cum pot sa modific speedo pe gm burned? Gen sa fie ca pe B-hood.

Dau +2.

Functia:

function Checkvehinfo(playerid) {
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) {
if(InRaceArena[playerid] == 1 && !RaceStarted) return true;
 
new engine, lights, alarm, doors, bonnet, boot, objective, string[256];
GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
 
if(CarInfo[FindSpawnID(GetPlayerVehicleID(playerid))][cID] != -2 && FindSpawnID(GetPlayerVehicleID(playerid)) != 0 && !IsAPlane(GetPlayerVehicleID(playerid))) {
if(!IsABike(GetPlayerVehicleID(playerid)) && !IsAPlane(GetPlayerVehicleID(playerid))) format(string, sizeof string, "Speed: ~r~%d~w~~h~ km/h~w~~h~~n~Odometer: ~r~%0.2f~n~Radio: ~r~%s~n~~r~%s~n~Fuel: ~r~%s%d%s", Carspeed(playerid), CarInfo[FindSpawnID(GetPlayerVehicleID(playerid))][KM], GetVehicleRadio(GetPlayerVehicleID(playerid)),
(doors == 1) ? ("~w~Doors: ~r~Locked~w~~h~") : ("~w~Doors: ~g~Unlocked~w~~h~"), (Gas[GetPlayerVehicleID(playerid)] > 20) ? ("") : ("~r~"), Gas[GetPlayerVehicleID(playerid)], "%");
} else {
if(!IsABike(GetPlayerVehicleID(playerid)) && !IsAPlane(GetPlayerVehicleID(playerid))) format(string, sizeof string, "Speed: ~r~%d~w~~h~ km/h~w~~h~~n~Radio: ~r~%s~n~~r~%s~n~Fuel: ~r~%s%d%s", Carspeed(playerid), GetVehicleRadio(GetPlayerVehicleID(playerid)),
(doors == 1) ? ("~w~Doors: ~r~Locked~w~~h~") : ("~w~Doors: ~g~Unlocked~w~~h~"), (Gas[GetPlayerVehicleID(playerid)] > 20) ? ("") : ("~r~"), Gas[GetPlayerVehicleID(playerid)], "%");
} PlayerTextDrawSetString(playerid, Speedo, string); PlayerTextDrawShow(playerid, Speedo);
}
return 1;
}

Schimbi doar TD-ul atat

 

Link to comment
Share on other sites

Modifici td-ul actual cu cel de nou in systems.inc si modifici variabilele.

Functia o ai mai jos:

 

 

function Checkvehinfo(playerid)
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER && InDealer[playerid] == 0)
    {
        if(InRaceArena[playerid] == 1 && !RaceStarted) return true;
        new vehicle = GetPlayerVehicleID(playerid);
        new engine, lights, alarm, doors, bonnet, boot, objective, string[256];
        GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
        if(CarInfo[FindSpawnID(GetPlayerVehicleID(playerid))][cID] != -2 && FindSpawnID(GetPlayerVehicleID(playerid)) != 0)
        {
            {
                format(string, sizeof(string), "~%s~%d", (Carspeed(playerid) < 99) ? ("g") : ("r"), Carspeed(playerid));
                PlayerTextDrawSetString(playerid, Speedo[1], string);
                PlayerTextDrawShow(playerid, Speedo[1]);
                format(string, sizeof(string), "   KM/H");
                PlayerTextDrawSetString(playerid, Speedo[2], string);
                PlayerTextDrawShow(playerid, Speedo[2]);
                format(string, sizeof(string), "Fuel: ~%s~%d~n~~w~~h~%s~n~Odometer: %0.2f", (Gas[GetPlayerVehicleID(playerid)] > 20) ? ("y") : ("r"), Gas[GetPlayerVehicleID(playerid)], (doors == 1) ? ("Doors: ~r~Locked~w~~h~") : ("Doors: ~g~Unlocked~w~~h~"), CarInfo[FindSpawnID(GetPlayerVehicleID(playerid))][KM]);
                PlayerTextDrawSetString(playerid, Speedo[0], string);
                PlayerTextDrawShow(playerid, Speedo[0]);
            }
        }
        else
        {
            if(!IsABike(vehicle) && !IsAPlane(vehicle))
            {
                format(string, sizeof(string), "~%s~%d", (Carspeed(playerid) < 99) ? ("g") : ("r"), Carspeed(playerid));
                PlayerTextDrawSetString(playerid, Speedo[1], string);
                PlayerTextDrawShow(playerid, Speedo[1]);
                format(string, sizeof(string), "   KM/H");
                PlayerTextDrawSetString(playerid, Speedo[2], string);
                PlayerTextDrawShow(playerid, Speedo[2]);
                format(string, sizeof(string), "Fuel: ~%s~%d~n~~w~~h~%s", (Gas[GetPlayerVehicleID(playerid)] > 20) ? ("y") : ("r"), Gas[GetPlayerVehicleID(playerid)], (doors == 1) ? ("Doors: ~r~Locked~w~~h~") : ("Doors: ~g~Unlocked~w~~h~"));
                PlayerTextDrawSetString(playerid, Speedo[0], string);
                PlayerTextDrawShow(playerid, Speedo[0]);
            }
        }
        for(new i = 0; i < 3; i++) PlayerTextDrawShow(playerid, Speedo[i]);
    }
    return 1;
Edited by iPanter
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...