Public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == clima) //dialog definida la em cima !
{
if(response) //Selecionando as opçoes ira Abrir :
{
if(listitem == 0) // lista 1 ou seja , tempestade .
{
new Names[30]; // Variavel
GetPlayerName(playerid,Names,sizeof(Names)); // Pega o Nome Do Player que esta Digitando o comando!
format(string,sizeof(string),"* O administrador %s (%d) alterou o clima.",Names,playerid); //Formata o a mensagem com o nome do player .
SendClientMessageToAll(AdminCor, string); // Define que a mensagem acima é pra todos do servidor !
SetWeather(19); // Setando o clima Para o Id 19 (ou seja Tempestade )
return 1;
}
else if(listitem == 1) //lista 2 ou seja , Limpo , Faça Mesma coisa só mudando o ID do Clima!
{
new Names[30]; // Variavel
GetPlayerName(playerid,Names,sizeof(Names)); // Pega o Nome Do Player que esta Digitando o comando!
format(string,sizeof(string),"* O administrador %s (%d) alterou o clima.",Names,playerid); //Formata o a mensagem com o nome do player .
SendClientMessageToAll(AdminCor, string); // Define que a mensagem acima é pra todos do servidor !
SetWeather(1); // Setando o clima Para o Id 19 (ou seja Tempestade )
return 1;
}
}
}
}
return 1;
}