RemovePlayerFromVehicle Doesn't Work ?
#19

Quote:
Originally Posted by Finn
Посмотреть сообщение
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.
Guys, can you explain, because i want to know, what actually means from this line:if(PlayerInfo[playerid][pJob] != 1):[pJob] and !=1?I only saw =1 per my scripting time...And i don't understand the whole line: for(new i = 0; i <MAX_PIZZABIKES; i++) :can someone say what it is used for?I understand that new i is variable and now it has integer 0 inside itself, but what it gives i don't know.Is this code i<MAX_PIZZABIKES only checks if all pizza boy bikes number is lower than variable i?So why it need than?And for me it's unclear how bikes number can be lower than variable i if variable is only 0, so there's no bikes? And the last thing about that is code i++ what actually it does?!Big thanks for the help and don't say anything like go and learn yourself boy.Write what you know about what i asking.
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: 2 Guest(s)