Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <streamer>
- #include <zcmd>
- #include <sscanf2>
- #define FILTERSCRIPT
- #define COLOR_GREEN 0x33AA33FF
- #define COLOR_YELLOW 0xFFFF00FF
- #define COLOR_RED 0xFF0606FF
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Fedex Job By Yossef Jones Loaded succefully) ");
- print("--------------------------------------\n");
- CreateVehicle(498,2003.6852,-2062.4607,13.6162,272.4785,175, 1, 3000); //
- CreateVehicle(498,2003.5945,-2072.5898,13.6143,271.0529,175, 1, 3000); //
- CreateVehicle(498,2002.6908,-2083.2813,13.6147,274.0793,175, 1, 3000); //
- CreateVehicle(498,2002.6356,-2094.5154,13.6129,270.5332,175, 1, 3000); //
- CreateVehicle(498,2056.2456,-2062.3354,13.6143,88.4719,175, 1, 3000); //
- CreateVehicle(498,2057.6702,-2073.3960,13.6138,91.3654,175, 1, 3000); //
- CreateVehicle(498,2057.0466,-2083.6025,13.6147,92.1287,175, 1, 3000); //
- CreateVehicle(498,2056.8689,-2094.3564,13.6162,92.3437,175, 1, 3000); //
- CreatePickup(1239, 1, 2043.6608,-2059.1238,13.5469, 0); // Boxer Job
- Create3DTextLabel("Fedex Depot\n{FFFF00}/loadfedex to get load the truck", COLOR_RED, 2043.6608,-2059.1238,13.5469, 15, 0, 1);
- CreatePickup(1239, 1, 2017.8900,-2059.8333,13.5469, 0); // Boxer Job
- Create3DTextLabel("Fedex Depot\n{FFFF00}/loadfedex to get load the truck", COLOR_RED, 2017.8900,-2059.8333,13.5469, 15, 0, 1);
- CreatePickup(1239, 1, 2031.0453,-2054.4619,13.5469, 0); // Boxer Job
- Create3DTextLabel("Fedex Depot\n{FFFF00}/loadfedex to get load the truck", COLOR_RED, 2031.0453,-2054.4619,13.5469, 15, 0, 1);
- return 1;
- }
- CMD:loadfedex(playerid, params[])
- {
- if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_RED, "You are not driving a Fedex truck from the depot.");
- if(!IsPlayerInRangeOfPoint(playerid, 7.5, 2043.6608,-2059.1238,13.5469) && !IsPlayerInRangeOfPoint(playerid, 7.5, 2017.8900,-2059.8333,13.5469)
- && !IsPlayerInRangeOfPoint(playerid, 7.5, 2031.0453,-2054.4619,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;
- }
- 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.");
- GivePlayerCash(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.");
- GivePlayerCash(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.");
- GivePlayerCash(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.");
- GivePlayerCash(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) && !IsPlayerInVehicle(playerid, 7) && !IsPlayerInVehicle(playerid, 8))
- {
- 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 ...(legal)
- {
- SendClientMessage(playerid, COLOR_GREEN, "You have delivered the products and got payed $1000, good job.");
- SendClientMessage(playerid, COLOR_GREEN, "Get Back The Truck To Fedex Warehouse as Fast as you can !");
- GivePlayerCash(playerid, 1000);
- DisablePlayerCheckpoint(playerid);
- }
- if(IsPlayerInRangeOfPoint(playerid,5,2247.8418,-1661.3953,15.5455)) // Clothing ...(legal)
- {
- SendClientMessage(playerid, COLOR_GREEN, "You have delivered the products and got payed $2000, good job.");
- SendClientMessage(playerid, COLOR_GREEN, "Get Back The Truck To Fedex Warehouse as Fast as you can !");
- GivePlayerCash(playerid, 2000);
- DisablePlayerCheckpoint(playerid);
- }
- if(IsPlayerInRangeOfPoint(playerid,5,2517.2693,-1274.5581,34.9548)) // Drugs ...(illegal)
- {
- SendClientMessage(playerid, COLOR_GREEN, "You have delivered the products and got payed $3000, good job.");
- SendClientMessage(playerid, COLOR_GREEN, "Get Back The Truck To Fedex Warehouse as Fast as you can !");
- GivePlayerCash(playerid, 3000);
- DisablePlayerCheckpoint(playerid);
- }
- if(IsPlayerInRangeOfPoint(playerid,5,1362.9902,-1279.9124,13.6332)) // Illegal Fire Arms ... (illegal)
- {
- SendClientMessage(playerid, COLOR_GREEN, "You have delivered the products and got payed $4000 and a special weapon with some bullets, good job.");
- SendClientMessage(playerid, COLOR_GREEN, "Get Back The Truck To Fedex Warehouse as Fast as you can !");
- GivePlayerCash(playerid, 4000);
- GivePlayerWeaponEx(playerid, 22, 50);
- DisablePlayerCheckpoint(playerid);
- }
- return 1;
- }
- //============[Stock]==========
- stock GivePlayerCash(playerid, money)
- {
- SetPVarInt(playerid, "Cash", GetPVarInt(playerid, "Cash")+money);
- GivePlayerMoney(playerid, money);
- return 1;
- }
- stock ResetPlayerCash(playerid)
- {
- SetPVarInt(playerid, "Cash", 0);
- return 1;
- }
- stock GivePlayerWeaponEx(playerid, gun, ammo)
- {
- new weapons[13], ammovar[13];
- for(new i = 0; i < 13; i++)
- {
- GetPlayerWeaponData(playerid, i, weapons[i], ammovar[i]);
- }
- ResetPlayerWeapons(playerid);
- for(new i = 0; i < 13; i++)
- {
- if(i != 4) GivePlayerWeapon(playerid, weapons[i], ammovar[i]);//
- }
- GivePlayerWeapon(playerid, gun, ammo);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement