Help again please
#1

I'm using this include http://forum.sa-mp.com/showthread.ph...304#post870304

How would I be able to Detect if theres a Artic trailer and then it does artic missions then if I have a fuel tanker trailer it does fuel missions?

I would have to think it would go under this so I'll supply it for you
Код:
    if(!strcmp("/work", cmdtext, true))
    {
        new pvehiclemodel = GetVehicleModel(GetPlayerVehicleID(playerid));
        if (pvehiclemodel == 403 || pvehiclemodel == 514 || pvehiclemodel == 515)
        {
            if (IsPlayerInMission[playerid] == 1) return SendClientMessage(playerid, 0xFF0000AA, ">> You are currently in a mission use \"/cancelmission\" to cancel your current mission!"); // prevents them from starting another mission
            new string[200];
            new rand = random(sizeof(TruckingMissionRandom));
            IsPlayerInMission[playerid] = 1; // asign it to 1 becuase there in a mission
            CreatePlayerMission(playerid, TruckingMissionRandom[rand][UseTrailerCheck], TruckingMissionRandom[rand][MissionPay], TruckingMissionRandom[rand][loadx],TruckingMissionRandom[rand][loady], TruckingMissionRandom[rand][loadz], TruckingMissionRandom[rand][unloadx],TruckingMissionRandom[rand][unloady], TruckingMissionRandom[rand][unloadz]);
            format(string, sizeof(string), "You are doing mission: %s", TruckingMissionRandom[rand][MissionName]);
            SendClientMessage(playerid, 0x00FF00FF, string);
        }
        else
        {
            SendClientMessage(playerid, 0xFF0000AA, "Im sorry but this mission requires that you use a vehicle that can pull a semi trailer Ex: Roadtrain with an Artict1!");
        }
        return 1;
    }
Also,

Код:
new TruckingMissionRandom[][TruckingMissionInfo] =
{
    // {"Mission Text", UseTrailerCheck, MissionPay, loadx, loady, loadz, unloadx, unloady, unloadz}

    /* KEY:
    ** "Mission Text" = The text the player will see when he/she is doing the mission!
    ** UseTrailerCheck = Weather or not the mission requires you use a vehile that has a trailer. Ex: Roadtrain with an Artict1 trailer!
    ** MissionPay = The amount the player will recive for doing there mission!
    ** loadx, loady, and loadz = The loading coordinates of the loading checkpoint!
    ** unloadx, unloadx, unloadx = The un-loading coordinates of the unloading checkpoint!
    */
    
    {"Deliver Holy Water from LVA Freight Depot to LVA Church", true, 10000, 1701.9475,940.5465,10.8203, 1496.2524,772.1427,10.8203},
    {"Deliver Junk Car Parts from LVA Freight Depot to Shody Ottos", true, 10000, 1701.9475,940.5465,10.8203, 1727.6351,1812.1750,10.8203}
};
where the 10000 is, is the price you get for delivering that particular load, how would I make it so when they finish the mission it would be a random amount like between $10000 and $12000?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)