SA-MP Forums Archive
[HELP] No license car on bmx - 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)
+--- Thread: [HELP] No license car on bmx (/showthread.php?tid=517180)



[HELP] No license car on bmx - monster010 - 03.06.2014

I did that when getting on a BMX to not say "Nu ailicenta de condus" and remove the player of the bmx, but does not work all I ask liceenta


pawn Код:
if(InfoJucator[playerid][zMasinaLic] < 1 && TakingLesson[playerid] != 1)
            {
                if(IsABmx(newcar))
                {
                   TakingLesson[playerid] = 1;
                   return (0) ;
                }
                SCM(playerid, COLOR_WHITE, "Nu ai licenta de condus.");
                RemovePlayerFromVehicle(playerid);
            }



Re: [HELP] No license car on bmx - Koala818 - 03.06.2014

I don't really understand where that piece of code comes from but here's the easiest way to do this:
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) //When a player enters a vehicle
{
    if(InfoJucator[playerid][zMasinaLic] < 1 && TakingLesson[playerid] != 1) //If the player does not have a license and does not take any lesson.
    {
        if(!IsABmx(vehicleid))// If the vehicle the player is entering is not a BMX, then don't let him drive.
        {
            SCM(playerid, COLOR_WHITE, "Nu ai licenta de condus.");
            RemovePlayerFromVehicle(playerid);
        }
    }
return 1;
}
Read what's commented (The green part after "//") for a better understanding. I hope this help, if not, be more explicit of what you're tryin' to do so we can help.


Re: [HELP] No license car on bmx - monster010 - 03.06.2014

Good. SOLVED.