26.02.2011, 20:01
This Should Work (Not Tested)
Maybe Helps:
ShowPlayerDialog
OnDialogResponse
SetPlayerPos
SetPlayerSkin
pawn Код:
#define SPAWN_DIALOG 1
public OnPlayerSpawn(playerid)
{
ShowPlayerDialog(playerid, SPAWN_DIALOG, DIALOG_STYLE_LIST, "Choose where you want to spawn","Las Venturas Airpost \nUnity station \nThe Docks","Select","Cancel");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == SPAWN_DIALOG)
{
switch(listitem)
{
case 0: //Las venturas Airport
{
SetPlayerPos(playerid, X, Y, Z); //X, Y, Z Coordiantes to the airport
ChooseSkin(playerid);
return 1;
}
case 1: //Unity Station
{
SetPlayerPos(playerid, X, Y, Z); //X, Y, Z Coordiantes to the unity station
ChooseSkin(playerid);
return 1;
}
case 2: //The Docks
{
SetPlayerPos(playerid, X, Y, Z); //X, Y, Z Coordiantes to the docks
ChooseSkin(playerid);
return 1;
}
}
}
else if(dialogid == SPAWN_DIALOG+1)
{
switch(listitem)
{
case 0: //Skin 1
{
SetPlayerSkin(playerid, 1);
return 1;
}
case 1: //Skin 2
{
SetPlayerSkin(playerid, 2);
return 1;
}
case 2: //Skin 3
{
SetPlayerSkin(playerid, 3);
return 1;
}
}
}
return 1;
}
stock ChooseSkin(playerid)
{
ShowPlayerDialog(playerid, SPAWN_DIALOG+1, DIALOG_STYLE_LIST, "Choose your skin","Skin 1 \nSkin 2 \nSkin 3","Select","Cancel");
return 1;
}
ShowPlayerDialog
OnDialogResponse
SetPlayerPos
SetPlayerSkin