Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- //textdraws
- new Text: LoadText;
- new Text: LoadingText;
- //job
- new StartingDeliveryJob[256];
- //colors
- #define COLOR_GREY 0xB4B5B7FF
- new X_DeliveryPay[][] =// Delivery Job Random Pay Amount, you can change it if you want.
- {
- {142},
- {147},
- {144},
- {149},
- {138},
- {152},
- {154},
- {145}
- };
- new Float: X_DeliveryCheckpoints[][7] =// Delivery Job Checkpoints
- {
- {1837.9658,-1832.2373,13.5854}, // Unity 24/7
- {2235.0100,-1724.6320,13.5497}, // Ganton Gym
- {2305.2690,-1640.0338,14.4774}, // Ten Green Bottles
- {2412.6970,-1481.5623,23.8281}, // East Los Santos Cluckin' Bell
- {2431.3489,-1224.8230,25.3842}, // Pig Pen
- {788.9443,-1612.3558,13.3828}, // Marina Burger Shot
- {363.5080,-2030.5432,7.8359} // Store on docks
- };
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("tuss's delivery job loaded.");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Blank Gamemode by your name here");
- print("----------------------------------\n");
- }
- #endif
- public OnGameModeInit()
- {
- // Don't use these lines if it's a filterscript
- SetGameModeText("Blank Script");
- AddPlayerClass(0, 1821.2747,-1127.3339,24.0781,17.0622, 0, 0, 0, 0, 0, 0);
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerPos(playerid, 1821.2747,-1127.3339,24.0781);
- SetPlayerCameraPos(playerid, 1821.2747,-1127.3339,24.0781);
- SetPlayerCameraLookAt(playerid, 1821.2747,-1127.3339,24.0781);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- // textdraws that display when user types /load
- LoadingText = TextDrawCreate(75,312,"~g~ITEMS LOADING...~n~~w~ Please wait.");
- TextDrawAlignment(LoadingText, 2);
- TextDrawBackgroundColor(LoadingText, 255);
- TextDrawFont(LoadingText, 1);
- TextDrawLetterSize(LoadingText, 0.200000, 0.700000);
- TextDrawColor(LoadingText, -1);
- TextDrawSetOutline(LoadingText, 1);
- TextDrawSetProportional(LoadingText, 1);
- TextDrawSetShadow(LoadingText, 1);
- LoadText = TextDrawCreate(75,312,"~g~ITEMS LOADED:~n~~w~ Deliver them to the checkpoints.");
- TextDrawAlignment(LoadText, 2);
- TextDrawBackgroundColor(LoadText, 255);
- TextDrawFont(LoadText, 1);
- TextDrawLetterSize(LoadText, 0.200000, 0.700000);
- TextDrawColor(LoadText, -1);
- TextDrawSetOutline(LoadText, 1);
- TextDrawSetProportional(LoadText, 1);
- TextDrawSetShadow(LoadText, 1);
- StartingDeliveryJob[playerid] = 0;
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- StartingDeliveryJob[playerid] = 0;
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/load", cmdtext, true, 10) == 0)
- {
- new
- rand = random(sizeof(X_DeliveryCheckpoints));
- if(StartingDeliveryJob[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_GREY, "You are already doing the delivery job");
- return 1;
- }
- if(!IsPlayerInRangeOfPoint(playerid, 7, 1822.7450,-1145.6880,23.9617))
- {
- SetPlayerCheckpoint(playerid, 1822.7450,-1145.6880,23.9617, 4);
- SendClientMessage(playerid, COLOR_GREY, "You are not at the item pickup point. It has been marked on your map.");
- return 1;
- }
- if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 543)
- {
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- StartingDeliveryJob[playerid] = 1;
- SetPlayerCheckpoint(playerid, X_DeliveryCheckpoints[rand][0], X_DeliveryCheckpoints[rand][1], X_DeliveryCheckpoints[rand][2], 4);
- SendClientMessage(playerid, COLOR_GREY, "You have loaded some items into your sadler.");
- TogglePlayerControllable(playerid, 0);
- TextDrawShowForPlayer(playerid,LoadingText);
- SetTimer("GetLoadingText", 3000, false);
- PlayerPlaySound(playerid, 1130, 0.0, 0.0, 10.0);
- return 1;
- }
- }
- }
- SendClientMessage(playerid, COLOR_GREY, "You are not in a sadler.");
- return 1;
- }
- return 0;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- if(StartingDeliveryJob[playerid])
- {
- StartingDeliveryJob[playerid] = 0;
- DisablePlayerCheckpoint(playerid);
- GameTextForPlayer(playerid, "~r~Stopped delivering.", 3000, 4);
- }
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 543)
- {
- if(StartingDeliveryJob[playerid] == 1)
- {
- new
- rand = random(sizeof(X_DeliveryCheckpoints)), msg[128];
- format(msg, sizeof(msg), "You have received $%d from delivering the items. Go back to the item pickup to get more!", X_DeliveryPay[rand][0]);
- SendClientMessage(playerid, COLOR_GREY, msg);
- GivePlayerMoney(playerid, X_DeliveryPay[rand][0]);
- StartingDeliveryJob[playerid] = 0;
- DisablePlayerCheckpoint(playerid);
- }
- }
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnVehicleMod(playerid, vehicleid, componentid)
- {
- return 1;
- }
- public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- {
- return 1;
- }
- public OnVehicleRespray(playerid, vehicleid, color1, color2)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- return 1;
- }
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- return 1;
- }
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamOut(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- forward GetLoadingText(playerid);
- public GetLoadingText(playerid)
- {
- TogglePlayerControllable(playerid, 1);
- TextDrawHideForPlayer(playerid,LoadingText);
- TextDrawShowForPlayer(playerid,LoadText);
- SetTimer("GetLoadText", 4000, false);
- return 1;
- }
- forward GetLoadText(playerid);
- public GetLoadText(playerid)
- {
- TextDrawHideForPlayer(playerid,LoadText);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement