Jump to content
  • 0

Ajutor System Odometer ca pe b-zone


Stefan112

Question

13 answers to this question

Recommended Posts

Mi-am adus aminte ca am si eu unu de asta=))

Uite aici:

[pawn]public CheckInfo()

{

    for(new i = 0;i < MAX_PLAYERS; i++)

    {

    if (IsPlayerInAnyVehicle(i) && IsPlayerConnected(i))

{

new vehicleid = GetPlayerVehicleID(i);

                new Float:spekmph = GetPlayerSpeed(i);

                //new Float:dist = GetPlayerDistance(i);

    new Float:maxspeed = 230.0;

    new Float:maxspeed01 = 270.0;

    new Float:maxspeed2 = 85.0;

    new plname[MAX_PLAYER_NAME];

    new string[256];

//CarInfo[vehicleid][cDist] += dist;

    if(gSpeedo == 2)

{

if(spekmph < 50)

{

format(string, 256, "~b~Rezervor: ~w~%d\%~n~~b~KM/H: ~w~%.0f~n~~b~Kilometri: ~w~%d",Gas[vehicleid],spekmph,CarInfo[vehicleid][cDist]);

}

if(spekmph > 50 && spekmph < 90)

{

format(string, 256, "~g~Rezervor: ~w~%d\%~n~~g~KM/H: ~w~%.0f~n~~g~Kilometri: ~w~%d",Gas[vehicleid],spekmph,CarInfo[vehicleid][cDist]);

}

if(spekmph > 90 && spekmph < 130)

{

format(string, 256, "~y~Rezervor: ~w~%d\%~n~~y~KM/H: ~w~%.0f~n~~y~Kilometri: ~w~%d",Gas[vehicleid],spekmph,CarInfo[vehicleid][cDist]);

}

if(spekmph > 130)

{

format(string, 256, "~r~Rezervor: ~w~%d\%~n~~r~KM/H: ~w~%.0f~n~~r~Kilometri: ~w~%d",Gas[vehicleid],spekmph,CarInfo[vehicleid][cDist]);

}

TextDrawSetString(KMH,string);

      //GameTextForPlayer(i, string, 2000, 5);

}

if(spekmph > maxspeed && PlayerInfo[pAdmin] < 1)

{

new tmpcar = GetPlayerVehicleID(i);

if(!Avion(tmpcar) || !Elicopter(tmpcar))

{

GetPlayerName(i, plname, sizeof(plname));

format(string, 256, "ATENTIE ADMINI: [%d]%s are %d kmph cu un vehicul",i,plname,spekmph);

ABroadCast(COLOR_YELLOW,string,1);

}

}

if(spekmph > maxspeed01 && PlayerInfo[pAdmin] < 1)

{

new tmpcar = GetPlayerVehicleID(i);

if(Avion(tmpcar) || Elicopter(tmpcar))

{

GetPlayerName(i, plname, sizeof(plname));

format(string, 256, "ATENTIE ADMINI: [%d]%s are %d kmph cu un vehicul de zbor",i,plname,spekmph);

ABroadCast(COLOR_YELLOW,string,1);

}

}

new tmpcar = GetPlayerVehicleID(i);

if(spekmph > maxspeed2)

{

    if(pTest > 0 || pTestC > 0 || pTestA > 0)

    {

        DisablePlayerRaceCheckpoint(i);

                            RemovePlayerFromVehicle(i);

SendClientMessage(i,COLOR_LIGHTBLUE,"  Ai depasit viteza de 50 kmph in localitate si ai picat!");

pTest = 0;

pTestC = 0;

pTestA = 0;

        PlayerPlaySound(i, 1055, 0.0, 0.0, 0.0);

        SetVehicleToRespawn(tmpcar);

        TakingLesson = 0;

    }

}

}

/*if(commlock > 0)

{

    PlayerInfo[playerid][pLocked] = 1;

    BanEx(playerid,reason);

}*/

}

}[/pawn] Nu sterge nimic din el!O sa isi schimbe culoarea automat.+1 daca te-am ajutat.

 

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.