25.08.2014, 08:45
Make a dialog (DIALOG_STYLE_LIST) and add several options. When the player spawns, show him the dialog.
pawn Код:
#define DIALOG_SPAWN 1
OnPlayerSpawn:
ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "Select a spawn", "Glen Park\nGrove Street\nAztecas Headquarters", "Select", "");
OnDialogResponse:
if(dialogid == DIALOG_SPAWN)
{
if(response) // If they clicked 'Select' or double-clicked an option
{
// Spawn them
switch(listitem)
{
case 0: //SetPlayerPos @ Glen Park
case 1: //SetPlayerPos @ Grove Street
case 2: //SetPlayerPos @ Aztecas Headquarters
}
}
return 1; // We handled a dialog, so return 1.
}