SA-MP Forums Archive
OnDialogResponse not working - 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: OnDialogResponse not working (/showthread.php?tid=587726)



OnDialogResponse not working - ChristolisTV - 02.09.2015

Hello there! I have created my own admin filterscript and I am using OnDialogResponse. But it is not working!

OnDialogResponse:
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch(
dialogid){
        case 
DIALOG_LOG:{
            if(!
response)return Kick(playerid);
            if(
strcmp(inputtext,P_DATA[playerid][password],true))return ShowPlayerDialog(playerid,DIALOG_LOG,DIALOG_STYLE_PASSWORD,"{FF0000}Login Error","{FF0000}Wrong password!\n\n\n{FFFFFF}Try again:","Login","Quit");
            
Login(playerid);
            return 
1;
        }
    
        case 
DIALOG_REG:{
            if(!
response)return Kick(playerid);
            if(
strlen(inputtext) == 0)return ShowPlayerDialog(playerid,DIALOG_REG,DIALOG_STYLE_PASSWORD,"{FF0000}Register","{FFFFFF}Welcome to our server for the first time!\nType your new password to register an account!","Register","Quit");
            new 
name[MAX_PLAYER_NAME],q[256],DBResult:Res;
            
GetPlayerName(playerid,name,sizeof(name));
            
format(q,sizeof(q),"INSERT INTO Account (username,password) VALUES ('%s','%s')",name,inputtext);
            
Res db_query(database,q);
            
db_free_result(Res);
            return 
1;
        }
    
    }
     if(
dialogid == SERVER_RADIO)
    {
        if(
response)
        {
            
            switch(
listitem)
            {
                case 
0PlayAudioStreamForPlayer(playerid"http://download1345.mediafire.com/51za8dqgc8eg/4h6ont19u4xkmah/Dillon+Francis%2C+DJ+Snake+-+Get+Low.mp3");
                case 
1StopAudioStreamForPlayer(playerid);
            }
        }
        return 
1;
    }
    return 
1;

My server.cfg:
Код:
echo Executing Server Config...
lanmode 0
hostname Greek Gaming Land | Ultra-H.com
weburl gamingland.forumgreek.com
mapname San Andreas
language Greek - English
password 
rcon_password 123
maxplayers 20
bind 94.23.208.199
port 2488
maxnpc 0
rcon 1
announce 1
query 1
lagcompmode 1
messageholelimit 3000
messageslimit 500
ackslimit 3000
gamemode0 new
filterscripts UltraHost CarTune key2 CAdmin
plugins crashdetect.so  sscanf.so streamer.so  audio.so whirlpool.so
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
Can you help me? Why OnDialogResponse isn't working?


Re: OnDialogResponse not working - ChristolisTV - 02.09.2015

Anyone? Please?


Re: OnDialogResponse not working - SecretBoss - 02.09.2015

Use easyDialog include, I was also facing problems with dialogresponse

easyDialog Topic


Re: OnDialogResponse not working - ChristolisTV - 02.09.2015

Quote:
Originally Posted by SecretBoss
Посмотреть сообщение
Use easyDialog include, I was also facing problems with dialogresponse

easyDialog Topic
OK I will check it out!