PDA

View Full Version : IsPlayerInVehicle


JhnzRep
06/04/2012, 02:59 AM
Hi, this script compiles without a problem. But when I'm on a pizzabike, and use the command. It keeps saying "You must first get on a bike".

cmd(pizzadelivery, playerid, params[])
{
if(PlayerInfo[playerid][pJob] != 1) return SCM(playerid, GREY, "You are not a pizza boy.");
if(pDelivery[playerid] != 0) return SCM(playerid, GREY, "You are already in a delivery");
if(IsPlayerInVehicle(playerid, 448))
{
SCM(playerid, YELLOW, "You are now on a pizza delivery, go to your first checkpoint");
SetPlayerCheckpoint(playerid, 2330.5681,157.6443,26.6214, 5);
pDelivery[playerid] = 1;
}
else
{
SCM(playerid, GREY, "You must first get on a Pizza Boy bike.");
}
return 1;
}

ViniBorn
06/04/2012, 03:03 AM
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 448)

JhnzRep
06/04/2012, 03:25 AM
Thanks, repped.