need help with ondialogresponse
#1

the lines are:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_KEVENT)
{
/////////////////////////////////////////////////////
if(response)
{
////////////////////////////////
if(listitem == 0)
{
new string[200];
new vardas[MAX_PLAYER_NAME];
GetPlayerName(playerid, vardas, sizeof(vardas));
format(string,sizeof(string),"{FFFFFF}[{FF0000}Event{FFFFFF}]{00FF00}Administratorius {FF0000}%s{00FF00} Rengia Medziokles Eventa! Prisijungimas Prie Evento /ievent !", vardas);
SendClientMessageToAll(GREEN, string);
event = 1;
GetPlayerPos(playerid, xev, yev, zev);
}
else if(listitem == 1)
{
new string[200];
new vardas[MAX_PLAYER_NAME];
GetPlayerName(playerid, vardas, sizeof(vardas));
format(string,sizeof(string),"{FFFFFF}[{FF0000}Event{FFFFFF}]{00FF00}Administratorius {FF0000}%s{00FF00} Rengia Lenktyniu Eventa! Prisijungimas Prie Evento /ievent !", vardas);
SendClientMessageToAll(GREEN, string);
event = 1;
GetPlayerPos(playerid, xev, yev, zev);
return 1;
}
else if(listitem == 2)
{
new string[200];
new vardas[MAX_PLAYER_NAME];
GetPlayerName(playerid, vardas, sizeof(vardas));
format(string,sizeof(string),"{FFFFFF}[{FF0000}Event{FFFFFF}]{00FF00}Administratorius {FF0000}%s{00FF00} Rengia Drift Eventa! Prisijungimas Prie Evento /ievent !", vardas);
SendClientMessageToAll(GREEN, string);
event = 1;
GetPlayerPos(playerid, xev, yev, zev);
return 1;
}
else if(listitem == 3)
{
new string[200];
new vardas[MAX_PLAYER_NAME];
GetPlayerName(playerid, vardas, sizeof(vardas));
format(string,sizeof(string),"{FFFFFF}[{FF0000}Event{FFFFFF}]{00FF00}Administratorius {FF0000}%s{00FF00} Rengia Issilaikimo Eventa! Prisijungimas Prie Evento /ievent !", vardas);
SendClientMessageToAll(GREEN, string);
event = 1;
GetPlayerPos(playerid, xev, yev, zev);
return 1;
}
else if(listitem == 4)
{
new string[200];
new vardas[MAX_PLAYER_NAME];
GetPlayerName(playerid, vardas, sizeof(vardas));
format(string,sizeof(string),"{FFFFFF}[{FF0000}Event{FFFFFF}]{00FF00}Administratorius {FF0000}%s{00FF00} Rengia DM Eventa! Prisijungimas Prie Evento /ievent !", vardas);
SendClientMessageToAll(GREEN, string);
event = 1;
GetPlayerPos(playerid, xev, yev, zev);
return 1;
}
else if(listitem == 5)
{
new string[200];
new vardas[MAX_PLAYER_NAME];
GetPlayerName(playerid, vardas, sizeof(vardas));
format(string,sizeof(string),"{FFFFFF}[{FF0000}Event{FFFFFF}]{00FF00}Administratorius {FF0000}%s{00FF00} Rengia Box Eventa! Prisijungimas Prie Evento /ievent !", vardas);
SendClientMessageToAll(GREEN, string);
event = 1;
GetPlayerPos(playerid, xev, yev, zev);
return 1;
}
///////////////////////////////////////////////////////
}
return 1;
}
return 1;
}
the are no errors or warnings
the problem is only the 6 and 5 works, does anybody knows whats wrong ?
Reply
#2

