SA-MP Forums Archive
Problem with dialog. - 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)
+--- Thread: Problem with dialog. (/showthread.php?tid=568388)



Problem with dialog. - TiXz0r - 21.03.2015

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);
                
                }
			}
        }



Re: Problem with dialog. - TwinkiDaBoss - 22.03.2015

If I understood correctly you want to make it so if player clicks Ne he doesnt get kicked? If so just remove
pawn Код:
case DIALOG_TUTORIAL:
        {
            if(!response) return Kick(playerid); //Remove this



Re: Problem with dialog. - NoDi522 - 22.03.2015

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


Re: Problem with dialog. - TiXz0r - 22.03.2015

Quote:
Originally Posted by TwinkiDaBoss
Посмотреть сообщение
If I understood correctly you want to make it so if player clicks Ne he doesnt get kicked? If so just remove
pawn Код:
case DIALOG_TUTORIAL:
        {
            if(!response) return Kick(playerid); //Remove this
i will try now thanks. rep+

Quote:
Originally Posted by NoDi522
Посмотреть сообщение
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.