#1

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 7.0, 1140.0406,1370.9948,10.3881))
    {
        PlayerPlaySound(playerid, 1054 , 0.0, 0.0, 10.0);
        if(checkpointid == dtcp[19])
        {
            DisablePlayerRaceCheckpoint(playerid);
            DestroyDynamicRaceCP(dtcp[19]);
            DestroyVehicle(dscar);
            IsInDrivingTest[playerid] = 0;
        }
    }
can someone add me if player vehicle under 1000 hp then sendclientmessage bla bla u failed and dvlicense[playerid] = 0; and if his car is fully repaired then sendclientmessage bla bla u passed and dvlicense[playerid] = 1;
Reply
#2

Try this, i dont know if it will work..

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 7.0, 1140.0406,1370.9948,10.3881))
    {
        new Float:health, vehicleid;
        vehicleid = GetPlayerVehicleID(playerid);
        GetVehicleHealth(vehicleid, health);
        PlayerPlaySound(playerid, 1054 , 0.0, 0.0, 10.0);
        if(checkpointid == dtcp[19])
        {
            DisablePlayerRaceCheckpoint(playerid);
            DestroyDynamicRaceCP(dtcp[19]);
            DestroyVehicle(dscar);
            IsInDrivingTest[playerid] = 0;
        }

        if(health < 1000)
        {
            SendClientMessage(playerid,COLOR_RED,"You failed at the test!");
            dvlicense[playerid] = 0;
            return 1;
        }
        else
        {
            if(health == 1000)
            {
                SendClientMessage(playerid,COLOR_RED,"You passed the test!");
                dvlicense[playerid] = 1;
                return 1;
            }
        }
    }
Reply
#3

wierdo dunno when am done it get me the 2 messages u passed and u failed Oo
Reply
#4

HEEEEEEEEELP!
Reply
#5

if u have TeamViwer add me in msn pyrokar@libero.it
Reply
#6

can u make it on pastebin?
Reply
#7

no i explain u how to make it and i have 2 see full script becouse i dont understand what u want
Reply
#8

FIRST,
when i finish race it does me the message u failed and u passed see the code that "Unknown" helped me with!:@
Reply
#9

Код:
if(IsPlayerInRangeOfPoint(playerid, 7.0, 1140.0406,1370.9948,10.3881))
{
        new Float:health, vehicleid;
        vehicleid = GetPlayerVehicleID(playerid);
        GetVehicleHealth(vehicleid, health);
        PlayerPlaySound(playerid, 1054 , 0.0, 0.0, 10.0);
        if(checkpointid == dtcp[19])
        {
            if (health == 1000)
            {
                DisablePlayerRaceCheckpoint(playerid);
                DestroyDynamicRaceCP(dtcp[19]);
                DestroyVehicle(dscar);
                IsInDrivingTest[playerid] = 0;
                SendClientMessage(playerid,COLOR_RED,"You passed the test!");
                dvlicense[playerid] = 1;
                return 1;
             }
             else
             {
                  SendClientMessage(playerid,COLOR_RED,"You failed at the test!");
                  dvlicense[playerid] = 0;
                  return 1;
             }
        }
}
I think that would work.
Reply
#10

Actually, wait. I think you would want to use this because in that one he would still have his car and be taking the test after he failed:

Код:
if(IsPlayerInRangeOfPoint(playerid, 7.0, 1140.0406,1370.9948,10.3881))
{
        new Float:health, vehicleid;
        vehicleid = GetPlayerVehicleID(playerid);
        GetVehicleHealth(vehicleid, health);
        PlayerPlaySound(playerid, 1054 , 0.0, 0.0, 10.0);
        if(checkpointid == dtcp[19])
        {
            if (health == 1000)
            {
                DisablePlayerRaceCheckpoint(playerid);
                DestroyDynamicRaceCP(dtcp[19]);
                DestroyVehicle(dscar);
                IsInDrivingTest[playerid] = 0;
                SendClientMessage(playerid,COLOR_RED,"You passed the test!");
                dvlicense[playerid] = 1;
                return 1;
             }
             else
             {
                  DisablePlayerRaceCheckpoint(playerid);
                  DestroyDynamicRaceCP(dtcp[19]);
                  DestroyVehicle(dscar);
                  IsInDrivingTest[playerid] = 0;
                  SendClientMessage(playerid,COLOR_RED,"You failed at the test!");
                  dvlicense[playerid] = 0;
                  return 1;
             }
        }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)