if (strcmp("/Cornome", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, 2424, DIALOG_STYLE_LIST, "» Cores «", "Azul\nVermelho\nVerde\nAqua\nRosa\nAmarelo\nMarron\nLaranja\nRoxo", "Selecionar", "Cancelar");
}
if(dialogid == 2424) {
if(response) {
if(listitem == 0) {
SetPlayerColor(playerid, 0x0000BBAA);
return 1;
}
if(listitem == 1) {
SetPlayerColor(playerid, 0xAA3333AA);
return 1;
}
if(listitem == 2) {
SetPlayerColor(playerid, 0x33AA33AA);
return 1;
}
if(listitem == 3) {
SetPlayerColor(playerid, 0xF0F8FFAA);
return 1;
}
if(listitem == 4) {
SetPlayerColor(playerid, 0xFFC0CBAA);
return 1;
}
if(listitem == 5) {
SetPlayerColor(playerid, 0xFFFF00AA);
return 1;
}
if(listitem == 6) {
SetPlayerColor(playerid, 0xA52A2AAA);
return 1;
}
if(listitem == 7) {
SetPlayerColor(playerid, 0xFF9900AA);
return 1;
}
if(listitem == 8) {
SetPlayerColor(playerid, 0x9900FFAA);
return 1;
}
return 1;
}
return 1;
}
return 0;
}
gamemodes\Untitled.pwn(920) : warning 209: function "OnDialogResponse" should return a value
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Warning.
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 2424)
{
if(response)
{
if(listitem == 0){
SetPlayerColor(playerid, 0x0000BBAA);
}
if(listitem == 1){
SetPlayerColor(playerid, 0xAA3333AA);
}
if(listitem == 2) {
SetPlayerColor(playerid, 0x33AA33AA);
}
if(listitem == 3) {
SetPlayerColor(playerid, 0xF0F8FFAA);
}
if(listitem == 4) {
SetPlayerColor(playerid, 0xFFC0CBAA);
}
if(listitem == 5) {
SetPlayerColor(playerid, 0xFFFF00AA);
}
if(listitem == 6) {
SetPlayerColor(playerid, 0xA52A2AAA);
}
if(listitem == 7) {
SetPlayerColor(playerid, 0xFF9900AA);
}
if(listitem == 8) {
SetPlayerColor(playerid, 0x9900FFAA);
}
}
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
if(dialogid == 2424) {
if(response) {
switch(listitem) {
case 0: SetPlayerColor(playerid, 0x0000BBAA);
case 1: SetPlayerColor(playerid, 0xAA3333AA);
case 2: SetPlayerColor(playerid, 0x33AA33AA);
case 3: SetPlayerColor(playerid, 0xF0F8FFAA);
case 4: SetPlayerColor(playerid, 0xFFC0CBAA);
case 5: SetPlayerColor(playerid, 0xFFFF00AA);
case 6: SetPlayerColor(playerid, 0xA52A2AAA);
case 7: SetPlayerColor(playerid, 0xFF9900AA);
case 8: SetPlayerColor(playerid, 0x9900FFAA);
}
}
}
return 1;
}
Pra que esse tanto de Return?
Ve o do PauloR que ele posto pra ti que vai funcionar direitinho. |