24.11.2014, 17:48
pawn Код:
CMD:test(playerid, params[])
}
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_LIST, "Dialog Name", "Teleport\nCheckpoint", "Select", "Close");
return 1;
{
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(dialogid == 0)
{
case 1:
{
switch(listitem)
{
case 0:
{
SetPlayerPos(playerid, X, Y, Z);
}
case 1:
{
SetPlayerCheckpoint(playerid, X, Y, Z, SIZE);
}
}
}
}
}
public OnPlayerEnterCheckpoint(playerid)
{
GivePlayerMoney(playerid, 1000);
DisablePlayerCheckpoint(playerid);
return 1;
}