Problem with RemovePlayerFromVehicle
#9

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.

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)");
            }
        }
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.
Reply


Messages In This Thread
Problem with RemovePlayerFromVehicle - by -CaRRoT - 26.05.2012, 06:58
Re: Problem with RemovePlayerFromVehicle - by newbienoob - 26.05.2012, 07:25
Re: Problem with RemovePlayerFromVehicle - by -CaRRoT - 26.05.2012, 07:26
Re: Problem with RemovePlayerFromVehicle - by iggy1 - 26.05.2012, 07:28
Re: Problem with RemovePlayerFromVehicle - by -CaRRoT - 26.05.2012, 07:30
Re: Problem with RemovePlayerFromVehicle - by iggy1 - 26.05.2012, 07:35
Re: Problem with RemovePlayerFromVehicle - by -CaRRoT - 26.05.2012, 07:38
Re: Problem with RemovePlayerFromVehicle - by newbienoob - 26.05.2012, 07:43
Re: Problem with RemovePlayerFromVehicle - by iggy1 - 26.05.2012, 07:46

Forum Jump:


Users browsing this thread: 7 Guest(s)