[HELP] No license car on bmx
#1

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);
            }
Reply
#2

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.
Reply
#3

Good. SOLVED.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)