14.01.2013, 20:03
What should i do that after i come to that delivery checkpoint that he sends me back to return the truck to factory to recieve the paycheck..?
Код:
public OnFilterScriptInit() { CreateVehicle(414, 2512.1653, -2117.0974, 13.4788, 0.0000, 27, 78, 3000); CreateVehicle(414, 2506.7500, -2116.7947, 13.4788, 0.0000, 41, 42, 3000); CreateVehicle(414, 2482.2327, -2116.6165, 13.4788, 0.0000, 48, 72, 3000); CreateVehicle(456, 2463.3999, -2116.1843, 13.5200, 0.0000, 46, 89, 3000); CreateVehicle(456, 2457.8191, -2115.6475, 13.5200, 0.0000, 78, 27, 3000); CreateVehicle(456, 2488.4919, -2116.3032, 13.5200, 0.0000, 24, 78, 3000); CreatePickup(1239, 1, 2485.4292,-2120.2351,13.5469, 0); Create3DTextLabel("Factory pickup\n{FFFF00}/loadtruck to get load the truck", COLOR_RED, 2485.4292,-2120.2351,13.5469, 15, 0, 1); CreatePickup(1239, 1, 2460.3623,-2119.8494,13.5530, 0); Create3DTextLabel("Factory pickup\n{FFFF00}/loadtruck to get load the truck", COLOR_RED, 2460.3623,-2120.2351,13.5469, 15, 0, 1); CreatePickup(1239, 1, 2509.6421,-2120.6365,13.5469, 0); Create3DTextLabel("Factory pickup\n{FFFF00}/loadtruck to get load the truck", COLOR_RED, 2509.6421,-2120.2351,13.5469, 15, 0, 1); return 1; } CMD:loadtruck(playerid, params[]) { if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_RED, "You are not driving the factory truck."); if(!IsPlayerInRangeOfPoint(playerid, 7.5, 2485.4292,-2120.2351,13.5469) && !IsPlayerInRangeOfPoint(playerid, 7.5, 2460.3623,-2119.8494,13.5530) && !IsPlayerInRangeOfPoint(playerid, 7.5, 2509.6421,-2120.6365,13.5469)) { SendClientMessage(playerid, COLOR_RED, "You are not near the loading place."); return 1; } { ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What would you like to deliver?", "{00B000}Drinks and Food \n{00B000}Clothes \n{A70000}Drugs \n{A70000}Weapons", "Load truck", "Cancel"); return 1; } } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(response)// They pressed the first button. { switch(dialogid) { case 1:// { switch(listitem)// Checking which listitem was selected { case 0:// The first item listed { SetPlayerCheckpoint(playerid, 2121.4949,-1781.8108,13.5618, 5.0); SendClientMessage(playerid, COLOR_YELLOW, "*Your truck is loaded with Food And Drinks, deliver them them to destiantion to recieve your pay.. (Checkpoint)"); } case 1: // The second item listed { SetPlayerCheckpoint(playerid, 2247.8418,-1661.3953,15.5455, 5.0); SendClientMessage(playerid, COLOR_YELLOW, "*Your truck is Loaded with Clothes, deliver them to destiantion to recieve your pay. (Checkpoint)"); } case 2: // The third item listed { SetPlayerCheckpoint(playerid, 2517.2693,-1274.5581,34.9548, 5.0); SendClientMessage(playerid, COLOR_RED, "**Be avare that you are transporting illegal goods and risk of getting arrested."); SendClientMessage(playerid, COLOR_YELLOW, "*Your truck is loaded with drug packages, deliver them to destination to recieve your pay. (Checkpoint)"); } case 3: // The fourth item listed { SetPlayerCheckpoint(playerid, 1362.9902,-1279.9124,13.6332, 5.0); SendClientMessage(playerid, COLOR_RED, "**Be avare that you are transporting illegal goods and risk of getting arrested.(But also getting bonus!)"); SendClientMessage(playerid, COLOR_YELLOW, "*Your truck is loaded with weapons, deliver them to destination to recieve 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)) { 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 { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have delivered the products and recieved $1000, good job. *"); GivePlayerMoney(playerid, 1000); DisablePlayerCheckpoint(playerid); } if(IsPlayerInRangeOfPoint(playerid,5,2247.8418,-1661.3953,15.5455)) // Clothing { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have delivered the products and recieved $1000, good job. *"); GivePlayerMoney(playerid, 1000); DisablePlayerCheckpoint(playerid); } if(IsPlayerInRangeOfPoint(playerid,5,2517.2693,-1274.5581,34.9548)) // Drugs { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have delivered the products and recieved $3000, good job. *"); GivePlayerMoney(playerid, 3000); DisablePlayerCheckpoint(playerid); } if(IsPlayerInRangeOfPoint(playerid,5,1362.9902,-1279.9124,13.6332)) // Illegal Fire Arms { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have delivered the products and recieved $4000 with a special weapon, good job. *"); GivePlayerMoney(playerid, 4000); GivePlayerWeapon(playerid, 24, 99999); DisablePlayerCheckpoint(playerid); } return 1; }