help me
#1

I use the command /laybanh to get pizza .
But I have a problem like this.
Код:
CMD:laybanh(playerid, params[]) {
    if(PlayerInfo[playerid][pJob] != 21 && PlayerInfo[playerid][pJob2] != 21) {
        SendClientMessageEx(playerid,COLOR_GREY,"   You are not the Pizza Boy!");
    }
    else if(!IsAPizzaCar(GetPlayerVehicleID(playerid))) {
       SendClientMessageEx(playerid,COLOR_GREY,"  You need a car for pizza delivery!");
    }
    else if(GetPlayerSkin(playerid) != 155) {
       SendClientMessageEx(playerid,COLOR_GREY,"   You must wear clothes of Pizza SF!");
    }
    else if(GetPVarType(playerid, "Pizza")) {
        SendClientMessageEx(playerid, COLOR_GREY, "   You are pizza delivery!");
    }
    else if(!IsPlayerInRangeOfPoint(playerid, 3.0, -1713.961425, 1348.545166, 7.180452)) {
        SendClientMessageEx(playerid,COLOR_GREY,"   You need to take the wheel in place Pizza SF!");
    }
    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), "You've gotten pizza delivered to %s. you have %d seconds to execute!", 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;
}
/laybanh in 2 seconds and it automatically shuts down
And I want pizza delivered at a specific default location
So how to edit this script ?
Reply
#2

Translate those message into english then i will help you
Reply
#3

Quote:
Originally Posted by PURG3D
Посмотреть сообщение
Translate those message into english then i will help you
Ok ok
Reply
#4

Quote:
Originally Posted by PURG3D
Посмотреть сообщение
Translate those message into english then i will help you
Код:
CMD:laybanh(playerid, params[]) {
    if(PlayerInfo[playerid][pJob] != 21 && PlayerInfo[playerid][pJob2] != 21) {
        SendClientMessageEx(playerid,COLOR_GREY,"   You are not the Pizza Boy!");
    }
    else if(!IsAPizzaCar(GetPlayerVehicleID(playerid))) {
       SendClientMessageEx(playerid,COLOR_GREY,"   You need a car for pizza delivery!");
    }
    else if(GetPlayerSkin(playerid) != 155) {
       SendClientMessageEx(playerid,COLOR_GREY,"   You must wear clothes of Pizza SF!");
    }
    else if(GetPVarType(playerid, "Pizza")) {
        SendClientMessageEx(playerid, COLOR_GREY, "   You are pizza delivery!");
    }
    else if(!IsPlayerInRangeOfPoint(playerid, 3.0, -1713.961425, 1348.545166, 7.180452)) {
        SendClientMessageEx(playerid,COLOR_GREY,"   You need to take the wheel in place Pizza SF!");
    }
    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), "You've gotten pizza delivered to %s. you have %d seconds to execute!", 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;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)