IsVehicleOccupied
#5

The PutPlayerInVehicle function have to have 3 parameters, and you put only 2

I think that car1 and car2 are global variables, so, let's go.

Look, i fixed it for you:

pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/ready",cmdtext,true,6)==0)
    {
        if(IsVehicleOccupied(car1))
        {
            PutPlayerInVehicle(playerid, car2, 0);//There was only 2 parameters
        }
        else
        {
            PutPlayerInVehicle(playerid, car1, 0);//There was only 2 parameters
            TogglePlayerControllable(playerid, 0);//This line freezes the player that used the command
            return 1;
        }
        return 1;
    }
    return 0;
}
I hope that i have helped
Reply


Messages In This Thread
IsVehicleOccupied - by lewismichaelbbc - 06.03.2011, 10:27
Re: IsVehicleOccupied - by [WF]Demon - 06.03.2011, 10:29
Re: IsVehicleOccupied - by lewismichaelbbc - 06.03.2011, 10:30
Re: IsVehicleOccupied - by lewismichaelbbc - 06.03.2011, 10:47
Re: IsVehicleOccupied - by rjjj - 06.03.2011, 10:53
Re: IsVehicleOccupied - by lewismichaelbbc - 06.03.2011, 11:24

Forum Jump:


Users browsing this thread: 1 Guest(s)