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
#2

First page pls.
Reply
#3

Wait 24 hours to bump.
Reply
#4

Okay, but can you please give any kind of solution?..
Reply
#5

Same...
Reply
#6

Bump. ETA: Almost a day.
Reply
#7

maybe MisRand = random mission that turns to randon mission not PlayerMission
I have same problem. that makes the rand missions. not the player mission.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)