03.06.2014, 18:05
I don't really understand where that piece of code comes from but here's the easiest way to do this:
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.
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;
}