PDA

View Full Version : Problem with dialog.


TiXz0r
21/03/2015, 08:22 PM
When ask me for tutorial yes (da) no(ne), when press yes, tutorial working. i make when click Ne(no) automatic will be registred, but, when press Ne(no) she kick me. :S i dont see where is problem.


case DIALOG_TUTORIAL:
{
if(!response) return Kick(playerid);
if(response)
{
if(response == 0)
{
SetTimerEx("KickTime", 1000, false, "i", playerid);
}
if(response == 1)
{
new string[248];
strcat(string,""COL_WHITE"Zelite li pogledati mali tutorial o serveru?\n");
strcat(string,""COL_GREEN"*"COL_WHITE"Ako ste novi igrac preporucujemo vam da pogledate tutorial.\n");
strcat(string,""COL_RED"*"COL_WHITE"Ako pogledate tutorial, dobivate bonus od 500$.\n");
ShowPlayerDialog(playerid,DIALOG_REGPLAYER,DIALOG_ STYLE_MSGBOX,""COL_ORANGE"TUTORIAL",string,"Da","Ne");
}
}
}

case DIALOG_REGPLAYER:
{
if(!response) return Kick(playerid);
if(response)
{
if(response == 1)
{
StopAudioStreamForPlayer(playerid);
ClearSomeText(playerid);
timerregtut1[playerid] = SetTimerEx("RegTut1", 1000, false, "i", playerid);
GivePlayerCash(playerid, 500);
}
else if(response == 0)
{
StopAudioStreamForPlayer(playerid);
ClearSomeText(playerid);
InterpolateCameraPos(playerid, 1401.052246, -1379.372192, 597.450561, 1413.083007, -901.856750, 171.654861, 7000);
InterpolateCameraLookAt(playerid, 1401.146240, -1375.640991, 594.123474, 1413.177001, -898.125549, 168.327789, 1000);
SetPlayerPos(playerid, 1401.052246, -1379.372192, 597.450561);
TextDrawShowForPlayer(playerid,TextdrawRTW0);
TextDrawShowForPlayer(playerid,TextdrawRTW1);
TextDrawShowForPlayer(playerid,TextdrawRTW2);
TextDrawShowForPlayer(playerid,TextdrawRTW3);
TextDrawShowForPlayer(playerid,TextdrawRTW4);
TextDrawShowForPlayer(playerid,TextdrawRTW5);
TextDrawShowForPlayer(playerid,TextdrawRTW6);
timerregtut21[playerid] = SetTimerEx("REGTIME", 7500, false, "i", playerid);

}
}
}

TwinkiDaBoss
22/03/2015, 02:04 AM
If I understood correctly you want to make it so if player clicks Ne he doesnt get kicked? If so just remove
case DIALOG_TUTORIAL:
{
if(!response) return Kick(playerid); //Remove this

NoDi522
22/03/2015, 10:12 AM
Tell us what you want to do and we will help. If you want to remove kick on !response do what @TwinkiDaBoss said.

TiXz0r
22/03/2015, 11:25 AM
If I understood correctly you want to make it so if player clicks Ne he doesnt get kicked? If so just remove
case DIALOG_TUTORIAL:
{
if(!response) return Kick(playerid); //Remove this

i will try now :) thanks. rep+

Tell us what you want to do and we will help. If you want to remove kick on !response do what @TwinkiDaBoss said.

i want when press "Da" will show tutorial, when "Ne" server will be automatic register player, but when press esc (close dialog) will kick him.