#define DIALOG_SPAWNCHOICE 1
//Other is here:
public OnPlayerSpawn(playerid)
{
ShowPlayerDialog(playerid, DIALOG_SPAWNCHOICE,DIALOG_STYLE_MSGBOX, "Try Do Spawn", "Spawn Info", "Home", "Random");
return 1;
}
//Response:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_SPAWNCHOICE:
{
if(response)
{
SetPlayerPos(playerid, -536.3784,2592.6067,53.4141);//Cordinates are not real!
}
else
{
SetPlayerPos(playerid, -536.3784,2592.6067,53.4141);//For Test
}
}
}
return 1;
}
#define DIALOG_SPAWNCHOICE 1
//Other is here:
public OnPlayerSpawn(playerid)
{
ShowPlayerDialog(playerid, DIALOG_SPAWNCHOICE,DIALOG_STYLE_LIST, "Try Do Spawn", "Spawn Info\r\nHome\r\nRandom","Spawn","Cancel");
return 1;
}
//Response:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_SPAWNCHOICE:
{
if(response)
{
switch(listitem)
{
case 0:
{
// Player chose Spawn Info
}
case 1:
{
// Player chose Home
}
case 2:
{
// Player chose Random
}
}
}
}
}
return 1;
}
|
Код:
#define DIALOG_SPAWNCHOICE 1
//Other is here:
public OnPlayerSpawn(playerid)
{
ShowPlayerDialog(playerid, DIALOG_SPAWNCHOICE,DIALOG_STYLE_LIST, "Try Do Spawn", "Spawn Info\r\nHome\r\nRandom","Spawn","Cancel");
return 1;
}
//Response:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_SPAWNCHOICE:
{
if(response)
{
switch(listitem)
{
case 0:
{
// Player chose Spawn Info
}
case 1:
{
// Player chose Home
}
case 2:
{
// Player chose Random
}
}
}
}
}
return 1;
}
|
if(dialogid == DIALOG_SPAWNCHOICE)
{
if(response)
{
SetPlayerPos(playerid, blablabla);
}
else
{
SetPlayerPos(playerid, blablabla);
}
}
return 1;
#define DIALOG_SPAWNCHOICE 1
//Other is here:
public OnPlayerSpawn(playerid)
{
ShowPlayerDialog(playerid, DIALOG_SPAWNCHOICE,DIALOG_STYLE_MSGBOX, "Try Do Spawn", "Place 1 \n Place 2", "Go", "Cancel");
return 1;
}
//Response:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_SPAWNCHOICE:
{
if(response)
{
if(listitem == 0)
{
SetPlayerPos(playerid, -536.3784,2592.6067,53.4141);//Cordinates are not real!
}
else
{
SetPlayerPos(playerid, -536.3784,2592.6067,53.4141);//For Test
}
}
}
return 1;
}