26.05.2012, 07:46
It's a problem with your variables then, because RemovePlayerFromVehicle isn't even being executed. Print their values to make sure your doing it right. Put a load of prints there to see what gets executed and what doesn't.
Doesn't look like a problem with RemovePlayerFromVehicle.
EDIT: something like this.
That should help narrow it down. It's a good idea to do this before posting for help because 99% of the time you will find the problem.
Doesn't look like a problem with RemovePlayerFromVehicle.
EDIT: something like this.
pawn Код:
if(newstate == PLAYER_STATE_DRIVER)
{
print("player is driver");
new Float:V1X, Float:V1Y, Float:V1Z;
new newcar = GetPlayerVehicleID(playerid);
new Model = GetVehicleModel(newcar);
new oldcar = gLastCar[playerid];
if(IsABoat(newcar))
{
printf("vehicle is a boat PlayerInfo[playerid][pBoatLic] = %d", PlayerInfo[playerid][pBoatLic] );
if(PlayerInfo[playerid][pBoatLic] < 1)
{
SendClientMessage(playerid, COLOR_GREY, " You don't know how to Sail yet, so you left the Boat !");
RemovePlayerFromVehicle(playerid);
print("RemovePlayerFromVehicle executed (boat)");
}
}
else
{
printf("vehicle is not a boat PlayerInfo[playerid][pCarLic] = %d", PlayerInfo[playerid][pCarLic] );
if(PlayerInfo[playerid][pCarLic] < 1)
{
SendClientMessage(playerid, COLOR_GREY, " You don't know how to Drive yet, so you left the Car !");
RemovePlayerFromVehicle(playerid);
print("RemovePlayerFromVehicle executed (car)");
}
}