18.05.2014, 12:57
How can I make if the player
if(AllowTakeLCar[playerid] == 1)
he can enter and he have 0 kick him of the car.
if(AllowTakeLCar[playerid] == 1)
he can enter and he have 0 kick him of the car.
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(vehicleid == DriversTest)
{
if(AllowTakeLCar[playerid] == 1)
{
if(IsPlayerInAnyVehicle(playerid))
{
SCM(playerid, -1, "Let's start the Drivers test Notes:");
SCM(playerid, -1, "1. If you hit your car its over.");
SCM(playerid, -1, "2. You will ride true red I will give a - point.");
SCM(playerid, -1, "GOODLUCK!!");
}
}
else if(AllowTakeLCar[playerid] == 0)
{
SCM(playerid, -1, "Your not taking a test!");
return RemovePlayerFromVehicle(playerid);
}
}
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if (newstate == PLAYER_STATE_DRIVER)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(vehicleid == DriversTest)
{
if(AllowTakeLCar[playerid] == 1)
{
if(IsPlayerInAnyVehicle(playerid))
{
SCM(playerid, -1, "Let's start the Drivers test Notes:");
SCM(playerid, -1, "1. If you hit your car its over.");
SCM(playerid, -1, "2. You will ride true red I will give a - point.");
SCM(playerid, -1, "GOODLUCK!!");
}
}
else if(AllowTakeLCar[playerid] == 0)
{
SCM(playerid, -1, "Your not taking a test!");
return RemovePlayerFromVehicle(playerid);
}
}
}
return 1;
}