User wont get same mission
#1

pawn Код:
stock T_NewJob(playerid)
{
    new vID = GetPlayerVehicleID(playerid), string[2000];
    if(GetVehicleModel(vID)== 403 || GetVehicleModel(vID)== 515 || GetVehicleModel(vID) == 514)
    {
        if(IsTrailerAttachedToVehicle(vID))
        {
            if(GetVehicleModel(GetVehicleTrailer(vID)) == 435)
            {
                if(PlayerInfo[playerid][pConvoy] > 0)
                {
                    for(new i = 0; i < MAX_PLAYERS; i++)
                    {
                        if(PlayerInfo[i][pConvoy] == PlayerInfo[playerid][pConvoy])
                        {
                            MissionStatus[i] = 1;
                            new MisRand = random(sizeof(MisLocationsCargo));
                            new LoadText[128], MissionText[128], Float:x, Float:y, Float:z;
                            x = MisLocationsCargo[MisRand][LoadX];
                            y = MisLocationsCargo[MisRand][LoadY];
                            z = MisLocationsCargo[MisRand][LoadZ];
                            unx[i] = MisLocationsCargo[MisRand][UnloadX];
                            uny[i] = MisLocationsCargo[MisRand][UnloadY];
                            unz[i] = MisLocationsCargo[MisRand][UnloadZ];
                            iPay[i] = MisLocationsCargo[MisRand][Pay];
                            SetPlayerCheckpoint(i, x, y, z, 7);
                            format(LoadText, 128, "%s", MisLocationsCargo[MisRand][LoadName]);
                            format(MissionText, 128, "~w~%s", MisLocationsCargo[MisRand][LoadName]);
                            PlayerInfo[i][pWork] = 1;
                            format(string, 2000, "{259400}Mission: {FFFFFF}%s", LoadText);
                            SendClientMessage(i, 0xFFFFFFFF, string);
                            PlayerTextDrawSetString(i, Mission[i], MissionText);
                        }
                    }
                }
                else
                {
                    MissionStatus[playerid] = 1;
                    new MisRand = random(sizeof(MisLocationsCargo));
                    new LoadText[128], MissionText[128], Float:x, Float:y, Float:z;
                    x = MisLocationsCargo[MisRand][LoadX];
                    y = MisLocationsCargo[MisRand][LoadY];
                    z = MisLocationsCargo[MisRand][LoadZ];
                    unx[playerid] = MisLocationsCargo[MisRand][UnloadX];
                    uny[playerid] = MisLocationsCargo[MisRand][UnloadY];
                    unz[playerid] = MisLocationsCargo[MisRand][UnloadZ];
                    iPay[playerid] = MisLocationsCargo[MisRand][Pay];
                    SetPlayerCheckpoint(playerid, x, y, z, 7);
                    format(LoadText, 128, "%s", MisLocationsCargo[MisRand][LoadName]);
                    format(MissionText, 128, "~w~%s", MisLocationsCargo[MisRand][LoadName]);
                    PlayerInfo[playerid][pWork] = 1;
                    format(string, 2000, "{259400}Mission: {FFFFFF}%s", LoadText);
                    SendClientMessage(playerid, 0xFFFFFFFF, string);
                    PlayerTextDrawSetString(playerid, Mission[playerid], MissionText);
                }
            }
            else
            {
                SendClientMessage(playerid, -1, "You are not pulling a correct type of trailer");
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_RED, "Error: You must attach a trailer to your truck or the trailer attached is not used for job.");
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_RED, "Error: You must be in a truck to perform this!");
    }
    return 1;
}
This is my code, but I do not know why users will not get same mission. I mean, it gives mission to everyone with the same pConvoy just that it wont give same.
Reply


Messages In This Thread
User wont get same mission - by Private200 - 22.03.2014, 13:51
Re: User wont get same mission - by Private200 - 22.03.2014, 14:54
Re: User wont get same mission - by MP2 - 22.03.2014, 23:03
Re: User wont get same mission - by Private200 - 22.03.2014, 23:08
Re: User wont get same mission - by DerickClark - 22.03.2014, 23:32
Re: User wont get same mission - by Private200 - 23.03.2014, 20:11
Re: User wont get same mission - by DerickClark - 29.03.2014, 19:18

Forum Jump:


Users browsing this thread: 3 Guest(s)