pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)// They pressed the first button.
{
switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
{
case 1:// Our dialog!
{
switch(listitem)// Checking which listitem was selected
{
case 0:// The first item listed
{
SetPlayerCheckpoint(playerid, 1633.8543701172, 679.880859375, 11.338871955872, 5.0);
SendClientMessage(playerid, 0xFFFFFF, "Voce escolheu entregar para o Deposito do Porto ");
SendClientMessage(playerid, 0xFFFFFF, "Valor: $5,000");
}
case 1: // The second item listed
{
SetPlayerCheckpoint(playerid, -1268.0789794922, 2733.4982910156, 49.598339080811, 5.0);
SendClientMessage(playerid, 0xFFFFFF, "Voce escolheu entregar para o Posto Xoomer ");
SendClientMessage(playerid, 0xFFFFFF, "Valor: $10,000");
}
case 2: // The third item listed
{
SetPlayerCheckpoint(playerid, -2317.5302734375, -1645.8850097656, 484.4582824707, 5.0);
SendClientMessage(playerid, 0xFFFFFF, "Voce escolheu entregar para o Chilliad ");
SendClientMessage(playerid, 0xFFFFFF, "Valor: $40,000");
}
}
}
}
}
return 1;
}
Como pode-se observar, tem valores diferentes e checkpoints diferentes, como eu defino cada um desses 3 checkpoints na public
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
if(PlayerToPoint(8.0,playerid,1633.8543701172, 679.880859375, 11.338871955872))//Deposito Do Porto
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, " ~w~Voce chegou no ~b~Deposito Do ~r~Porto", 5000, 3);
}
return 1;
}