pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(listitem == 0)
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -2317.7593,-1634.1985,483.7031);
SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Mount Chillad.");
}
if(listitem == 1)
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1549.2537,-1353.4073,329.4670);
SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to High House.");
}
}
Thats because it doesnt work
You have to check the dialogid first, before continuing.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if( dialogid == DIALOGID ) // when the dialogid is the same as 'DIALOGID'
{
if( response ) // if the player pressed the first button
{
if(listitem == 0) // first button + first listitem
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -2317.7593,-1634.1985,483.7031);
SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Mount Chillad.");
}
if(listitem == 1)
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1549.2537,-1353.4073,329.4670);
SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to High House.");
}
}
else // when player presses second button
{
}
}
if( dialogid == DIALOGID2 ) // this will be a second dialog just for example
{
}
return 0; // return 1; if its in your gamemode
}