Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- /*
- // Configuration
- */
- #define PosX -1584.3655 // Delivery Pos X
- #define PosY 94.5996 // Delivery Pos Y
- #define PosZ 3.2397 // Delivery Pos Z
- #define C_Size 7.0 // Checkpoint size
- #define MTime 60000 // 10 min
- #define VAmount 2 // How many models to select
- #define S_C_Command "/export" // The command to Set the checkpoint again
- #define A_C_Command "/abort" // The command to hide the checkpoint (Aborting the mission)
- #define COLOR_STR 0xFFEEEEFF
- new Vmodel[] = {
- 400, 500, 530, 531
- };
- /*
- // Script begins here!
- */
- new VehInUse[VAmount];
- forward Delivery();
- new VehicleNames[][] = {
- "Landstalker","Bravura","Buffalo","Linerunner","Pereniel","Sentinel","Dumper","Firetruck","Trashmaster","Stretch","Manana","Infernus",
- "Voodoo","Pony","Mule","Cheetah","Ambulance","Leviathan","Moonbeam","Esperanto","Taxi","Washington","Bobcat","Mr Whoopee","BF Injection",
- "Hunter","Premier","Enforcer","Securicar","Banshee","Predator","Bus","Rhino","Barracks","Hotknife","Trailer","Previon","Coach","Cabbie",
- "Stallion","Rumpo","RC Bandit","Romero","Packer","Monster","Admiral","Squalo","Seasparrow","Pizzaboy","Tram","Trailer","Turismo","Speeder",
- "Reefer","Tropic","Flatbed","Yankee","Caddy","Solair","Berkley's RC Van","Skimmer","PCJ-600","Faggio","Freeway","RC Baron","RC Raider",
- "Glendale","Oceanic","Sanchez","Sparrow","Patriot","Quad","Coastguard","Dinghy","Hermes","Sabre","Rustler","ZR3 50","Walton","Regina",
- "Comet","BMX","Burrito","Camper","Marquis","Baggage","Dozer","Maverick","News Chopper","Rancher","FBI Rancher","Virgo","Greenwood",
- "Jetmax","Hotring","Sandking","Blista Compact","Police Maverick","Boxville","Benson","Mesa","RC Goblin","Hotring Racer A","Hotring Racer B",
- "Bloodring Banger","Rancher","Super GT","Elegant","Journey","Bike","Mountain Bike","Beagle","Cropdust","Stunt","Tanker","RoadTrain",
- "Nebula","Majestic","Buccaneer","Shamal","Hydra","FCR-900","NRG-500","HPV1000","Cement Truck","Tow Truck","Fortune","Cadrona","FBI Truck",
- "Willard","Forklift","Tractor","Combine","Feltzer","Remington","Slamvan","Blade","Freight","Streak","Vortex","Vincent","Bullet","Clover",
- "Sadler","Firetruck","Hustler","Intruder","Primo","Cargobob","Tampa","Sunrise","Merit","Utility","Nevada","Yosemite","Windsor","Monster A",
- "Monster B","Uranus","Jester","Sultan","Stratum","Elegy","Raindance","RC Tiger","Flash","Tahoma","Savanna","Bandito","Freight","Trailer",
- "Kart","Mower","Duneride","Sweeper","Broadway","Tornado","AT-400","DFT-30","Huntley","Stafford","BF-400","Newsvan","Tug","Trailer A","Emperor",
- "Wayfarer","Euros","Hotdog","Club","Trailer B","Trailer C","Andromada","Dodo","RC Cam","Launch","Police Car (LSPD)","Police Car (SFPD)",
- "Police Car (LVPD)","Police Ranger","Picador","S.W.A.T. Van","Alpha","Phoenix","Glendale","Sadler","Luggage Trailer A","Luggage Trailer B",
- "Stair Trailer","Boxville","Farm Plow","Utility Trailer"
- };
- public OnFilterScriptInit()
- {
- print("\nSF Delivery loaded!");
- SetTimer("Delivery", MTime, true);
- return 1;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid)
- {
- new vc = GetVehicleModel(vehicleid);
- for(new i=0; i <= VAmount; i++)
- {
- if(VehInUse[i]==vc)
- {
- SendClientMessageToAll(COLOR_STR, "The San Fierro Export Company is looking for a:");
- SendClientMessageToAll(COLOR_STR, VehicleNames[i - 400]);
- SendClientMessageToAll(COLOR_STR, "So take this or another vehicle of the same model to The San Fierro Export Company");
- SendClientMessageToAll(COLOR_STR, " ");
- new str[128];
- format(str, sizeof(str), "Hint: If the checkpoint disapears, use %s to activate it again.", S_C_Command);
- SendClientMessageToAll(COLOR_STR, str);
- SendClientMessageToAll(COLOR_STR, " ");
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpoint(playerid, PosX, PosY, PosZ, C_Size);
- }
- }
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp(A_C_Command, cmdtext, true)==0)
- {
- DisablePlayerCheckpoint(playerid);
- return 1;
- }
- if(strcmp(S_C_Command, cmdtext, true)==0)
- {
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpoint(playerid, PosX, PosY, PosZ, C_Size);
- return 1;
- }
- return 0;
- }
- public Delivery()
- {
- for(new b=0; b <= VAmount; b++) VehInUse[b]=0;
- new mkay=0;
- for(new i=0; i <= VAmount; i++)
- {
- if(VehInUse[i]==0)
- {
- VehInUse[i]=Vmodel[random(sizeof(Vmodel))];
- mkay++;
- }
- }
- if(mkay > 0) SendClientMessageToAll(COLOR_STR, "The San Fierro Export Company is currently looking for:");
- for(mkay=0; mkay < VAmount; mkay++)
- {
- SendClientMessageToAll(COLOR_STR, VehicleNames[VehInUse[mkay] - 400]);
- }
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vc = GetVehicleModel(GetPlayerVehicleID(playerid));
- for(new i=0; i <= VAmount; i++)
- {
- if(VehInUse[i]==vc)
- {
- VehInUse[i]=0;
- SendClientMessageToAll(COLOR_STR, "You have successfully deliverd a:");
- SendClientMessageToAll(COLOR_STR, VehicleNames[i - 400]);
- SendClientMessageToAll(COLOR_STR, "To The San Fierro Export Company!.");
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement