dialogs f*cked up :(
#1

hi all i use 3 scripts that have dialogs one would be Shoobys 3d text, my rescue filterscript, and ppc housing but the thing is they all work kind of , say if i want the house script to work propperly i have to put that first but then the other 2 scripts dont work vise versa.? any help with this, to make them all work together

filterscripts line
pawn Код:
filterscripts ladmin4v2 rescue ppchouse  3DTexts OCar OSpeedtraps  baLLy_Tollz
Reply
#2

Make sure all OnDialogResponse returning 0 at the end of the callback.
Reply
#3

i will check now
Reply
#4

i have checked and i cant find the return on dialog response on this one 3d text
the only return was at end of the script and that was return 1 but i changed to return 0
pawn Код:
#define FILTERSCRIPT

#include <a_samp>

#if defined FILTERSCRIPT

//--------------------------------------------------------------------------------------------------------------

    #define COLOR_RED 0xFF0000AA
    #define COLOR_GREY 0xAFAFAFAA
    #define COLOR_GREEN 0x33AA33AA
    #define COLOR_BRIGHTRED 0xFF0000AA
    #define COLOR_YELLOW 0xFFFF00AA
    #define COLOR_PINK 0xFF66FFAA
    #define COLOR_BLUE 0x3A47DEFF
    #define COLOR_TAN 0xBDB76BAA
    #define COLOR_PURPLE 0x800080AA
    #define COLOR_WHITE 0xFFFFFFAA
    #define COLOR_LIGHTBLUE 0x33CCFFAA
    #define COLOR_ORANGE 0xFF9900AA
    #define COLOR_INDIGO 0x4B00B0AA
    #define COLOR_BLACK 0x00000000
    #define COLOR_DARKGREY 0x696969FF

    new color[MAX_PLAYERS];

//-----------------------------------------------------------------------------------------------------------

public OnFilterScriptInit()
{
    print("\n------------------------------------------");
    print(" ShOoBy's 3D Text System Loaded Succesfully ");
    print("------------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print("              by ShOoBy             ");
    print("----------------------------------\n");
}

#endif

public OnPlayerCommandText(playerid, cmdtext[])
{

//--------------------------------------------------TEXT COMMAND--------------------------------------------

    if (strcmp("/text", cmdtext, true, 10) == 0)
    {
        if(IsPlayerAdmin(playerid)) {
            ShowPlayerDialog(playerid,3333,DIALOG_STYLE_MSGBOX,"{0470FC}Dinamic 3D Text Creator","{88FC04}Do you want to put a\n{04F4FC}3D Text{88FC04} in this location?","Yes","No");
        }
        else
        {
            SendClientMessage(playerid,COLOR_RED,"You are not an Admin.");
        }
        return 1;
    }
   
//-----------------------------------------------------CREDITS----------------------------------------------
   
    if (strcmp("/tcredits", cmdtext, true, 10) == 0)
    {
    ShowPlayerDialog(playerid,6144,DIALOG_STYLE_MSGBOX,"{FE8C00}ShOoBy's 3D Text System Credits","{0400FE}Made by {09FE00}ShOoBy{0400FE}\nSaving help from {EF5C06}CrystyaN {0400FE}and {EF5C06}stuntman","Ok","");
    return 1;
    }
    return 0;
}


//-------------------------------------------------------------------------------------------------------------

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 3335)
    {
        if(response)
        {
            if(color[playerid] == 1)
            {
            new File:file,str[256];
            file=fopen("Texts.txt",io_append);
            new Float:x,Float:y,Float:z;
            GetPlayerPos(playerid,x,y,z);
            Create3DTextLabel(inputtext,COLOR_RED,x,y,z,30.0,0,1);
            format(str, 256, "\r\nCreate3DTextLabel(\"%s\",0xFF0000AA,%.2f, %.2f, %.2f,30.0,1);" ,inputtext, x, y, z);
            fwrite(file,str);
            fwrite(file,"\r\n");
            fclose(file);
            }
            if(color[playerid] == 2)
            {
            new File:file,str[256];
            file=fopen("Texts.txt",io_append);
            new Float:x,Float:y,Float:z;
            GetPlayerPos(playerid,x,y,z);
            format(str, 256, "\r\nCreate3DTextLabel(\"%s\",0x3A47DEFF,%.2f, %.2f, %.2f,30.0,1);" ,inputtext, x, y, z);
            Create3DTextLabel(inputtext,COLOR_BLUE,x,y,z,30.0,0,1);
            fwrite(file,str);
            fwrite(file,"\r\n");
            fclose(file);
            }
            if(color[playerid] == 3)
            {
            new File:file,str[256];
            file=fopen("Texts.txt",io_append);
            new Float:x,Float:y,Float:z;
            GetPlayerPos(playerid,x,y,z);
            format(str, 256, "\r\nCreate3DTextLabel(\"%s\",0x66CC00FF,%.2f, %.2f, %.2f,30.0,1);" ,inputtext, x, y, z);
            Create3DTextLabel(inputtext,COLOR_GREEN,x,y,z,30.0,0,1);
            fwrite(file,str);
            fwrite(file,"\r\n");
            fclose(file);
            }
            if(color[playerid] == 4)
            {
            new File:file,str[256];
            file=fopen("Texts.txt",io_append);
            new Float:x,Float:y,Float:z;
            GetPlayerPos(playerid,x,y,z);
            format(str, 256, "\r\nCreate3DTextLabel(\"%s\",0xFFFF00AA,%.2f, %.2f, %.2f,30.0,1);" ,inputtext, x, y, z);
            Create3DTextLabel(inputtext,COLOR_YELLOW,x,y,z,30.0,0,1);
            fwrite(file,str);
            fwrite(file,"\r\n");
            fclose(file);
            }
            if(color[playerid] == 5)
            {
            new File:file,str[256];
            file=fopen("Texts.txt",io_append);
            new Float:x,Float:y,Float:z;
            GetPlayerPos(playerid,x,y,z);
            format(str, 256, "\r\nCreate3DTextLabel(\"%s\",0xFF9900AA,%.2f, %.2f, %.2f,30.0,1);" ,inputtext, x, y, z);
            Create3DTextLabel(inputtext,COLOR_ORANGE,x,y,z,30.0,0,1);
            fwrite(file,str);
            fwrite(file,"\r\n");
            fclose(file);
            }
            if(color[playerid] == 6)
            {
            new File:file,str[256];
            file=fopen("Texts.txt",io_append);
            new Float:x,Float:y,Float:z;
            GetPlayerPos(playerid,x,y,z);
            format(str, 256, "\r\nCreate3DTextLabel(\"%s\",0xFF66FFFF,%.2f, %.2f, %.2f,30.0,1);" ,inputtext, x, y, z);
            Create3DTextLabel(inputtext,COLOR_PINK,x,y,z,30.0,0,1);
            fwrite(file,str);
            fwrite(file,"\r\n");
            fclose(file);
            }
            if(color[playerid] == 7)
            {
            new File:file,str[256];
            file=fopen("Texts.txt",io_append);
            new Float:x,Float:y,Float:z;
            GetPlayerPos(playerid,x,y,z);
            format(str, 256, "\r\nCreate3DTextLabel(\"%s\",0xAFAFAFAA,%.2f, %.2f, %.2f,30.0,1);" ,inputtext, x, y, z);
            Create3DTextLabel(inputtext,COLOR_GREY,x,y,z,30.0,0,1);
            fwrite(file,str);
            fwrite(file,"\r\n");
            fclose(file);
            }
            if(color[playerid] == 8)
            {
            new File:file,str[256];
            file=fopen("Texts.txt",io_append);
            new Float:x,Float:y,Float:z;
            GetPlayerPos(playerid,x,y,z);
            format(str, 256, "\r\nCreate3DTextLabel(\"%s\",0x4B00B0AA,%.2f, %.2f, %.2f,30.0,1);" ,inputtext, x, y, z);
            Create3DTextLabel(inputtext,COLOR_INDIGO,x,y,z,30.0,0,1);
            fwrite(file,str);
            fwrite(file,"\r\n");
            fclose(file);
            }
        }
    }

//------------------------------------------------------------------------------------------------------------
   
    if(dialogid == 3333)
    {
    if(response) return ShowPlayerDialog(playerid,3334,DIALOG_STYLE_LIST,"Text's Color","{FA0404}Red\n{0704FA}Blue\n{2CF11A}Green\n{E2FF09}Yellow\n{FF4101}Orange\n{E97AFD}Pink\n{7A7A7A}Grey\n{330099}Indigo","Select","Cancel");
    else SendClientMessage(playerid,COLOR_BLUE,"Text haven't been placed");
    }
   
//------------------------------------------------------------------------------------------------------------
   
    if(dialogid == 3334)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0:
                {
                color[playerid] = 1;
                ShowPlayerDialog(playerid,3335,DIALOG_STYLE_INPUT,"{F8FC04}Text","{04FC8C}Please write in this box the {F8FC04}Text{04FC8C}\nthat you want to place here","INPUT","");
                }
                case 1:
                {
                color[playerid]=2;
                ShowPlayerDialog(playerid,3335,DIALOG_STYLE_INPUT,"{F8FC04}Text","{04FC8C}Please write in this box the {F8FC04}Text{04FC8C}\nthat you want to place here","INPUT","");
                }
                case 2:
                {
                color[playerid]=3;
                ShowPlayerDialog(playerid,3335,DIALOG_STYLE_INPUT,"{F8FC04}Text","{04FC8C}Please write in this box the {F8FC04}Text{04FC8C}\nthat you want to place here","INPUT","");
                }
                case 3:
                {
                color[playerid]=4;
                ShowPlayerDialog(playerid,3335,DIALOG_STYLE_INPUT,"{F8FC04}Text","{04FC8C}Please write in this box the {F8FC04}Text{04FC8C}\nthat you want to place here","INPUT","");
                }
                case 4:
                {
                color[playerid]=5;
                ShowPlayerDialog(playerid,3335,DIALOG_STYLE_INPUT,"{F8FC04}Text","{04FC8C}Please write in this box the {F8FC04}Text{04FC8C}\nthat you want to place here","INPUT","");
                }
                case 5:
                {
                color[playerid]=6;
                ShowPlayerDialog(playerid,3335,DIALOG_STYLE_INPUT,"{F8FC04}Text","{04FC8C}Please write in this box the {F8FC04}Text{04FC8C}\nthat you want to place here","INPUT","");
                }
                case 6:
                {
                color[playerid]=7;
                ShowPlayerDialog(playerid,3335,DIALOG_STYLE_INPUT,"{F8FC04}Text","{04FC8C}Please write in this box the {F8FC04}Text{04FC8C}\nthat you want to place here","INPUT","");
                }
                case 7:
                {
                color[playerid]=8;
                ShowPlayerDialog(playerid,3335,DIALOG_STYLE_INPUT,"{F8FC04}Text","{04FC8C}Please write in this box the {F8FC04}Text{04FC8C}\nthat you want to place here","INPUT","");
                }
                case 8:
                {
                color[playerid]=9;
                ShowPlayerDialog(playerid,3335,DIALOG_STYLE_INPUT,"{F8FC04}Text","{04FC8C}Please write in this box the {F8FC04}Text{04FC8C}\nthat you want to place here","INPUT","");
                }
            }
        }
    }
    return 0;
}
Reply
#5

all the dialog ids are different?
if no, change them or try to put everything inside the same script...
Reply
#6

Check if any of the dialogs overlap. They all have to be different, if you use the dialogid '0' in your gamemode, you CANT use the dialogid '0' in a filterscript.
Reply
#7

i wouldnt no how to put all of them in one script :S there all totally diffrent scripts lol

also no dialog ids are the same they are all diffrent i checked that alreaddy.
Reply
#8

and then?
you can put everything inside one.
they dont need to be the same thing.
that's basic...
Reply
#9

basically i just put all includes in right place and so on etc
Reply
#10

Quote:
Originally Posted by [LHT]Bally
Посмотреть сообщение
basically i just put all includes in right place and so on etc
for eg
what's inside onplayerspawn, u put onplayerspawm in the other script
what's inside onfilterscriptinit, u put onfilterscriptinit in the other script
do the same with everything...
if u need help , ask
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)