SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 19/05/2017, 09:26 AM   #1
Arthur Kane
Huge Clucker
 
Join Date: Sep 2012
Posts: 326
Reputation: 9
Default No response for dialog isn't working.

Players who press ESC or press cancel while in this dialog don't get kicked. Don't know why it isn't working. Am I doing something wrong? And yes, OnDialogResponse has return 1; at the end.

Code:
PHP Code:
case 3000:
{
     if(!
response) return Kick(playerid);
     if(
response)
     {
            
// my code
     
}

Also tried:
PHP Code:
case 3000:
{
     if(
response)
     {
            
// my code
     
}
     else return 
Kick(playerid);

Here's the start:
PHP Code:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
response)
    {
        switch(
dialogid)
        { 
I suspect it's because I might have if(response) at the very beginning?
Arthur Kane is offline   Reply With Quote
Old 19/05/2017, 09:47 AM   #2
iLearner
Big Clucker
 
iLearner's Avatar
 
Join Date: Apr 2017
Posts: 147
Reputation: 49
Default Re: No response for dialog isn't working.

Quote:
Originally Posted by Arthur Kane View Post
I suspect it's because I might have if(response) at the very beginning?
right.
iLearner is online now   Reply With Quote
Old 19/05/2017, 04:41 PM   #3
GTLS
Huge Clucker
 
GTLS's Avatar
 
Join Date: Aug 2014
Location: GetPlayerPos(GTLS, Float:x, Float:y, Float:Z);
Posts: 357
Reputation: 37
Default Re: No response for dialog isn't working.

Quote:
Originally Posted by iLearner View Post
right.
Right...
__________________
I Dont make Rules..
Quote:
Originally Posted by God
You scare me sometimes, GTLS.
GTLS is offline   Reply With Quote
Old 19/05/2017, 04:45 PM   #4
Aly
Huge Clucker
 
Join Date: Oct 2012
Posts: 227
Reputation: 11
Default Re: No response for dialog isn't working.

Your code should look like this:
PHP Code:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[]) 

    switch(
dialogid
    {
        case 
0:
        {
            if(
response)
            {
                
//Your code here
            
}
            else
                
Kick(playerid);
        }
    }
    return 
1;

Aly is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
response a dialog with another defined dialog gotwarzone Scripting Help 17 07/10/2013 07:57 PM
Dialoge Box response is not Working Properly marsmubarak Scripting Help 1 06/07/2013 06:37 PM
Dialoge Box response is not Working Properly marsmubarak Scripting Help 0 06/07/2013 06:21 PM
Dialog response not Sending Message [Input Dialog] Deal-or-die Scripting Help 8 08/05/2012 01:10 PM
[HELP!] Dialog Response alanhutch Help Archive 0 28/01/2011 06:21 PM


All times are GMT. The time now is 11:12 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.