Raised This Month: $ Target: $400
 0% 

delivery problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
rutger177
New Member
Join Date: Mar 2014
Old 04-01-2014 , 07:19   delivery problem
Reply With Quote #1

Hi I have a problem
I do not get it done

My delivery is working half
I can start it, but when I come to red point
nothing happens

I can not complete the delivery mission

I have script attached

I hope you know more

thanks

mvg Rutger

//============================================= =================================
dcmd_courier(playerid,params[])
{
#pragma unused params
if (PlayerInfo[playerid][pSpawn] == 1)
{
if (PlayerInfo[playerid][pTeam] != TEAM_LAW && PlayerInfo[playerid][pVigilante] != 1)
{
if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(PlayerInfo[playerid][pWantedLevel] == 0)
{
if (PlayerInfo[playerid][pMission] == MISSION_TYPE_TRUCK_1 || PlayerInfo[playerid][pMission] == MISSION_TYPE_TRUCK_1)
{
SendClientMessage(playerid, COLOR_ERROR, "You Cannot Begin A Courier Mission During A Truck Delivery.");
return 1;
}
if (PlayerInfo[playerid][pMission] <= MISSION_TYPE_POLICE_RESPOND)
{

new string[256],modelid = GetVehicleModel(GetPlayerVehicleID(playerid)) ;

if (IsLandVehicle(modelid))
{

new Mission = random(sizeof(CourierMissionInfo));
PlayerInfo[playerid][pMissionSlot] = Mission;
//format(string, sizeof(string), "Pickup The Goods From %s In %s",CourierMissionInfo[Mission][cm_pkup_location],CourierMissionInfo[Mission][cm_pkup_location_cont]);
//SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, string);

ShowTextDrawMenu(playerid, TD_MENU_INFO,"~b~Courier Mission", 6, 0);
format(string, sizeof(string), "Pickup The Goods~n~At The ~b~%s~n~~w~In ~p~%s~n~~w~Enter The ~r~Checkpoint ~w~At The Destination~n~~w~Press ~y~2 ~w~For Delivery Information~n~~w~Type ~y~/cancel ~w~To Cancel Delivery",CourierMissionInfo[Mission][cm_pkup_location],CourierMissionInfo[Mission][cm_pkup_location_cont]);
ShowTextDrawMenuItems(playerid, 0, string, " ", " ",0);
GameTextForPlayer(playerid,"~w~COURIER MISSION PICK UP AT THE~n~~r~CHECKPOINT",5000,3);
TextDrawSetString(StatsDisplay[playerid], "~b~Courier Mission ~w~- Pickup Goods");
PlayerInfo[playerid][pMissionMinute] = 0;
PlayerInfo[playerid][pMissionHour] = 5;
PlayerInfo[playerid][pMission] = MISSION_TYPE_COURIER_1;
SetPlayerRaceCheckpoint(playerid, 2, CourierMissionInfo[Mission][cm_pkup_cp_x],CourierMissionInfo[Mission][cm_pkup_cp_y],CourierMissionInfo[Mission][cm_pkup_cp_z], 0,0,0, 3);
TextDrawShowForPlayer(playerid, StatsDisplay[playerid]);

}else{
SendClientMessage(playerid, COLOR_ERROR, "You Cannot Deliver Goods In This Vehicle. You Must Be In A Land Vehicle.");
}
}else{
if (PlayerInfo[playerid][pMission] == MISSION_TYPE_COURIER_1 || PlayerInfo[playerid][pMission] == MISSION_TYPE_COURIER_2)
{
new string[256],Mission = PlayerInfo[playerid][pMissionSlot];
//format(string, sizeof(string), "Pickup The Goods From %s In %s",CourierMissionInfo[Mission][cm_pkup_location],CourierMissionInfo[Mission][cm_pkup_location_cont]);
//SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, string);
ShowTextDrawMenu(playerid, TD_MENU_INFO,"~b~Courier Mission", 6, 0);
format(string, sizeof(string), "Pickup The Goods~n~At The ~b~%s~n~~w~In ~p~%s~n~~w~Enter The ~r~Checkpoint ~w~At The Destination~n~~w~Press ~y~2 ~w~For Delivery Information~n~~w~Type ~y~/cancel ~w~To Cancel Delivery",CourierMissionInfo[Mission][cm_pkup_location],CourierMissionInfo[Mission][cm_pkup_location_cont]);
ShowTextDrawMenuItems(playerid, 0, string, " ", " ",0);
}else{
SendClientMessage(playerid, COLOR_ERROR, "You Are Already On A Mission.");
}
}
}else{
SendClientMessage(playerid, COLOR_ERROR, "You Cannot Start A Courier Mission With A Wanted Level.");
}
}else{
SendClientMessage(playerid, COLOR_ERROR, "You Must Be Driving A Vehicle To Deliver Goods.");
}
}else{
SendClientMessage(playerid, COLOR_ERROR, "Law Enforcement Agents Cannot Do Courier Missions.");
}
}else{
SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You Are Dead.");
}
return 1;
}
//============================================= =================================
dcmd_delivery(playerid,params[])
{
#pragma unused params
if (PlayerInfo[playerid][pSpawn] == 1)
{
if (PlayerInfo[playerid][pTeam] != TEAM_LAW && PlayerInfo[playerid][pVigilante] != 1)
{

if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(PlayerInfo[playerid][pWantedLevel] == 0)
{
if (PlayerInfo[playerid][pMission] == MISSION_TYPE_COURIER_1 || PlayerInfo[playerid][pMission] == MISSION_TYPE_COURIER_2)
{
SendClientMessage(playerid, COLOR_ERROR, "You Cannot Begin A Truck Delivery During A Courier Mission.");
return 1;
}
if (PlayerInfo[playerid][pMission] <= MISSION_TYPE_POLICE_RESPOND)
{
new string[256],modelid = GetVehicleModel(GetPlayerVehicleID(playerid)) ;

if (IsLandVehicle(modelid) && IsDeliveryVehicle(modelid))
{
//Truck Delivery
//Sub-Mission Key or by typing /delivery
//There are various types of delivery trucks in CnR: Benson, Boxville, Cement Truck, DFT-30, Dumper, Dune, Flatbed, Linerunner, Mule, Packer, Pony, Roadtrain, Tanker and Yankee.

new Mission = random(sizeof(TruckMissionInfo));
PlayerInfo[playerid][pMissionSlot] = Mission;
//format(string, sizeof(string), "Pickup The Goods From %s",TruckMissionInfo[Mission][tm_pkup_location]);
//SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, string);
ShowTextDrawMenu(playerid, TD_MENU_INFO,"~b~Truck Delivery", 7, 0);
format(string, sizeof(string), "Pickup The Goods~n~At ~b~%s~n~~w~Enter The ~r~Checkpoint ~w~At The Destination~n~Pickup Bonus: ~g~$11568~n~ ~n~~w~Press ~y~2 ~w~For Delivery Information~n~~w~Type ~y~/cancel ~w~To Cancel Delivery",TruckMissionInfo[Mission][tm_pkup_location]);
ShowTextDrawMenuItems(playerid, 0, string, " ", " ",0);
//format(string, sizeof(string), "");
//TextDrawSetString(Menu_StatsCont[playerid], string);
//TextDrawShowForPlayer(playerid, Menu_StatsCont[playerid])
GameTextForPlayer(playerid,"~w~DELIVERY MISSION PICK UP AT THE~n~~r~CHECKPOINT",5000,3);
TextDrawSetString(StatsDisplay[playerid], "~b~Delivery Mission ~w~- Pickup Goods");
PlayerInfo[playerid][pMissionMinute] = 0;
PlayerInfo[playerid][pMissionHour] = 5;
PlayerInfo[playerid][pMission] = MISSION_TYPE_TRUCK_1;
SetPlayerRaceCheckpoint(playerid, 2, TruckMissionInfo[Mission][tm_pkup_cp_x],TruckMissionInfo[Mission][tm_pkup_cp_y],TruckMissionInfo[Mission][tm_pkup_cp_z], 0,0,0, 3);
TextDrawShowForPlayer(playerid, StatsDisplay[playerid]);
}else{
SendClientMessage(playerid, COLOR_ERROR, "You Cannot Deliver Goods In This Vehicle. You Must Be In A Delivery Truck.");
}
}else{
if (PlayerInfo[playerid][pMission] == MISSION_TYPE_TRUCK_1 || PlayerInfo[playerid][pMission] == MISSION_TYPE_TRUCK_1)
{
new string[256],Mission = PlayerInfo[playerid][pMissionSlot];
//format(string, sizeof(string), "Pickup The Goods From %s In %s",CourierMissionInfo[Mission][cm_pkup_location],CourierMissionInfo[Mission][cm_pkup_location_cont]);
//SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, string);
ShowTextDrawMenu(playerid, TD_MENU_INFO,"~b~Courier Mission", 6, 0);
format(string, sizeof(string), "Pickup The Goods~n~At The ~b~%s~n~~w~In ~p~%s~n~~w~Enter The ~r~Checkpoint ~w~At The Destination~n~~w~Press ~y~2 ~w~For Delivery Information~n~~w~Type ~y~/cancel ~w~To Cancel Delivery",CourierMissionInfo[Mission][cm_pkup_location],CourierMissionInfo[Mission][cm_pkup_location_cont]);
ShowTextDrawMenuItems(playerid, 0, string, " ", " ",0);
}else{
SendClientMessage(playerid, COLOR_ERROR, "You Are Already On A Mission.");
}
}
}else{
SendClientMessage(playerid, COLOR_ERROR, "You Cannot Start A Delivery Mission With A Wanted Level.");
}
}else{
SendClientMessage(playerid, COLOR_ERROR, "You Must Be Driving A Delivery Truck To Deliver Goods.");
}
}else{
SendClientMessage(playerid, COLOR_ERROR, "Law Enforcement Agents Cannot Do Delivery Missions.");
}
}else{
SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You Are Dead.");
}
return 1;
}
//============================================= =================================
/*dcmd_delivery(playerid, params[])
{
#pragma unused params
if (PlayerInfo[playerid][pSpawn] == 1){
//if (PlayerInfo[playerid][pRaceCheckpoint] == RACE_CP_TYPE_COURIER_PICKUP || PlayerInfo[playerid][pRaceCheckpoint] == RACE_CP_TYPE_COURIER_DELIVERY)
if (PlayerInfo[playerid][pMission] == MISSION_TYPE_TRUCK_1 || PlayerInfo[playerid][pMission] == MISSION_TYPE_TRUCK_1)
{

PlayerInfo[playerid][pMission] = 0;
PlayerInfo[playerid][pRaceCheckpoint] = 0;
DisablePlayerRaceCheckpoint(playerid);
TextDrawHideForPlayer(playerid, StatsDisplay[playerid]);

GameTextForPlayer(playerid,"DELIVERY MISSION CANCELLED", 5000, 3);
SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "You Have Cancelled Your Current Delivery.");

return 1;
}

if (PlayerInfo[playerid][pMission] == 0)
{

PlayerInfo[playerid][pRaceCheckpoint] = 0;
PlayerInfo[playerid][pMission] = 0;
PlayerInfo[playerid][pMissionSlot] = 0;

PlayerInfo[playerid][pHoldup] = 0;
PlayerInfo[playerid][pHoldupHour] = 0;
PlayerInfo[playerid][pHoldupMinute] = 0;
PlayerInfo[playerid][pHoldupAmount] = 0;
PlayerInfo[playerid][pMission] = 0;
PlayerInfo[playerid][pRaceCheckpoint] = 0;
DisablePlayerRaceCheckpoint(playerid);
TextDrawHideForPlayer(playerid, StatsDisplay[playerid]);
}

}else{
SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You're Dead.");
}
return 1;
}*/
//============================================= =================================
dcmd_cancel(playerid, params[])
{
#pragma unused params
if (PlayerInfo[playerid][pSpawn] == 1){
if (PlayerInfo[playerid][pMission] == MISSION_TYPE_TRUCK_1 || PlayerInfo[playerid][pMission] == MISSION_TYPE_TRUCK_2 || PlayerInfo[playerid][pMission] == MISSION_TYPE_COURIER_1 || PlayerInfo[playerid][pMission] == MISSION_TYPE_COURIER_2)
{
if (PlayerInfo[playerid][pMission] == MISSION_TYPE_COURIER_1 || PlayerInfo[playerid][pMission] == MISSION_TYPE_COURIER_2)
{
PlayerInfo[playerid][pHoldup] = 0;
PlayerInfo[playerid][pHoldupHour] = 0;
PlayerInfo[playerid][pHoldupMinute] = 0;
PlayerInfo[playerid][pHoldupAmount] = 0;
PlayerInfo[playerid][pMission] = 0;
PlayerInfo[playerid][pRaceCheckpoint] = 0;
DisablePlayerRaceCheckpoint(playerid);
TextDrawHideForPlayer(playerid, StatsDisplay[playerid]);
GameTextForPlayer(playerid,"COURIER MISSION CANCELLED", 5000, 3);
SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "You Have Cancelled Your Current Courier Mission.");
}
if (PlayerInfo[playerid][pMission] == MISSION_TYPE_TRUCK_1 || PlayerInfo[playerid][pMission] == MISSION_TYPE_TRUCK_2)
{
PlayerInfo[playerid][pHoldup] = 0;
PlayerInfo[playerid][pHoldupHour] = 0;
PlayerInfo[playerid][pHoldupMinute] = 0;
PlayerInfo[playerid][pHoldupAmount] = 0;
PlayerInfo[playerid][pMission] = 0;
PlayerInfo[playerid][pRaceCheckpoint] = 0;
DisablePlayerRaceCheckpoint(playerid);
TextDrawHideForPlayer(playerid, StatsDisplay[playerid]);
GameTextForPlayer(playerid,"DELIVERY MISSION CANCELLED", 5000, 3);
SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "You Have Cancelled Your Current Delivery Mission.");
}

}else{
SendClientMessage(playerid, COLOR_ERROR, "Nothing to Cancel!");
}
}else{
SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You're Dead.");
}
return 1;
}[/CODE]
rutger177 is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:56.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode