08.05.2013, 19:20
pawn Код:
// Em OnPlayerKeyStateChange
if (PlayerToPoint(2, playerid,830.6808,-0.2795,1004.1797) || PlayerToPoint(2,playerid,833.5997,3.2969,1004.1797 ))
{
ShowPlayerDialog(playerid,1784,DIALOG_STYLE_LIST,"Lotйrica","Comprar um Bilhete\nMudar o Sexo para Masculino\nMudar o Sexo para Feminino","Escolher","Cancelar");
}
// Em OnDialogResponse
if(dialogid == 1784)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid,1785,DIALOG_STYLE_INPUT,"Lotйrica","Digite o nъmero do bilhete que deseja comprar","Comprar","Cancelar");
}
if(listitem == 1)
{
OnPlayerCommandText(playerid,"/mudarsexo 1");
}
if(listitem == 2)
{
OnPlayerCommandText(playerid,"/mudarsexo 1");
}
}
return 1;
}
if(dialogid == 1785)
{
if(response)
{
if(!strlen(inputtext))
{
ShowPlayerDialog(playerid,1785,DIALOG_STYLE_INPUT,"Lotйrica","Digite o nъmero do bilhete que deseja comprar","Comprar","Cancelar");
}
new ID = strval(inputtext); new Fala[20];
format(Fala,sizeof(Fala),"/loteria %d",inputtext);
OnPlayerCommandText(playerid,Fala);
}
return 1;
}