Change the last return 1; to return 0;
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_KEVENT)
{
/////////////////////////////////////////////////////
if(response)
{
////////////////////////////////
new string[200];
new vardas[MAX_PLAYER_NAME];
GetPlayerName(playerid, vardas, sizeof(vardas));
if(listitem == 0)
{
format(string,sizeof(string),"{FFFFFF}[{FF0000}Event{FFFFFF}]{00FF00}Administratorius {FF0000}%s{00FF00} Rengia Medziokles Eventa! Prisijungimas Prie Evento /ievent !", vardas);
SendClientMessageToAll(GREEN, string);
event = 1;
GetPlayerPos(playerid, xev, yev, zev);
}
else if(listitem == 1)
{
format(string,sizeof(string),"{FFFFFF}[{FF0000}Event{FFFFFF}]{00FF00}Administratorius {FF0000}%s{00FF00} Rengia Lenktyniu Eventa! Prisijungimas Prie Evento /ievent !", vardas);
SendClientMessageToAll(GREEN, string);
event = 1;
GetPlayerPos(playerid, xev, yev, zev);
return 1;
}
else if(listitem == 2)
{

format(string,sizeof(string),"{FFFFFF}[{FF0000}Event{FFFFFF}]{00FF00}Administratorius {FF0000}%s{00FF00} Rengia Drift Eventa! Prisijungimas Prie Evento /ievent !", vardas);
SendClientMessageToAll(GREEN, string);
event = 1;
GetPlayerPos(playerid, xev, yev, zev);
return 1;
}
else if(listitem == 3)
{

format(string,sizeof(string),"{FFFFFF}[{FF0000}Event{FFFFFF}]{00FF00}Administratorius {FF0000}%s{00FF00} Rengia Issilaikimo Eventa! Prisijungimas Prie Evento /ievent !", vardas);
SendClientMessageToAll(GREEN, string);
event = 1;
GetPlayerPos(playerid, xev, yev, zev);
return 1;
}
else if(listitem == 4)
{

format(string,sizeof(string),"{FFFFFF}[{FF0000}Event{FFFFFF}]{00FF00}Administratorius {FF0000}%s{00FF00} Rengia DM Eventa! Prisijungimas Prie Evento /ievent !", vardas);
SendClientMessageToAll(GREEN, string);
event = 1;
GetPlayerPos(playerid, xev, yev, zev);
return 1;
}
else if(listitem == 5)
{

format(string,sizeof(string),"{FFFFFF}[{FF0000}Event{FFFFFF}]{00FF00}Administratorius {FF0000}%s{00FF00} Rengia Box Eventa! Prisijungimas Prie Evento /ievent !", vardas);
SendClientMessageToAll(GREEN, string);
event = 1;
GetPlayerPos(playerid, xev, yev, zev);
return 1;
}
///////////////////////////////////////////////////////
}
return 1;
}
return 0;
}
Reply
#3

still the same. can anyone help ?
Reply
#4

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_KEVENT)
{
/////////////////////////////////////////////////////
if(response)
{
////////////////////////////////
new string[200];
new vardas[MAX_PLAYER_NAME];
GetPlayerName(playerid, vardas, sizeof(vardas));
if(listitem == 0)
{
format(string,sizeof(string),"{FFFFFF}[{FF0000}Event{FFFFFF}]{00FF00}Administratorius {FF0000}%s{00FF00} Rengia Medziokles Eventa! Prisijungimas Prie Evento /ievent !", vardas);
SendClientMessageToAll(GREEN, string);
event = 1;
GetPlayerPos(playerid, xev, yev, zev);
}
else if(listitem == 1)
{
format(string,sizeof(string),"{FFFFFF}[{FF0000}Event{FFFFFF}]{00FF00}Administratorius {FF0000}%s{00FF00} Rengia Lenktyniu Eventa! Prisijungimas Prie Evento /ievent !", vardas);
SendClientMessageToAll(GREEN, string);
event = 1;
GetPlayerPos(playerid, xev, yev, zev);
return 1;
}
else if(listitem == 2)
{

format(string,sizeof(string),"{FFFFFF}[{FF0000}Event{FFFFFF}]{00FF00}Administratorius {FF0000}%s{00FF00} Rengia Drift Eventa! Prisijungimas Prie Evento /ievent !", vardas);
SendClientMessageToAll(GREEN, string);
event = 1;
GetPlayerPos(playerid, xev, yev, zev);
return 1;
}
else if(listitem == 3)
{

format(string,sizeof(string),"{FFFFFF}[{FF0000}Event{FFFFFF}]{00FF00}Administratorius {FF0000}%s{00FF00} Rengia Issilaikimo Eventa! Prisijungimas Prie Evento /ievent !", vardas);
SendClientMessageToAll(GREEN, string);
event = 1;
GetPlayerPos(playerid, xev, yev, zev);
return 1;
}
else if(listitem == 4)
{

format(string,sizeof(string),"{FFFFFF}[{FF0000}Event{FFFFFF}]{00FF00}Administratorius {FF0000}%s{00FF00} Rengia DM Eventa! Prisijungimas Prie Evento /ievent !", vardas);
SendClientMessageToAll(GREEN, string);
event = 1;
GetPlayerPos(playerid, xev, yev, zev);
return 1;
}
else if(listitem == 5)
{
format(string,sizeof(string),"{FFFFFF}[{FF0000}Event{FFFFFF}]{00FF00}Administratorius {FF0000}%s{00FF00} Rengia Box Eventa! Prisijungimas Prie Evento /ievent !", vardas);
SendClientMessageToAll(GREEN, string);
event = 1;
GetPlayerPos(playerid, xev, yev, zev);
}
///////////////////////////////////////////////////////
}

}
return 1;
}

