Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <zcmd>
- #define FILTERSCRIPT
- #define COLOR_GREEN 0x33AA33FF
- #define COLOR_YELLOW 0xFFFF00FF
- #define COLOR_RED 0xFF0606FF
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Trucker Job - Created by Cena44(Timon) ");
- print("--------------------------------------\n");
- CreateVehicle(414, 2512.1653, -2117.0974, 13.4788, 0.0000, 27, 78, 3000);
- CreateVehicle(414, 2506.7500, -2116.7947, 13.4788, 0.0000, 41, 42, 3000);
- CreateVehicle(414, 2482.2327, -2116.6165, 13.4788, 0.0000, 48, 72, 3000);
- CreateVehicle(456, 2463.3999, -2116.1843, 13.5200, 0.0000, 46, 89, 3000);
- CreateVehicle(456, 2457.8191, -2115.6475, 13.5200, 0.0000, 78, 27, 3000);
- CreateVehicle(456, 2488.4919, -2116.3032, 13.5200, 0.0000, 24, 78, 3000);
- CreatePickup(1239, 1, 2485.4292,-2120.2351,13.5469, 0); // Boxer Job
- Create3DTextLabel("Trucks Depot\n{FFFF00}/loadtruck to get load the truck", COLOR_RED, 2485.4292,-2120.2351,13.5469, 15, 0, 1);
- CreatePickup(1239, 1, 2460.3623,-2119.8494,13.5530, 0); // Boxer Job
- Create3DTextLabel("Trucks Depot\n{FFFF00}/loadtruck to get load the truck", COLOR_RED, 2460.3623,-2120.2351,13.5469, 15, 0, 1);
- CreatePickup(1239, 1, 2509.6421,-2120.6365,13.5469, 0); // Boxer Job
- Create3DTextLabel("Trucks Depot\n{FFFF00}/loadtruck to get load the truck", COLOR_RED, 2509.6421,-2120.2351,13.5469, 15, 0, 1);
- return 1;
- }
- CMD:loadtruck(playerid, params[])
- {
- if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_RED, "You are not driving a truck from the depot.");
- if(!IsPlayerInRangeOfPoint(playerid, 7.5, 2485.4292,-2120.2351,13.5469) && !IsPlayerInRangeOfPoint(playerid, 7.5, 2460.3623,-2119.8494,13.5530)
- && !IsPlayerInRangeOfPoint(playerid, 7.5, 2509.6421,-2120.6365,13.5469))
- {
- SendClientMessage(playerid, COLOR_RED, "You are not near the loading place.");
- return 1;
- }
- {
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Welcome to the factory, what would you like to deliver?", "{00B000}Drinks and Food($500) \n{00B000}Clothing($1000) \n{A70000}Drugs($1500) \n{A70000}Illegal Fire Arms($2000)", "Load Truck", "Cancel");
- return 1;
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(response)// They pressed the first button.
- {
- switch(dialogid)
- {
- case 1:// Our dialog!
- {
- switch(listitem)// Checking which listitem was selected
- {
- case 0:// The first item listed
- {
- if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash to buy this products.");
- GivePlayerMoney(playerid, -500);
- SetPlayerCheckpoint(playerid, 2121.4949,-1781.8108,13.5618, 5.0);
- SendClientMessage(playerid, COLOR_YELLOW, "You have loaded some Food and drinks crates, deliver them to the Well Stacked Pizza Co. to get your pay. (Checkpoint)");
- }
- case 1: // The second item listed
- {
- if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash to buy this products.");
- GivePlayerMoney(playerid, -1000);
- SetPlayerCheckpoint(playerid, 2247.8418,-1661.3953,15.5455, 5.0);
- SendClientMessage(playerid, COLOR_YELLOW, "You have loaded some Clothes Boxes, deliver them to Binco to get your pay. (Checkpoint)");
- }
- case 2: // The third item listed
- {
- if(GetPlayerMoney(playerid) < 1500) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash to buy this products.");
- GivePlayerMoney(playerid, -1500);
- SetPlayerCheckpoint(playerid, 2517.2693,-1274.5581,34.9548, 5.0);
- SendClientMessage(playerid, COLOR_YELLOW, "You have loaded some drug packages, deliver them to the Drug factory to get your pay. (Checkpoint)");
- }
- case 3: // The fourth item listed
- {
- if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash to buy this products.");
- GivePlayerMoney(playerid, -2000);
- SetPlayerCheckpoint(playerid, 1362.9902,-1279.9124,13.6332, 5.0);
- SendClientMessage(playerid, COLOR_YELLOW, "You have loaded some weapon crates, deliver them to the Ammu-Nation to get your pay. (Checkpoint)");
- }
- }
- }
- }
- }
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- if(!IsPlayerInVehicle(playerid, 2) && !IsPlayerInVehicle(playerid, 3) && !IsPlayerInVehicle(playerid, 4) && !IsPlayerInVehicle(playerid, 1)
- && !IsPlayerInVehicle(playerid, 5) && !IsPlayerInVehicle(playerid, 6))
- {
- SendClientMessage(playerid,COLOR_RED,"You are not in the delivery truck.");
- return 1;
- }
- if(IsPlayerInRangeOfPoint(playerid,5,2121.4949,-1781.8108,13.5618)) // Food and Drinks
- {
- SendClientMessage(playerid, COLOR_GREEN, "You have delivered the products and got payed $1000, good job.");
- GivePlayerMoney(playerid, 1000);
- DisablePlayerCheckpoint(playerid);
- }
- if(IsPlayerInRangeOfPoint(playerid,5,2247.8418,-1661.3953,15.5455)) // Clothing
- {
- SendClientMessage(playerid, COLOR_GREEN, "You have delivered the products and got payed $2000, good job.");
- GivePlayerMoney(playerid, 2000);
- DisablePlayerCheckpoint(playerid);
- }
- if(IsPlayerInRangeOfPoint(playerid,5,2517.2693,-1274.5581,34.9548)) // Drugs
- {
- SendClientMessage(playerid, COLOR_GREEN, "You have delivered the products and got payed $3000, good job.");
- GivePlayerMoney(playerid, 3000);
- DisablePlayerCheckpoint(playerid);
- }
- if(IsPlayerInRangeOfPoint(playerid,5,1362.9902,-1279.9124,13.6332)) // Illegal Fire Arms
- {
- SendClientMessage(playerid, COLOR_GREEN, "You have delivered the products and got payed $4000 and a special weapon with some bullets, good job.");
- GivePlayerMoney(playerid, 4000);
- GivePlayerWeapon(playerid, 24, 50);
- DisablePlayerCheckpoint(playerid);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement