24.07.2011, 15:53
Hello, i have already checked the wiki and could not find any help for my case. I have created a checkpoint:
Top of my script:
OnDialogResponse:
In the game it sets the checkpoint on my map. However i am not sure on how to create a command for OnPlayerEnterCheckpoint:
When someone enters the checkpoint ''itemmilk'', i need it to deletetheplayerscheckpoint and send them a message to say that they have arrived.
Could someone show me what code i would use for this.
Thanks
Top of my script:
pawn Код:
#define itemmilk 1995.1034,-2316.4031,13.5469
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(response)
{
if(listitem == 0) // Deliver Milk
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, itemmilk, 10.0);
}
}
}
return 1;
}
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 593 & 592 & 511 & 553 & 417)
{
if (IsPlayerInRangeOfPoint(playerid, 7.0,loaditem))
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Type Of Package","Deliver Passengers\n Deliver Milk\n Deliver Engine Fuel\n Deliver Electronics", "Select", "Cancel");
}
}
return 1;
}
Could someone show me what code i would use for this.
Thanks