03.02.2017, 02:56
When the player types /work but IsLoaded is false. You cannot load your truck . How can i send a message saying. You cannot over load your truck inside this command? called /overload
Код:
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] = { //{1, 2054.6843,1928.2374,12.1540, "(LV) Book Store", "Books", 2492.5366,2773.2190,10.80422, "K.A.C", 1500}, //{2, 2492.5366,2773.2190,10.80422, "K.A.C", "Books", 2054.6843,1928.2374,12.1540, "(LV) Book Store", 2500}, {1, 2420.6235,-2464.2495,13.6250, "Los Santos Warehouse", "Weapons", 1538.4180,-1674.5314,13.5469, "Los Santos Police Station", 3000, false}, {2, 2244.0317,47.0715,26.4844, "General Store", "Food", 1931.9788,-1776.5302,13.3828, "Los Santos Gas Station", 3000} };
Код:
CMD:overload(playerid, params[]) { SendMessageToAdmins(playerid, "/overload", params); if (GetPlayerTeam(playerid) == 1) { new m = GetVehicleModel(GetPlayerVehicleID(playerid)); if(m == 514 || m == 515 || m == 403 || m == 455) { new t = GetVehicleModel(GetVehicleTrailer(GetPlayerVehicleID(playerid))); if (t == 435 || t == 450 || t == 584 || m == 455) { if (GetPlayerVehicleSeat(playerid) == 0) { new Message[180]; format(Message, sizeof(Message), "Your truck is over loaded! Watch Out for the police!"); SendClientMessage(playerid, -1, Message); TruckLoad[playerid] = 1; } else { SendClientMessage(playerid, COLOUR_LIGHTGREEN, "You are not the driver of this vehicle"); } } else { SendClientMessage(playerid, COLOUR_LIGHTGREEN, "You do not have a trailer, please go and attach one!"); } } else { SendClientMessage(playerid, COLOUR_LIGHTGREEN, "You are not in a truck, please go and get one!"); } } return 1; }