User wont get same mission - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: User wont get same mission (
/showthread.php?tid=502145)
User wont get same mission -
Private200 - 22.03.2014
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.
Re: User wont get same mission -
Private200 - 22.03.2014
First page pls.
Re: User wont get same mission -
MP2 - 22.03.2014
Wait 24 hours to bump.
Re: User wont get same mission -
Private200 - 22.03.2014
Okay, but can you please give any kind of solution?..
Re: User wont get same mission -
DerickClark - 22.03.2014
Same...
Re: User wont get same mission -
Private200 - 23.03.2014
Bump. ETA: Almost a day.
Re: User wont get same mission -
DerickClark - 29.03.2014
maybe MisRand = random mission that turns to randon mission not PlayerMission
I have same problem. that makes the rand missions. not the player mission.