new rand = random(sizeof(PizzaDeliveryLocation));
PizzaJobCheckpoint = CreateDynamicCP(PizzaDeliveryLocation[rand][0],PizzaDeliveryLocation[rand][1],PizzaDeliveryLocation[rand][2], 0, 0, .streamdistance = 200.0);
#define PIZZA_CHECKPOINTS 24
new Float:PizzaDeliveryLocation[PIZZA_CHECKPOINTS][4] = {
{2065.9780,-1703.4775,14.1484,90.8956},
{2068.2600,-1656.4601,13.5469,86.9378},
{2068.8579,-1643.8237,13.5469,90.3844}
};
CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 100.0);
PizzaJobCheckpoint = CreateDynamicCP(PizzaDeliveryLocation[rand][0],PizzaDeliveryLocation[rand][1],PizzaDeliveryLocation[rand][2], 5, 0, 0, .streamdistance = 200.0);
CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 100.0);
x = coord x y = coord y z = coord z size = size of the CreateDynamicCP (5.0) worldid = virtual world interiorid = interiorid playerid = ID distance = default (100.0)
sizeof(PizzaDeliveryLocation)
new Float:PizzaDeliveryLocation[][3] = {
{2065.9780 ,-1703.4775 ,14.1484},
{2068.2600 ,-1656.4601 ,13.5469},
{2068.8579 ,-1643.8237 ,13.5469},
{2068.7437 ,-1628.9187 ,13.8762}
};
PizzaJobCheckpoint = CreateDynamicCP(PizzaDeliveryLocation[rand][0],PizzaDeliveryLocation[rand][1],PizzaDeliveryLocation[rand][2], 5, 0, 0, playerid, .streamdistance = 200.0);
I followed both tips:
pawn Код:
pawn Код:
|
new Float:PizzaDeliveryLocation[][] =
{
{2065.9780, -1703.4775, 14.1484},
{2068.2600, -1656.4601, 13.5469},
{2068.8579, -1643.8237, 13.5469},
{2068.7437, -1628.9187, 13.8762}
};
PizzaJobCheckpoint = CreateDynamicCP(PizzaDeliveryLocation[rand][0],PizzaDeliveryLocation[rand][1],PizzaDeliveryLocation[rand][2], 5.0, -1, -1, -1, 9999999999.0);