07.07.2014, 10:08
(
Последний раз редактировалось maximthepain; 07.07.2014 в 10:40.
)
Hi im trying to make the /getpizza commad to work, problem is that when i execute the command it returns me "unknown command".
here is the code executed after checking if player is in the point.
Can you tell what is wrong with the command or why it doesn't execute ?
here is the code executed after checking if player is in the point.
pawn Код:
new rand = random(MAX_HOUSES - 1);
while(!(HouseInfo[rand][hExteriorZ] <= 100 && HouseInfo[rand][hExteriorX] > -2802.389648 && HouseInfo[rand][hExteriorX] < -1523.710327 && HouseInfo[rand][hExteriorY] < 1334.343750 && HouseInfo[rand][hExteriorY] > -216.298019))
{
rand++;
if(rand == 1400)
{
rand = 1;
}
}
SetPVarInt(playerid, "tpPizzaTimer", floatround((GetPizzaDistance(rand) / 80), floatround_round));
SetPVarInt(playerid, "pizzaTotal", floatround((GetPizzaDistance(rand) / 10), floatround_round));
SetPVarInt(playerid, "pizzaTimer", GetPVarInt(playerid, "pizzaTotal"));
SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_TPPIZZARUNTIMER);
SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_PIZZATIMER);
format(szMessage, sizeof(szMessage), "You have picked up a pizza for %s. You have %d seconds to deliver it!", HouseInfo[rand][hOwner], GetPVarInt(playerid, "pizzaTotal"));
SendClientMessageEx(playerid, COLOR_WHITE, szMessage);
SetPVarInt(playerid, "Pizza", rand);
PizzaBar[playerid] = CreateProgressBar(258.00, 137.00, 131.50, 3.19, COLOR_GREEN, 100.0);
SetProgressBarValue(PizzaBar[playerid], 100.0);
ShowProgressBarForPlayer(playerid, PizzaBar[playerid]);
SetPlayerCheckpoint(playerid, HouseInfo[rand][hExteriorX], HouseInfo[rand][hExteriorY], HouseInfo[rand][hExteriorZ], 5);
return 1;