dialog problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: dialog problem (
/showthread.php?tid=262486)
dialog problem -
Amine_Mejrhirrou - 18.06.2011
the problem is that when i use the first dialog ! when i press ok or i cancel ! i can't see the msg
and for the second dialog too ...
what's the problem ?
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialodonator)
{
case 1:
{
if(!response)return SendClientMessage(playerid, GREY, "thnks for blablabla");
SendClientMessage(playerid, GREY, "visit www.t-vi.gamerzfun.com");
return 1;
}
}
switch(lenguage)
{
case 1:
{
switch(listitem)// Checking which listitem was selected
{
case 0://english
{
gLenguage[ playerid ] = 0 ;
SendClientMessage(playerid, RED, "Welcome to our server type /help");
return 1;
}
case 1: //french
{
SendClientMessage(playerid, RED, "bienvenue /help");
gLenguage[ playerid ] = 1 ;
return 1;
}
case 2: ///////////esnol/////////////
{
SendClientMessage(playerid, RED, "bien venido a nuestro serve, escribe /help");
gLenguage[ playerid ] = 2 ;
return 1;
}
case 3: // deutch
{
SendClientMessage(playerid, RED, "welcome /help");
gLenguage[ playerid ] = 3 ;
return 1;
}
}
}
}
return 1;
}
Re: dialog problem -
Wesley221 - 18.06.2011
Are you using it as a FS, or as a GM?
If FS, return the callback to 0. If you return it as 1, it doesnt work
Re : dialog problem -
Amine_Mejrhirrou - 18.06.2011
it's a FS
i alrady have one in my GM that works perfectly
Re: dialog problem -
Wesley221 - 18.06.2011
Return the callback to 0, then it'll work
Re : dialog problem -
Amine_Mejrhirrou - 18.06.2011
this is the new code and not working
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case lenguage:
{
if(response)
{
switch(listitem)// Checking which listitem was selected
{
case 0://english
{
gLenguage[ playerid ] = 0 ;
SendClientMessage(playerid, RED, "Welcome to our server type /help");
}
case 1: //french
{
SendClientMessage(playerid, RED, "bienvenue /help");
gLenguage[ playerid ] = 1 ;
}
case 2: ///////////esnol/////////////
{
SendClientMessage(playerid, RED, "bien venido a nuestro serve, escribe /help");
gLenguage[ playerid ] = 2 ;
}
case 3: // deutch
{
SendClientMessage(playerid, RED, "welcome /help");
gLenguage[ playerid ] = 3 ;
}
}
}
return 0;
}
case dialodonator:
{
if(!response)return SendClientMessage(playerid, GREY, "visit www.t-vi.gamerzfun.com");
SendClientMessage(playerid, GREY, "visit www.t-vi.gamerzfun.com");
return 1;
}
}
return 0;
}
Re: dialog problem -
Wesley221 - 18.06.2011
pawn Код:
public OnDialogResponse
(playerid, dialogid, response, listitem, inputtext
[]){ switch(dialogid
) { case lenguage
: { if(response
) { switch(listitem
)// Checking which listitem was selected { case 0://english { gLenguage
[ playerid
] = 0 ;
SendClientMessage
(playerid, RED,
"Welcome to our server type /help");
} case 1: //french { SendClientMessage
(playerid, RED,
"bienvenue /help");
gLenguage
[ playerid
] = 1 ;
} case 2: ///////////esnol///////////// { SendClientMessage
(playerid, RED,
"bien venido a nuestro serve, escribe /help");
gLenguage
[ playerid
] = 2 ;
} case 3: // deutch { SendClientMessage
(playerid, RED,
"welcome /help");
gLenguage
[ playerid
] = 3 ;
} } } return 1;
} case dialodonator
: { if(!response
)return SendClientMessage
(playerid, GREY,
"visit www.t-vi.gamerzfun.com");
SendClientMessage
(playerid, GREY,
"visit www.t-vi.gamerzfun.com");
return 1;
} } return 0;
}
Try this, and otherwise i dont know the problem. Also check your other FS's for the return 0;
Re : dialog problem -
Amine_Mejrhirrou - 18.06.2011
not working
Re : dialog problem -
Amine_Mejrhirrou - 18.06.2011
OMG : i've set "return 0;" in the other FS and works how can i thanks you ?