{0, 2054.6843,1928.2374,12.1540, "(LV) Book Store", "Books", 2492.5366,2773.2190,10.80422, "K.A.C", 1500}, {1, 2492.5366,2773.2190,10.80422, "K.A.C", "Books", 2054.6843,1928.2374,12.1540, "(LV) Book Store", 2500},
enum pInfo { pAdmin, pWork, StartingPoint, EndingPoint, MissionID, ID, Password[129], Score, Money, personalmsg[129], bool:LoggedIn } new PlayerInfo[MAX_PLAYERS][pInfo]; enum MissionData { mission_id, Float:lx, Float:ly, Float:lz, lpname[64], loadname[256], Float:ux, Float:uy, Float:uz, ulpname[256], cost, bool:IsLoaded } static const trucker[][MissionData] = { // Template: {lx, ly, lz, lpname, loadname, ux, uy, uz, upname, cost}, // Dont include comma on last!!!! {0, 2054.6843,1928.2374,12.1540, "(LV) Book Store", "Books", 2492.5366,2773.2190,10.80422, "K.A.C", 1500}, {1, 2492.5366,2773.2190,10.80422, "K.A.C", "Books", 2054.6843,1928.2374,12.1540, "(LV) Book Store", 2500}, {2, 2420.6235,-2464.2495,13.6250, "Los Santos Warehouse", "Weapons", 1538.4180,-1674.5314,13.5469, "Los Santos Police Station", 3000, false}, {3, 2244.0317,47.0715,26.4844, "General Store", "Food", 1931.9788,-1776.5302,13.3828, "Los Santos Gas Station", 3000}, {4, -2029.1902,-2403.2869,30.6250 , "Angel Pine Place", "Logs", 2208.2058,-2243.5767,13.5469, "Los Santos Warehouse", 3000, false} };
public OnPlayerEnterCheckpoint(playerid) { new loading[MAX_PLAYERS]; if(GetPlayerTeam(playerid) == 1) { if(IsPlayerInAnyVehicle(playerid)) { switch(truck_PlayerJob[playerid]) { case 1: { truck_PlayerJob[playerid] = -1; TogglePlayerControllable(playerid, 0); SetTimerEx("Trucker2", 30000, false, "i", playerid); format(loading,sizeof(loading), "~r~Loading... ~w~Please wait..."); PlayerTextDrawSetString(playerid, work[playerid], loading); new Message[100]; format(Message,sizeof(Message), "Loading..."); SendClientMessage(playerid, WORK, Message); format(Message,sizeof(Message), "Please wait"); SendClientMessage(playerid, WORK, Message); } case 2, 3: { truck_PlayerJob[playerid] = 3; TogglePlayerControllable(playerid, 0); SetTimerEx("Trucker3", 30000, false, "i", playerid); format(loading,sizeof(loading), "~r~Unloading... ~w~Please wait..."); PlayerTextDrawSetString(playerid, work[playerid], loading); new Message[100]; format(Message,sizeof(Message), "Unloading..."); SendClientMessage(playerid, WORK, Message); format(Message,sizeof(Message), "Please wait"); SendClientMessage(playerid, WORK, Message); } } return 1; } } return 1; }
forward Trucker1(playerid); public Trucker1(playerid) { new rand = random(sizeof(trucker)); new newtext2[MAX_PLAYERS]; PlayerInfo[playerid][MissionID] = trucker[rand][mission_id]; PlayerInfo[playerid][StartingPoint] = rand; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, trucker[rand][lx], trucker[rand][ly], trucker[rand][lz], 5.0); 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); } forward Trucker2(playerid); public Trucker2(playerid) { DisablePlayerCheckpoint(playerid); new missionid = PlayerInfo[playerid][MissionID]; TogglePlayerControllable(playerid, 1); SetPlayerCheckpoint(playerid, trucker[missionid][ux], trucker[missionid][uy], trucker[missionid][uz], 10); truck_PlayerJob[playerid] = 2; new workmission2[250]; format(workmission2,sizeof(workmission2), "~w~Now Head To ~r~%s ~w~To Unload The ~y~%s", trucker[missionid][ulpname], trucker[missionid][loadname]); PlayerTextDrawSetString(playerid, work[playerid], workmission2); } forward Trucker3(playerid); public Trucker3(playerid) { new End = PlayerInfo[playerid][StartingPoint]; new string[144]; format(string,sizeof(string),"%s has delivered %s from %s to %s", ReturnName(playerid), trucker[End][loadname], trucker[End][lpname], trucker[End][ulpname]); SendClientMessageToAll(-1, string); print(string); DisablePlayerCheckpoint(playerid); new Message[90]; if(TruckLoad[playerid] == 0) { SetPlayerScore(playerid, GetPlayerScore(playerid) + 1); format(Message, sizeof(Message), "You completed the mission and earned $%i and 1 points in a Roadtrain", trucker[End][cost]); SendClientMessage(playerid, -1, Message); GivePlayerMoney(playerid, trucker[End][cost]); } else if(TruckLoad[playerid] == 1) { SetPlayerScore(playerid, GetPlayerScore(playerid) + 2); format(Message, sizeof(Message), "You completed the mission and earned $%i and 2 points in a Roadtrain", trucker[End][cost]*2); SendClientMessage(playerid, -1, Message); GivePlayerMoney(playerid, trucker[End][cost]*2); print(Message); } PlayerInfo[playerid][MissionID] = -1; TruckLoad[playerid] = 0; TogglePlayerControllable(playerid, 1); truck_PlayerJob[playerid] = 0; new workmission[250]; format(workmission,sizeof(workmission), "~w~You Are Not On a Mission - Type ~r~/Work ~w~To Begin"); PlayerTextDrawSetString(playerid, work[playerid], workmission); } CMD:work(playerid, params[]) { SendMessageToAdmins(playerid, "/work", params); 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) { Trucker1(playerid); truck_PlayerJob[playerid] = 1; //truckchecktime = SetTimerEx("TruckCheck", 1000, true, "i", giveplayerid); } else { SendClientMessage(playerid, WORK, "You are not the driver of this vehicle"); } } else { SendClientMessage(playerid, WORK, "You do not have a trailer, please go and ATTACH one!"); } } else { SendClientMessage(playerid, WORK, "You are not in a TRUCK, please go and get one!"); } } return 1; }
CMD:convoy(playerid, params[]) { new targetid; SendMessageToAdmins(playerid, "/convoy", params); if(sscanf(params, "u",targetid)) return SendClientMessage(playerid, -1, "{FF0000}USAGE: {FFFFFF}/convoy [playerid]"); //targetid = strval(params); new missionid = PlayerInfo[targetid][MissionID]; // add this after the "sscanf" 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]; truck_PlayerJob[playerid] = 1; 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); } 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; }
Why did you make a new topic, you should've bumped the old one as this directly relates to it, and we're all subscribed to that one.
|
So. they can get on track with this code. what i'm facing. Cause this the update of the code now.
|
But they're less likely to see it as it's in another thread, that they aren't subscribed to... Many of this issues problems will relate to what was said in that thread...
|
Responses like .... make people not want to help you, as I've been hinting at through this thread... Especially when this issue corresponds to your original issue where those who were attempting to join a convoy, weren't getting the same mission.
|
where those who were attempting to join a convoy, weren't getting the same mission.
|
As I said, if you kept it to one thread, as it's related, all who were subscribed to your first thread, would have had it pop up, not have to browse and re-read a heap of shit to figure out your problem...
|