26.05.2012, 13:51
Bom, quando eu executo o comando de mudar a cor do nick aparece a dialog certinho.
Mais quando eu escolho a cor, muda o clima do server. que no caso й uma outra dialog que tem aqui.
DIALOG DO CLIMA
DIALOG DA COR
Mais quando eu escolho a cor, muda o clima do server. que no caso й uma outra dialog que tem aqui.
DIALOG DO CLIMA
Код:
if(dialogid == DIALOG_Clima) /* DIALOG DE CLIMA & HORA */
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid, DIALOG_Clima+1, DIALOG_STYLE_LIST, "Clima", "Ensolarado \nTemporal \nNublado \nCeu Azul \nTempestade de Areia \nEscuro \nQuente \nVoltar", "Selecionar", "Cancelar");
}
if(listitem == 1)
{
ShowPlayerDialog(playerid, DIALOG_Clima+2, DIALOG_STYLE_LIST, "Hora", "1:00 \n3:00 \n5:00 \n7:00 \n9:00 \n11:00 \n13:00 \n15:00 \n17:00 \n19:00 \n21:00 \n23:00 \nVoltar", "Selecionar", "Cancelar");
}
}
return 1;
}
if(dialogid == DIALOG_Clima+1)
{
if(response)
{
if(listitem == 0) // Ensolarado
{
SetWeather(5);
}
if(listitem == 1) // Temporal
{
SetWeather(8);
}
if(listitem == 2) // Nublado
{
SetWeather(9);
}
if(listitem == 3) // Ceu Azul
{
SetWeather(10);
}
if(listitem == 4) // Tempestade de Areia
{
SetWeather(19);
}
if(listitem == 5) // Escuro
{
SetWeather(45);
}
if(listitem == 6) // Quente
{
SetWeather(11);
}
if(listitem == 7) // Voltar
{
ShowPlayerDialog(playerid, DIALOG_Clima, DIALOG_STYLE_LIST, "CLIMA / HORA", "Clima \nHora", "Selecionar", "Cancelar");
}
}
return 1;
}
if(dialogid == DIALOG_Clima+2)
{
if(response)
{
if(listitem == 0) //
{
SetPlayerTime(playerid,1,0);
}
if(listitem == 1) //
{
SetPlayerTime(playerid,3,0);
}
if(listitem == 2) //
{
SetPlayerTime(playerid,5,0);
}
if(listitem == 3) //
{
SetPlayerTime(playerid,7,0);
}
if(listitem == 4) //
{
SetPlayerTime(playerid,9,0);
}
if(listitem == 5) //
{
SetPlayerTime(playerid,11,0);
}
if(listitem == 6) //
{
SetPlayerTime(playerid,13,0);
}
if(listitem == 7) //
{
SetPlayerTime(playerid,15,0);
}
if(listitem == 8) //
{
SetPlayerTime(playerid,17,0);
}
if(listitem == 9) //
{
SetPlayerTime(playerid,19,0);
}
if(listitem == 10) //
{
SetPlayerTime(playerid,21,0);
}
if(listitem == 11) //
{
SetPlayerTime(playerid,23,0);
}
if(listitem == 12) //
{
ShowPlayerDialog(playerid, DIALOG_Clima, DIALOG_STYLE_LIST, "CLIMA / HORA", "Clima \nHora", "Selecionar", "Cancelar");
}
}
return 1;
}
Код:
if(dialogid == DIALOG_Cor)
{
if(response)
{
new string[128], Jogador[MAX_PLAYER_NAME], Outro[MAX_PLAYER_NAME];
if(listitem == 0)
{
SetPlayerColor(id, VERMELHO);
GetPlayerName(playerid, Jogador, sizeof(Jogador));
GetPlayerName(id, Outro, sizeof(Outro));
format(string, sizeof(string), "{8000FF}[ COR ] O Admin {8000FF}%s Trocou a cor do Nick de {8000FF}%s Para Vermelha.", Jogador, Outro);
SendClientMessageToAll(-1, string);
}
if(listitem == 1)
{
SetPlayerColor(id, VERDE);
GetPlayerName(playerid, Jogador, sizeof(Jogador));
GetPlayerName(id, Outro, sizeof(Outro));
format(string, sizeof(string), "{8000FF}[ COR ] O Admin {8000FF}%s Trocou a cor do Nick de {8000FF}%s Para Verde.", Jogador, Outro);
SendClientMessageToAll(-1, string);
}
if(listitem == 2)
{
SetPlayerColor(id, AMARELO);
GetPlayerName(playerid, Jogador, sizeof(Jogador));
GetPlayerName(id, Outro, sizeof(Outro));
format(string, sizeof(string), "{8000FF}[ COR ] O Admin {8000FF}%s Trocou a cor do Nick de {8000FF}%s Para Amarela.", Jogador, Outro);
SendClientMessageToAll(-1, string);
}
if(listitem == 3)
{
SetPlayerColor(id, AZUL_AGUA);
GetPlayerName(playerid, Jogador, sizeof(Jogador));
GetPlayerName(id, Outro, sizeof(Outro));
format(string, sizeof(string), "{8000FF}[ COR ] O Admin {8000FF}%s Trocou a cor do Nick de {8000FF}%s Para Azul Claro.", Jogador, Outro);
SendClientMessageToAll(-1, string);
}
if(listitem == 4)
{
SetPlayerColor(id, LARANJA);
GetPlayerName(playerid, Jogador, sizeof(Jogador));
GetPlayerName(id, Outro, sizeof(Outro));
format(string, sizeof(string), "{8000FF}[ COR ] O Admin {8000FF}%s Trocou a cor do Nick de {8000FF}%s Para Laranja.", Jogador, Outro);
SendClientMessageToAll(-1, string);
}
if(listitem == 5)
{
SetPlayerColor(id, ROXO);
GetPlayerName(playerid, Jogador, sizeof(Jogador));
GetPlayerName(id, Outro, sizeof(Outro));
format(string, sizeof(string), "{8000FF}[ COR ] O Admin {8000FF}%s Trocou a cor do Nick de {8000FF}%s Para Roxa.", Jogador, Outro);
SendClientMessageToAll(-1, string);
}
if(listitem == 6)
{
SetPlayerColor(id, AZUL);
GetPlayerName(playerid, Jogador, sizeof(Jogador));
GetPlayerName(id, Outro, sizeof(Outro));
format(string, sizeof(string), "{8000FF}[ COR ] O Admin {8000FF}%s Trocou a cor do Nick de {8000FF}%s Para Azul.", Jogador, Outro);
SendClientMessageToAll(-1, string);
}
if(listitem == 7)
{
SetPlayerColor(id, ROSA_SHOCK);
GetPlayerName(playerid, Jogador, sizeof(Jogador));
GetPlayerName(id, Outro, sizeof(Outro));
format(string, sizeof(string), "{8000FF}[ COR ] O Admin {8000FF}%s Trocou a cor do Nick de {8000FF}%s Para Rosa.", Jogador, Outro);
SendClientMessageToAll(-1, string);
}
if(listitem == 8)
{
SetPlayerColor(id, CINZA_CLARO);
GetPlayerName(playerid, Jogador, sizeof(Jogador));
GetPlayerName(id, Outro, sizeof(Outro));
format(string, sizeof(string), "{8000FF}[ COR ] O Admin {8000FF}%s Trocou a cor do Nick de {8000FF}%s Para Cinza.", Jogador, Outro);
SendClientMessageToAll(-1, string);
}
if(listitem == 9)
{
SetPlayerColor(playerid, MARROM);
GetPlayerName(playerid, Jogador, sizeof(Jogador));
GetPlayerName(id, Outro, sizeof(Outro));
format(string, sizeof(string), "{8000FF}[ COR ] O Admin {8000FF}%s Trocou a cor do Nick de {8000FF}%s Para Marrom.", Jogador, Outro);
SendClientMessageToAll(-1, string);
}
if(listitem == 10)
{
SetPlayerColor(playerid, BRANCO);
GetPlayerName(playerid, Jogador, sizeof(Jogador));
GetPlayerName(id, Outro, sizeof(Outro));
format(string, sizeof(string), "{8000FF}[ COR ] O Admin {8000FF}%s Trocou a cor do Nick de {8000FF}%s Para Branca.", Jogador, Outro);
SendClientMessageToAll(-1, string);
}
if(listitem == 11)
{
SetPlayerColor(playerid, AZUL_CLARO);
GetPlayerName(playerid, Jogador, sizeof(Jogador));
GetPlayerName(id, Outro, sizeof(Outro));
format(string, sizeof(string), "{8000FF}[ COR ] O Admin {8000FF}%s Trocou a cor do Nick de {8000FF}%s Para Azul Clara.", Jogador, Outro);
SendClientMessageToAll(-1, string);
}
if(listitem == 12)
{
SetPlayerColor(playerid, VERDE_ESCURO);
GetPlayerName(playerid, Jogador, sizeof(Jogador));
GetPlayerName(id, Outro, sizeof(Outro));
format(string, sizeof(string), "{8000FF}[ COR ] O Admin {8000FF}%s Trocou a cor do Nick de {8000FF}%s Para Verde Escura.", Jogador, Outro);
SendClientMessageToAll(-1, string);
}
}
return 1;
}


