RemovePlayerFromVehicle Doesn't Work ?
#14

Are you sure this part is right:
pawn Код:
PlayerInfo[playerid][pJob] != 1
Also, I'd suggest first checking player's job, then launching the loop if the job is correct (not like you're doing - checking the job every loop tick). Plus breaking the loop when found the correct vehicle id wouldn't hurt.

pawn Код:
if(PlayerInfo[playerid][pJob] != 1)
{
    for(new i = 0; i <MAX_PIZZABIKES; i++)
    {
        if(vehicleid == PizzaJobVehicles[i])
        {
            SendClientMessage(playerid, COLOR_RED, "You don't have the keys of this Vehicle");
            SendClientMessage(playerid, COLOR_RED, "So you decide to step off the Pizzaboy");
           
            RemovePlayerFromVehicle(playerid);
            break; // Kill the loop.
        }
    }
}
Edit: Maybe I should learn to write faster.
Reply


Messages In This Thread
RemovePlayerFromVehicle Doesn't Work ? - by Gforcez - 26.10.2010, 16:08
Re: RemovePlayerFromVehicle Doesn't Work ? - by Cameltoe - 26.10.2010, 16:09
Re: RemovePlayerFromVehicle Doesn't Work ? - by Gforcez - 26.10.2010, 16:19
Re: RemovePlayerFromVehicle Doesn't Work ? - by xPawn - 26.10.2010, 16:27
Re: RemovePlayerFromVehicle Doesn't Work ? - by Gforcez - 26.10.2010, 16:31
Re: RemovePlayerFromVehicle Doesn't Work ? - by Hiddos - 26.10.2010, 16:38
Re: RemovePlayerFromVehicle Doesn't Work ? - by Gforcez - 26.10.2010, 16:42
Re: RemovePlayerFromVehicle Doesn't Work ? - by The_Moddler - 26.10.2010, 16:45
Re: RemovePlayerFromVehicle Doesn't Work ? - by Hiddos - 26.10.2010, 16:46
Re: RemovePlayerFromVehicle Doesn't Work ? - by Gforcez - 26.10.2010, 16:49
Re: RemovePlayerFromVehicle Doesn't Work ? - by BMUK - 26.10.2010, 16:53
Re: RemovePlayerFromVehicle Doesn't Work ? - by The_Moddler - 26.10.2010, 16:54
Re: RemovePlayerFromVehicle Doesn't Work ? - by Hiddos - 26.10.2010, 16:55
Re: RemovePlayerFromVehicle Doesn't Work ? - by Finn - 26.10.2010, 16:57
Re: RemovePlayerFromVehicle Doesn't Work ? - by The_Moddler - 26.10.2010, 16:57
Re: RemovePlayerFromVehicle Doesn't Work ? - by BMUK - 26.10.2010, 17:05
Re: RemovePlayerFromVehicle Doesn't Work ? - by The_Moddler - 26.10.2010, 17:06
Re: RemovePlayerFromVehicle Doesn't Work ? - by Gforcez - 26.10.2010, 17:13
Re: RemovePlayerFromVehicle Doesn't Work ? - by karakana7 - 26.10.2010, 18:04
Re: RemovePlayerFromVehicle Doesn't Work ? - by karakana7 - 26.10.2010, 18:34
Re: RemovePlayerFromVehicle Doesn't Work ? - by The_Moddler - 26.10.2010, 19:00
Re: RemovePlayerFromVehicle Doesn't Work ? - by karakana7 - 26.10.2010, 19:08
Re: RemovePlayerFromVehicle Doesn't Work ? - by Zonoya - 18.11.2011, 21:51
Re: RemovePlayerFromVehicle Doesn't Work ? - by BMUK - 19.11.2011, 08:46

Forum Jump:


Users browsing this thread: 5 Guest(s)