SetPlayerCheckpoint -
babecka - 30.07.2014
PHP код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new Veh = GetPlayerVehicleID(playerid);
if(Veh == 448)
{
if(pInfo[playerid][IsPlayerPizzaboy] == true)
{
new rand = random(sizeof(pizzaDelivery));
SetPlayerCheckpoint(playerid, pizzaDelivery[rand][0], pizzaDelivery[rand][1], pizzaDelivery[rand][2], 3.0);
}
}
return 1;
}
This is my code, however, the checkpoint does not appear. No errors, warnings.
Re: SetPlayerCheckpoint -
IceBilizard - 30.07.2014
did you make cords of checkpoints?
example
pawn Код:
new Float:pizzaDelivery[][] =
{
{Here cords}
};
Re: SetPlayerCheckpoint -
Clad - 30.07.2014
Are you sure you did enter Pizza Boi Vehicle ?
Re: SetPlayerCheckpoint -
ViniBorn - 30.07.2014
Replace
pawn Код:
new Veh = GetPlayerVehicleID(playerid);
pawn Код:
new Veh = GetVehicleModel(GetPlayerVehicleID(playerid));
Re: SetPlayerCheckpoint -
Jefff - 30.07.2014
Should be
if( GetVehicleModel( Veh ) == 448 )
Re: SetPlayerCheckpoint -
Clad - 30.07.2014
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(GetVehicleModel(vehicleid) == 448)
{
if(pInfo[playerid][IsPlayerPizzaboy] == true)
{
new rand = random(sizeof(pizzaDelivery));
SetPlayerCheckpoint(playerid, pizzaDelivery[rand][0], pizzaDelivery[rand][1], pizzaDelivery[rand][2], 3.0);
}
}
return 1;
}
This work fine, I'm pretty sure, You have something wrong with that random coordinates.
Re: SetPlayerCheckpoint -
babecka - 30.07.2014
I've tried everything, but nothing works.
Re: SetPlayerCheckpoint -
Blademaster680 - 30.07.2014
Make sure your Float: pizzaDelivery is set to 3 values.Could you show use you "new Float: pizzaDelivery" please
Re: SetPlayerCheckpoint -
babecka - 31.07.2014
PHP код:
static Float:pizzaDelivery[20][3] =
{
{-2378.9978, 1317.8741, 16.0611},
{-2354.7102, 1263.6869, 26.2144},
{-2371.4929, 1115.6329, 55.7266},
{-2458.6606, 1133.6754, 55.7266},
{-2577.2249, 1145.5917, 55.7266},
{-2599.4448, 969.2170, 78.2836},
{-2570.1301, 916.1848, 64.9844},
{-2431.5283, 899.6009, 50.3249},
{-2376.6199, 784.3533, 35.1719},
{-2322.2085, 816.2351, 45.1090},
{-2550.1704, 800.8972, 49.9844},
{-2576.6282, 816.7575, 49.9844},
{-2614.7183, 830.7467, 49.9844},
{-2659.8044, 806.1754, 49.9844},
{-2684.9578, 819.2595, 49.9844},
{-2743.6890, 865.4532, 64.7907},
{-2744.2253, 747.0092, 50.2130},
{-2841.5918, 692.1365, 23.0355},
{-2861.0640, 812.6411, 38.8102},
{-2846.4707, 970.3076, 43.6686}
};
I've also tried this:
PHP код:
static Float:pizzaDelivery[][] =
{
{-2378.9978, 1317.8741, 16.0611},
{-2354.7102, 1263.6869, 26.2144},
{-2371.4929, 1115.6329, 55.7266},
{-2458.6606, 1133.6754, 55.7266},
{-2577.2249, 1145.5917, 55.7266},
{-2599.4448, 969.2170, 78.2836},
{-2570.1301, 916.1848, 64.9844},
{-2431.5283, 899.6009, 50.3249},
{-2376.6199, 784.3533, 35.1719},
{-2322.2085, 816.2351, 45.1090},
{-2550.1704, 800.8972, 49.9844},
{-2576.6282, 816.7575, 49.9844},
{-2614.7183, 830.7467, 49.9844},
{-2659.8044, 806.1754, 49.9844},
{-2684.9578, 819.2595, 49.9844},
{-2743.6890, 865.4532, 64.7907},
{-2744.2253, 747.0092, 50.2130},
{-2841.5918, 692.1365, 23.0355},
{-2861.0640, 812.6411, 38.8102},
{-2846.4707, 970.3076, 43.6686}
};
It still doesn't work.