Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #define COLOR_GOLDEN 0x808000AA
- #define COLOR_RED 0xFF0000AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define Deliever1 2487.2710,-1401.8285,28.8374//Delievery point (XYZ)
- #define Deliever2 2442.4890,-1275.0867,24.0000
- #define Deliever3 2264.0708,-1477.3503,22.9136
- #define Deliever4 2247.8469,-1477.3064,23.3816
- #define Deliever5 2203.9053,-1471.5170,23.9844
- #define Deliever6 2243.6008,-1391.4666,23.9964
- #define Deliever7 2148.3428,-1231.8273,24.0484
- #define Deliever8 2105.2798,-1231.6610,24.0510
- #define Deliever9 1934.0765,-1125.3508,25.4342
- #define Deliever10 2000.0291,-1122.1769,26.6902
- #define Deliever11 2373.7312,-1927.7473,13.3828
- #define Refillpoint 2402.4788,-1892.4863,13.3828// Loading the hotdogs
- new hotdog = 0;
- new hotinfo;
- public OnFilterScriptInit()
- {
- AddStaticVehicle(588,2376.9824,-1928.0775,13.2822,359.4618,80,114); // HOT1car
- AddStaticVehicle(588,2380.2119,-1927.9277,13.2901,359.0749,80,114); // HOT2car
- AddStaticVehicle(588,2383.5186,-1928.0419,13.2905,359.6657,80,114); // HOT3car
- AddStaticVehicle(588,2386.5085,-1927.8275,13.2855,356.8360,80,114); // HOT4car
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/startjob", cmdtext, true, 10) == 0)
- {
- if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 588)
- {
- hotdog = 1;
- SetPlayerCheckpoint(playerid, Deliever1, 3.0);
- GameTextForPlayer(playerid, "~g~You started the job, good luck!", 3000, 3);
- new name[MAX_PLAYER_NAME], string[48];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "%s is now a Delievery boy!", name );
- SendClientMessageToAll(COLOR_RED, string);
- return 1;
- }
- SendClientMessage(playerid, COLOR_RED,"Look's like you'er not in a hotdog van!");
- }
- if (strcmp("/hotdoginfo", cmdtext, true, 10) == 0)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "You need to deliever the hotdogs to people's house.");
- SendClientMessage(playerid, COLOR_YELLOW, "There they will reward you for your help.");
- SendClientMessage(playerid, COLOR_YELLOW, "If you enter a hotdog van, type /startjob and red markers will appear.");
- SendClientMessage(playerid, COLOR_YELLOW, "Just drive to the markers and get you're reward!");
- return 1;
- }
- return 0;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 588)
- {
- if (IsPlayerInRangeOfPoint(playerid, 7.0,Deliever1))
- {
- SetPlayerCheckpoint(playerid, Deliever2, 7.0);
- GameTextForPlayer(playerid, "~g~Delievered!", 3000, 3);
- }
- if (IsPlayerInRangeOfPoint(playerid, 7.0,Deliever2))
- {
- SetPlayerCheckpoint(playerid, Deliever3, 7.0);
- GameTextForPlayer(playerid, "~g~2 Delievered!", 3000, 3);
- }
- if (IsPlayerInRangeOfPoint(playerid, 7.0,Deliever3))
- {
- SetPlayerCheckpoint(playerid, Deliever4, 7.0);
- GameTextForPlayer(playerid, "~g~3 Delievered!", 3000, 3);
- }
- if (IsPlayerInRangeOfPoint(playerid, 7.0,Deliever4))
- {
- SetPlayerCheckpoint(playerid, Deliever5, 7.0);
- GameTextForPlayer(playerid, "~g~4 Delievered!", 3000, 3);
- }
- if (IsPlayerInRangeOfPoint(playerid, 7.0,Deliever5))
- {
- SetPlayerCheckpoint(playerid, Refillpoint, 7.0);
- GameTextForPlayer(playerid, "~g~5 Hotdogs Delievered!, load more hotdogs from the marker!", 3000, 3);
- }
- if (IsPlayerInRangeOfPoint(playerid, 7.0,Refillpoint))
- {
- SetPlayerCheckpoint(playerid, Deliever6, 7.0);
- GameTextForPlayer(playerid, "~g~Hotdogs loaded!", 3000, 3);
- }
- if (IsPlayerInRangeOfPoint(playerid, 7.0,Deliever6))
- {
- SetPlayerCheckpoint(playerid, Deliever7, 7.0);
- GameTextForPlayer(playerid, "~g~6 Delievered!", 3000, 3);
- }
- if (IsPlayerInRangeOfPoint(playerid, 7.0,Deliever7))
- {
- SetPlayerCheckpoint(playerid, Deliever8, 7.0);
- GameTextForPlayer(playerid, "~g~7 Delievered!", 3000, 3);
- }
- if (IsPlayerInRangeOfPoint(playerid, 7.0,Deliever8))
- {
- SetPlayerCheckpoint(playerid, Deliever9, 7.0);
- GameTextForPlayer(playerid, "~g~8 Delievered!", 3000, 3);
- }
- if (IsPlayerInRangeOfPoint(playerid, 7.0,Deliever9))
- {
- SetPlayerCheckpoint(playerid, Deliever10, 7.0);
- GameTextForPlayer(playerid, "~g~9 Delievered!", 3000, 3);
- }
- if (IsPlayerInRangeOfPoint(playerid, 7.0,Deliever10))
- {
- SetPlayerCheckpoint(playerid, Deliever11, 7.0);
- GameTextForPlayer(playerid, "~g~10 Hotdogs delievered!, get back to the startpoint!", 3000, 3);
- }
- if (IsPlayerInRangeOfPoint(playerid, 7.0,Deliever11))
- {
- GivePlayerMoney(playerid, 5000);//Change it according to you
- GameTextForPlayer(playerid, "~g~You earned $5000,-!", 3000, 3);
- new veh;
- veh = GetPlayerVehicleID(playerid);
- SetVehicleToRespawn(veh);
- DisablePlayerCheckpoint(playerid);
- hotdog = 0;
- }
- }
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 588)
- {
- SendClientMessage(playerid, COLOR_RED, "Please type /startjob");
- }
- return 0;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- if((hotdog) == 1)
- {
- hotdog = 0;
- SendClientMessage(playerid, COLOR_RED, "[WARNING]: {FFFFFF}You have exitted hotdog's vehile! Get back to continue your delievery mission!");
- }else if((hotdog) == 0){
- //leave it blank, Dont even pee on it!
- }
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- DisablePlayerCheckpoint(playerid);
- hotdog = 0;
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == hotinfo)
- {
- GameTextForPlayer(playerid, "~g~Welcome at the Hot dog job, use /hotdoginfo to know more", 3000, 3);
- }
- }
Add Comment
Please, Sign In to add comment