SA-MP Forums Archive
help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help (/showthread.php?tid=221219)



help - -•♥♠♦♣-•Arshavin•-♥♠♦♣•- - 05.02.2011

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;


Re: help - Unknown123 - 05.02.2011

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;
            }
        }
    }



Re: help - -•♥♠♦♣-•Arshavin•-♥♠♦♣•- - 05.02.2011

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


Re: help - -•♥♠♦♣-•Arshavin•-♥♠♦♣•- - 05.02.2011

HEEEEEEEEELP!


Re: help - iJumbo - 05.02.2011

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


Re: help - -•♥♠♦♣-•Arshavin•-♥♠♦♣•- - 05.02.2011

can u make it on pastebin?


Re: help - iJumbo - 05.02.2011

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


Re: help - -•♥♠♦♣-•Arshavin•-♥♠♦♣•- - 05.02.2011

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


Re: help - Zack9764 - 05.02.2011

Код:
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.


Re: help - Zack9764 - 05.02.2011

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;
             }
        }
}