Try this one.
Reply
#5

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_KEVENT)
    {
        if(response)
        {
                if(listitem == 0)
                {
                    new string[200];
                    new vardas[MAX_PLAYER_NAME];
                    GetPlayerName(playerid, vardas, sizeof(vardas));
                    format(string,sizeof(string),"{FFFFFF}[{FF0000}Event{FFFFFF}]{00FF00}Administratorius {FF0000}%s{00FF00} Rengia Medziokles Eventa! Prisijungimas Prie Evento /ievent !", vardas);
                    SendClientMessageToAll(GREEN, string);
                    event = 1;
                    GetPlayerPos(playerid, xev, yev, zev);
                    return 1;
                }
                if(listitem == 1)
                {
                    new string[200];
                    new vardas[MAX_PLAYER_NAME];
                    GetPlayerName(playerid, vardas, sizeof(vardas));
                    format(string,sizeof(string),"{FFFFFF}[{FF0000}Event{FFFFFF}]{00FF00}Administratorius {FF0000}%s{00FF00} Rengia Lenktyniu Eventa! Prisijungimas Prie Evento /ievent !", vardas);
                    SendClientMessageToAll(GREEN, string);
                    event = 1;
                    GetPlayerPos(playerid, xev, yev, zev);
                    return 1;
                }
                if(listitem == 2)
                {
                    new string[200];
                    new vardas[MAX_PLAYER_NAME];
                    GetPlayerName(playerid, vardas, sizeof(vardas));
                    format(string,sizeof(string),"{FFFFFF}[{FF0000}Event{FFFFFF}]{00FF00}Administratorius {FF0000}%s{00FF00} Rengia Drift Eventa! Prisijungimas Prie Evento /ievent !", vardas);
                    SendClientMessageToAll(GREEN, string);
                    event = 1;
                    GetPlayerPos(playerid, xev, yev, zev);
                    return 1;
                }
                if(listitem == 3)
                {
                    new string[200];
                    new vardas[MAX_PLAYER_NAME];
                    GetPlayerName(playerid, vardas, sizeof(vardas));
                    format(string,sizeof(string),"{FFFFFF}[{FF0000}Event{FFFFFF}]{00FF00}Administratorius {FF0000}%s{00FF00} Rengia Issilaikimo Eventa! Prisijungimas Prie Evento /ievent !", vardas);
                    SendClientMessageToAll(GREEN, string);
                    event = 1;
                    GetPlayerPos(playerid, xev, yev, zev);
                    return 1;
                }
                if(listitem == 4)
                {
                    new string[200];
                    new vardas[MAX_PLAYER_NAME];
                    GetPlayerName(playerid, vardas, sizeof(vardas));
                    format(string,sizeof(string),"{FFFFFF}[{FF0000}Event{FFFFFF}]{00FF00}Administratorius {FF0000}%s{00FF00} Rengia DM Eventa! Prisijungimas Prie Evento /ievent !", vardas);
                    SendClientMessageToAll(GREEN, string);
                    event = 1;
                    GetPlayerPos(playerid, xev, yev, zev);
                    return 1;
                }
                if(listitem == 5)
                {
                    new string[200];
                    new vardas[MAX_PLAYER_NAME];
                    GetPlayerName(playerid, vardas, sizeof(vardas));
                    format(string,sizeof(string),"{FFFFFF}[{FF0000}Event{FFFFFF}]{00FF00}Administratorius {FF0000}%s{00FF00} Rengia Box Eventa! Prisijungimas Prie Evento /ievent !", vardas);
                    SendClientMessageToAll(GREEN, string);
                    event = 1;
                    GetPlayerPos(playerid, xev, yev, zev);
                    return 1;
                }
        }
    }
    return 1;
}
here you go.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)