Some question
#4

Thanks to all that the code 2 is working, but i got problem number 3 is when i type this code, it said the player didnt pFallintofun = 1, so it doesnt work as all

Here is the code 3
Quote:

CMD:getpizza(playerid, params[]) {
if(PlayerInfo[playerid][pJob] != 21 && PlayerInfo[playerid][pJob2] != 21) {
SendClientMessageEx(playerid,COLOR_GREY," Ban khong phai la Pizza Boy!");
}
else if(PlayerInfo[playerid][pFallIntoFun] != 0) {
SendClientMessageEx(playerid,COLOR_GREY," Ban chua nau banh pizza hoac cho banh pizza vao xe!");
}
else if(!IsAPizzaCar(GetPlayerVehicleID(playerid))) {
SendClientMessageEx(playerid,COLOR_GREY," ban can to be driving a pizzaboy found at the side of the Pizza Stack!");
}
else if(GetPlayerSkin(playerid) != 155) {
SendClientMessageEx(playerid,COLOR_GREY," ban can to be in the Pizza Stack uniform!");
}
else if(GetPVarType(playerid, "Pizza")) {
SendClientMessageEx(playerid, COLOR_GREY, " You are already delivering pizzas!");
}
else if(!IsPlayerInRangeOfPoint(playerid, 3.0, -1713.961425, 1348.545166, 7.180452)) {
SendClientMessageEx(playerid,COLOR_GREY," Ban khong phai lat the Pizza Stack pickup!");
}
else {

new rand = random(MAX_HOUSES - 1), i;
while(!(HouseInfo[rand][hOwned] && HouseInfo[rand][hExteriorZ] <= 100 && HouseInfo[rand][hExteriorX] > -2802.389648 && HouseInfo[rand][hExteriorX] < -1400.710327 && HouseInfo[rand][hExteriorY] < 2800 && HouseInfo[rand][hExteriorY] > -216.298019)) {
if(++rand >= MAX_HOUSES) {
rand = 0;
}
if (i++ > MAX_HOUSES) return 1;
}

new
iDist = floatround(GetPlayerDistanceFromPoint(playerid, HouseInfo[rand][hExteriorX], HouseInfo[rand][hExteriorY], HouseInfo[rand][hExteriorZ])),
szMessage[86];

SetPVarInt(playerid, "tpPizzaTimer", iDist / 80);
SetPVarInt(playerid, "pizzaTotal", iDist / 10);
SetPVarInt(playerid, "pizzaTimer", iDist / 10);
SetPVarInt(playerid, "Pizza", rand);

SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_TPPIZZARUNTIMER);
SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_PIZZATIMER);

format(szMessage, sizeof(szMessage), "ban da picked up a pizza for %s. ban da %d seconds to deliver it!", StripUnderscore(HouseInfo[rand][hOwnerName]), iDist / 10);
SendClientMessageEx(playerid, COLOR_WHITE, szMessage);

SetPlayerCheckpoint(playerid, HouseInfo[rand][hExteriorX], HouseInfo[rand][hExteriorY], HouseInfo[rand][hExteriorZ], 5);
}
return 1;
}

And the string for code 1 and code 2
Quote:

}
else if(PlayerInfo[playerid][pFallIntoFun] != 0) {
SendClientMessageEx(playerid,COLOR_GREY," Ban chua nau banh pizza hoac cho banh pizza vao xe!");

Reply


Messages In This Thread
Some question - by LuisPark - 07.02.2015, 14:23
Re: Some question - by HazardouS - 07.02.2015, 14:27
Re: Some question - by Tamy - 07.02.2015, 14:28
Re: Some question - by LuisPark - 07.02.2015, 14:48

Forum Jump:


Users browsing this thread: 1 Guest(s)