Player not getting the same mission
#10

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
Yes, you need a variable to track what mission the player is doing, but it only needs to be the number of the mission. right now you only have 0, 1, and 2 as options for the IDs of the missions.
won't work. i don't know if im doing this current




Код:
forward Trucker1(playerid);
public Trucker1(playerid)
{
    new rand = random(sizeof(trucker));
    new newtext2[MAX_PLAYERS];
    PlayerInfo[playerid][StartingPoint] = rand;
    PlayerInfo[playerid][MissionID] = trucker[rand][mission_id];
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid, trucker[rand][lx], trucker[rand][ly], trucker[rand][lz], 10);
    format(newtext2,sizeof(newtext2), "~w~Head to ~r~%s ~w~to load your trailer with ~y~%s", trucker[rand][lpname], trucker[rand][loadname]);
    PlayerTextDrawSetString(playerid, work[playerid],newtext2);
}
Код:
CMD:convoy(playerid, params[])
{
    new targetid;
    new missionid = PlayerInfo[targetid][MissionID];
    SendMessageToAdmins(playerid, "/convoy", params);
    if(sscanf(params, "u",targetid)) return SendClientMessage(playerid, -1, "{FF0000}USAGE: {FFFFFF}/convoy [playerid]");
    if(GetPlayerTeam(playerid) == 1)
    {
        new m = GetVehicleModel(GetPlayerVehicleID(playerid));
        if(m == 455 || m == 515 || m == 403 || m == 514)
        {
            new t = GetVehicleModel(GetVehicleTrailer(GetPlayerVehicleID(playerid)));
            if( m == 455 || t == 435 || t == 450 || t == 584 )
            {
                if (GetPlayerVehicleSeat(playerid) == 0)
                {
					new string[128];
                    format(string,sizeof(string),"%s has joined your convoy", ReturnName(playerid));
				    SendClientMessage(targetid,-1,string);
				    
                    format(string,sizeof(string),"You joined %s convoy", ReturnName(targetid));
				    SendClientMessage(playerid,-1,string);
				    
                    new ConvoyDisplay[MAX_PLAYERS];
                    DisablePlayerCheckpoint(playerid);
                    SetPlayerCheckpoint(playerid, trucker[missionid][lx], trucker[missionid][ly], trucker[missionid][lz], 10);
                    format(ConvoyDisplay,sizeof(ConvoyDisplay), "~w~Head to ~r~%s ~w~to load your trailer with ~y~%s", trucker[missionid][lpname], trucker[missionid][loadname]);
                    PlayerTextDrawSetString(playerid, work[playerid], ConvoyDisplay);
                    truck_PlayerJob[playerid] = 1;
                }
                else
                {
  		            SendClientMessage(playerid, WORK, "You are not the driver of this vehicle");
                }
            }
            else
            {
  		        SendClientMessage(playerid, WORK, "You do not have the correct trailer, please go and attach one!");
            }
        }
        else
        {
            SendClientMessage(playerid, WORK, "You are not in a truck, please go and get one!");
        }
    }
    return 1;
}
Reply


Messages In This Thread
Player not getting the same mission - by DerickClark - 11.02.2017, 01:41
Re: Player not getting the same mission - by DerickClark - 11.02.2017, 13:21
Re: Player not getting the same mission - by Sew_Sumi - 11.02.2017, 16:20
Re: Player not getting the same mission - by DerickClark - 11.02.2017, 16:22
Re: Player not getting the same mission - by Sew_Sumi - 11.02.2017, 16:25
Re: Player not getting the same mission - by DerickClark - 11.02.2017, 16:35
Re: Player not getting the same mission - by Sew_Sumi - 11.02.2017, 17:20
Re: Player not getting the same mission - by DerickClark - 11.02.2017, 21:05
Re: Player not getting the same mission - by Sew_Sumi - 12.02.2017, 02:16
Re: Player not getting the same mission - by DerickClark - 12.02.2017, 02:30

Forum Jump:


Users browsing this thread: 1 Guest(s)