24.12.2012, 11:09
I have made my own pilot license script, but the problem is, that it is bugged. (before you ask the code that i put under onplayerentervehicle is below) The thing that is bugged is that it allows the person to enter the plane even if the person doesn't have a license. Anyone know how to fix this?
Code:
Code:
PHP код:
//under onplayerentervehicle
if(IsAPlane(vehicleid))
{
if(PlayerInfo[playerid][pPilotLic] < 1)
{
new Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SendClientMessage(playerid, COLOR_ORANGE, "You cannot use this vehicle.");
}
}