Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /////////Job FilterScript by Rangerxxll///////////
- ////////Feel free to edit it in any way. I'm not worried about credits, this took me 10 minutes to make/////////
- ////////V1.00, I plan on adding more jobs to it. Such as a flying job, pizza boy, mail man, and all of that.//////
- /////// Check my Forums post to stay updated, on forum.sa-mp.com//////////
- // Includes.
- #include <a_samp>
- #include <sscanf2>
- #include <zcmd>
- //Defining the checkpoints
- #define startcp 2460.6772,-2120.8718,13.5530
- #define cp1 2376.2813,-1906.0054,13.3828
- #define cp2 2445.0811,-1761.3519,13.5865
- #define cp3 2475.5999,-1528.2408,24.0023
- #define cp4 2421.6868,-1223.6115,25.2789
- //color
- #define COLOR_LIGHTCYAN 0xAAFFCC33
- #define COLOR_BLUEGREEN 0x46BBAA00
- #define COLOR_RED 0xAA3333AA
- //variable for checkpoints
- new atcp[MAX_PLAYERS];
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Job Filterscript by Rangerxxll(Luke)");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnGameModeInit()
- {
- CreatePickup(1318,1,2460.6772,-2120.8718,13.5530,0);
- Create3DTextLabel("Trucker Job Starting Position. /work to begin.", COLOR_RED, 2460.6772,-2120.8718,13.5530, 40.0, 0, 0);
- AddStaticVehicleEx(498,2484.60009766,-2117.19995117,13.80000019,0.00000000,-1,-1,15); //Boxville
- AddStaticVehicleEx(498,2508.60009766,-2116.19995117,13.80000019,0.00000000,-1,-1,15); //Boxville
- AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- return 1;
- }
- // You can easily change the color of the Text Label. Just edit "COLOR_RED" to whatever suites you best.
- //You can also add more vehicles, feel free to map more Boxvilles. (ID 408)
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- 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("/mycommand", cmdtext, true, 10) == 0)
- {
- // Do something here
- return 1;
- }
- return 0;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- if(atcp[playerid] == 1)
- {
- atcp[playerid] = 2;
- TogglePlayerControllable(playerid, 0);
- SendClientMessage(playerid, COLOR_LIGHTCYAN, "Unloading, please wait...");
- SetTimerEx("cp1unload", 5000, false, "i", playerid);
- return 1;
- }
- if(atcp[playerid] == 2)
- {
- atcp[playerid] = 3;
- TogglePlayerControllable(playerid, 0);
- SendClientMessage(playerid, COLOR_LIGHTCYAN, "Unloading, please wait...");
- SetTimerEx("cp2unload", 5000, false, "i", playerid);
- return 1;
- }
- if(atcp[playerid] == 3)
- {
- atcp[playerid] = 4;
- TogglePlayerControllable(playerid, 0);
- SendClientMessage(playerid, COLOR_LIGHTCYAN, "Unloading, please wait...");
- SetTimerEx("cp3unload", 5000, false, "i", playerid);
- return 1;
- }
- if(atcp[playerid] == 4)
- {
- atcp[playerid] = 0;
- SendClientMessage(playerid, COLOR_LIGHTCYAN, "You have earned your money. Congratulations. +7500$");
- GivePlayerMoney(playerid, 7500);
- return 1;
- }
- return 1;
- }
- forward cp1unload(playerid);
- public cp1unload(playerid)
- {
- TogglePlayerControllable(playerid, 1);
- SendClientMessage(playerid, COLOR_BLUEGREEN, "Unloading Complete. Proceed to the next checkpoint.");
- SetPlayerCheckpoint(playerid, cp2, 4.0);
- return 1;
- }
- forward cp2unload(playerid);
- public cp2unload(playerid)
- {
- TogglePlayerControllable(playerid, 1);
- SendClientMessage(playerid, COLOR_BLUEGREEN, "Unloading Complete. Proceed to the next checkpoint.");
- SetPlayerCheckpoint(playerid, cp3, 4.0);
- return 1;
- }
- forward cp3unload(playerid);
- public cp3unload(playerid)
- {
- TogglePlayerControllable(playerid, 1);
- SendClientMessage(playerid, COLOR_BLUEGREEN, "Unloading Complete. Proceed to the last checkpoint to retrieve your paycheck.");
- SetPlayerCheckpoint(playerid, startcp, 4.0);
- 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;
- }
- CMD:work(playerid, params[])
- {
- if(IsPlayerInRangeOfPoint(playerid, 4.0, startcp))
- {
- if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 498)
- {
- if(atcp[playerid] == 0)
- {
- atcp[playerid] = 1;
- SetPlayerCheckpoint(playerid, cp1, 4.0);
- SendClientMessage(playerid, COLOR_LIGHTCYAN, "Congratulations, you have started the job. Proceed to the checkpoints.");
- return 1;
- }
- }
- else SendClientMessage(playerid, COLOR_RED, "You're not in a Boxville. Please pick one up at the Trucker Job.");
- }
- else SendClientMessage(playerid, COLOR_RED, "You're not near the Truck Job.");
- return 1;
- }
- CMD:tp(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "Administrators only.");
- {
- SetPlayerPos(playerid, startcp);
- return 1;
- }
- }
- //WILL BE UPDATED FREQUENTLY, STAY UPDATED ON THE FORUMS//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement