Old Filterscripts no longer work
#1

Older Filterscripts that have the 3D text boxes (Dialogs), after you type a command a box pops up and lets you click the option. I am having issues with them. I can click the option but the box disappears, and nothing happens. How do I solve this issue?

I have tested this on the following FS's that all have these 3D text boxes, and I get the same result.

Trunk FS
Cheats FS
NumberPlate FS

Solved - Thanks burnuk
You must edit ALL of your other filterscript and make sure the last return in OnDialogResponse is 0.

To help other people with this same problem.
How to - Open your filterscript in pawno and Search OnDialogResponse
Scroll to the bottom of the OnDialogResponse code, and change the last return from 1 to 0. Compile.
Repeat for each filterscript you are using.

(If later on you add a new Filterscript to your server, don't forget to edit it also or your dialogs will not work again!)
Reply
#2

are you refering to dialogs? if so you must edit all your other filterscript and make sure the last return in OnDialogResponse is 0.
Reply
#3

Yes that is what I was referring to. I changed the last return to 0, but it did not help.
(Edit: I tested it on the other scripts, and it didnt work on them either)

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case 5876:
        {
            if(!response)
            {
                    SendClientMessage(playerid, COLOR_RED, "You have canceled.");
                    return 1;
            }

            switch(listitem)
            {
                case 0:
                {
                    ShowPlayerDialog(playerid, Red, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]", "Ok", "Cancel");
                }
                case 1:
                {
                    ShowPlayerDialog(playerid, Blue, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]", "Ok", "Cancel");
                }
                case 2:
                {
                    ShowPlayerDialog(playerid, Green, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]", "Ok", "Cancel");
                }
                case 3:
                {
                    ShowPlayerDialog(playerid, Yellow, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]", "Ok", "Cancel");
                }
                case 4:
                {
                    ShowPlayerDialog(playerid, Cyan, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]", "Ok", "Cancel");
                }
                case 5:
                {
                    ShowPlayerDialog(playerid, Pink, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]", "Ok", "Cancel");
                }
                case 6:
                {
                    ShowPlayerDialog(playerid, White, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]", "Ok", "Cancel");
                }
                case 7:
                {
                    ShowPlayerDialog(playerid, Black, DIALOG_STYLE_INPUT, "-=Number Plate","Enter the name [4-8 Character]", "Ok", "Cancel");
                }
            }
        }
    }
    if(dialogid == Red) // Text color red
    {
        if(response)
        {
            if(strlen(inputtext) > 3 && strlen(inputtext) < 9)
            {
                format(string,sizeof(string),"{FF0000}%s",inputtext);
                VehicleId = GetPlayerVehicleID(playerid);
                GetPlayerPos(playerid,X,Y,Z);
                GetVehicleZAngle(VehicleId,Angle);
                SetVehicleNumberPlate(VehicleId,string);
                SetVehicleToRespawn(VehicleId);
                SetVehiclePos(VehicleId,X,Y,Z);
                PutPlayerInVehicle(playerid,VehicleId,0);
                SetVehicleZAngle(VehicleId,Angle);
                SetCameraBehindPlayer(playerid);
            }
            else
            {
                SendClientMessage(playerid, COLOR_RED, "Error: {ffffff}You must enter 4-8 Character.");
                ShowPlayerDialog(playerid, Red, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]\n{ff0000}Error: You must enter 4-8 Character", "Ok", "Cancel");
            }
        }
        if(!response)
        {
            SendClientMessage(playerid, COLOR_RED, "You have canceled.");
        }
    }
    if(dialogid == Green) // Text color Green
    {
        if(response)
        {
            if(strlen(inputtext) > 3 && strlen(inputtext) < 9)
            {
                format(string,sizeof(string),"{0000FF}%s",inputtext);
                VehicleId = GetPlayerVehicleID(playerid);
                GetPlayerPos(playerid,X,Y,Z);
                GetVehicleZAngle(VehicleId,Angle);
                SetVehicleNumberPlate(VehicleId,string);
                SetVehicleToRespawn(VehicleId);
                SetVehiclePos(VehicleId,X,Y,Z);
                PutPlayerInVehicle(playerid,VehicleId,0);
                SetVehicleZAngle(VehicleId,Angle);
                SetCameraBehindPlayer(playerid);
            }
            else
            {
                SendClientMessage(playerid, COLOR_RED, "Error: {ffffff}You must enter 4-8 Character.");
                ShowPlayerDialog(playerid, Green, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]\n{ff0000}Error: You must enter 4-8 Character", "Ok", "Cancel");
            }
        }
        if(!response)
        {
            SendClientMessage(playerid, COLOR_RED, "You have canceled.");
        }
    }
    if(dialogid == Blue) // Text color Blue
    {
        if(response)
        {
            if(strlen(inputtext) > 3 && strlen(inputtext) < 9)
            {
                format(string,sizeof(string),"{00FF00}%s",inputtext);
                VehicleId = GetPlayerVehicleID(playerid);
                GetPlayerPos(playerid,X,Y,Z);
                GetVehicleZAngle(VehicleId,Angle);
                SetVehicleNumberPlate(VehicleId,string);
                SetVehicleToRespawn(VehicleId);
                SetVehiclePos(VehicleId,X,Y,Z);
                PutPlayerInVehicle(playerid,VehicleId,0);
                SetVehicleZAngle(VehicleId,Angle);
                SetCameraBehindPlayer(playerid);
            }
            else
            {
                SendClientMessage(playerid, COLOR_RED, "Error: {ffffff}You must enter 4-8 Character.");
                ShowPlayerDialog(playerid, Blue, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]\n{ff0000}Error: You must enter 4-8 Character", "Ok", "Cancel");
            }
        }
        if(!response)
        {
            SendClientMessage(playerid, COLOR_RED, "You have canceled.");
        }
    }
    if(dialogid == Yellow) // Text color Yellow
    {
        if(response)
        {
            if(strlen(inputtext) > 3 && strlen(inputtext) < 9)
            {
                format(string,sizeof(string),"{FFFF00}%s",inputtext);
                VehicleId = GetPlayerVehicleID(playerid);
                GetPlayerPos(playerid,X,Y,Z);
                GetVehicleZAngle(VehicleId,Angle);
                SetVehicleNumberPlate(VehicleId,string);
                SetVehicleToRespawn(VehicleId);
                SetVehiclePos(VehicleId,X,Y,Z);
                PutPlayerInVehicle(playerid,VehicleId,0);
                SetVehicleZAngle(VehicleId,Angle);
                SetCameraBehindPlayer(playerid);
            }
            else
            {
                SendClientMessage(playerid, COLOR_RED, "Error: {ffffff}You must enter 4-8 Character.");
                ShowPlayerDialog(playerid, Yellow, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]\n{ff0000}Error: You must enter 4-8 Character", "Ok", "Cancel");
            }
        }
        if(!response)
        {
            SendClientMessage(playerid, COLOR_RED, "You have canceled.");
        }
    }
    if(dialogid == Cyan) // Text color Cyan
    {
        if(response)
        {
            if(strlen(inputtext) > 3 && strlen(inputtext) < 9)
            {
                format(string,sizeof(string),"{00FFFF}%s",inputtext);
                VehicleId = GetPlayerVehicleID(playerid);
                GetPlayerPos(playerid,X,Y,Z);
                GetVehicleZAngle(VehicleId,Angle);
                SetVehicleNumberPlate(VehicleId,string);
                SetVehicleToRespawn(VehicleId);
                SetVehiclePos(VehicleId,X,Y,Z);
                PutPlayerInVehicle(playerid,VehicleId,0);
                SetVehicleZAngle(VehicleId,Angle);
                SetCameraBehindPlayer(playerid);
            }
            else
            {
                SendClientMessage(playerid, COLOR_RED, "Error: {ffffff}You must enter 4-8 Character.");
                ShowPlayerDialog(playerid, Cyan, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]\n{ff0000}Error: You must enter 4-8 Character", "Ok", "Cancel");
            }
        }
        if(!response)
        {
            SendClientMessage(playerid, COLOR_RED, "You have canceled.");
        }
    }
    if(dialogid == Pink) // Text color Pink
    {
        if(response)
        {
            if(strlen(inputtext) > 3 && strlen(inputtext) < 9)
            {
                format(string,sizeof(string),"{FF00FF}%s",inputtext);
                VehicleId = GetPlayerVehicleID(playerid);
                GetPlayerPos(playerid,X,Y,Z);
                GetVehicleZAngle(VehicleId,Angle);
                SetVehicleNumberPlate(VehicleId,string);
                SetVehicleToRespawn(VehicleId);
                SetVehiclePos(VehicleId,X,Y,Z);
                PutPlayerInVehicle(playerid,VehicleId,0);
                SetVehicleZAngle(VehicleId,Angle);
                SetCameraBehindPlayer(playerid);
            }
            else
            {
                SendClientMessage(playerid, COLOR_RED, "Error: {ffffff}You must enter 4-8 Character.");
                ShowPlayerDialog(playerid, Pink, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]\n{ff0000}Error: You must enter 4-8 Character", "Ok", "Cancel");
            }
        }
        if(!response)
        {
            SendClientMessage(playerid, COLOR_RED, "You have canceled.");
        }
    }
    if(dialogid == White) // Text color White
    {
        if(response)
        {
            if(strlen(inputtext) > 3 && strlen(inputtext) < 9)
            {
                format(string,sizeof(string),"{F0F0F0}%s",inputtext);
                VehicleId = GetPlayerVehicleID(playerid);
                GetPlayerPos(playerid,X,Y,Z);
                GetVehicleZAngle(VehicleId,Angle);
                SetVehicleNumberPlate(VehicleId,string);
                SetVehicleToRespawn(VehicleId);
                SetVehiclePos(VehicleId,X,Y,Z);
                PutPlayerInVehicle(playerid,VehicleId,0);
                SetVehicleZAngle(VehicleId,Angle);
                SetCameraBehindPlayer(playerid);
            }
            else
            {
                SendClientMessage(playerid, COLOR_RED, "Error: {ffffff}You must enter 4-8 Character.");
                ShowPlayerDialog(playerid, White, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]\n{ff0000}Error: You must enter 4-8 Character", "Ok", "Cancel");
            }
        }
        if(!response)
        {
            SendClientMessage(playerid, COLOR_RED, "You have canceled.");
        }
    }
    if(dialogid == Black) // Text color Black
    {
        if(response)
        {
            if(strlen(inputtext) > 3 && strlen(inputtext) < 9)
            {
                format(string,sizeof(string),"{0F0F0F}%s",inputtext);
                VehicleId = GetPlayerVehicleID(playerid);
                GetPlayerPos(playerid,X,Y,Z);
                GetVehicleZAngle(VehicleId,Angle);
                SetVehicleNumberPlate(VehicleId,string);
                SetVehicleToRespawn(VehicleId);
                SetVehiclePos(VehicleId,X,Y,Z);
                PutPlayerInVehicle(playerid,VehicleId,0);
                SetVehicleZAngle(VehicleId,Angle);
                SetCameraBehindPlayer(playerid);
            }
            else
            {
                SendClientMessage(playerid, COLOR_RED, "Error: {ffffff}You must enter 4-8 Character.");
                ShowPlayerDialog(playerid, Black, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]\n{ff0000}Error: You must enter 4-8 Character", "Ok", "Cancel");
            }
        }
        if(!response)
        {
        SendClientMessage(playerid, COLOR_RED, "You have canceled.");
        }
    }
    return 0;
}
Reply
#4

Me too have like this problem

look one FS make this probleme
Reply
#5

check all your filterscript that you are using with your GM.
Reply
#6

It doesnt work on them either..
Reply
#7

Thanks burnuk for your suggestion. I misunderstood you. I thought you meant to change the last return to zero on the FS's that I was having issues with, and that didnt work. I changed ALL of my FS's like you said, and it works now.
Reply
#8

Quote:
Originally Posted by Rob_Saorp
Посмотреть сообщение
Thanks burnuk for your suggestion. I misunderstood you. I thought you meant to change the last return to zero on the FS's that I was having issues with, and that didnt work. I changed ALL of my FS's like you said, and it works now.
Where this OnDialogResponse ??

Please help me
Reply
#9

Quote:
Originally Posted by Rob_Saorp
Посмотреть сообщение
Older Filterscripts that have the 3D text boxes (Dialogs), after you type a command a box pops up and lets you click the option. I am having issues with them. I can click the option but the box disappears, and nothing happens. How do I solve this issue?

I have tested this on the following FS's that all have these 3D text boxes, and I get the same result.

Trunk FS
Cheats FS
NumberPlate FS

Solved - Thanks burnuk
You must edit ALL of your other filterscript and make sure the last return in OnDialogResponse is 0.

To help other people with this same problem.
How to - Open your filterscript in pawno and Search OnDialogResponse
Scroll to the bottom of the OnDialogResponse code, and change the last return from 1 to 0. Compile.
Repeat for each filterscript you are using.

(If later on you add a new Filterscript to your server, don't forget to edit it also or your dialogs will not work again!)
I want to thank you SO MUCH for updating your initial post w/ the solution and thanks...versus most people who just replace everything with "remove".

Everyone else: Give burnuk and Rob_Saorp +rep if you support people helping people the right way
Reply
#10

Quote:
Originally Posted by morocco
Посмотреть сообщение
Where this OnDialogResponse ??

Please help me
Open your filterscript with pawno and search for it. Hold down ctrl and f a search box will pop up. Type OnDialogResponse in that box. If a filterscript does not have OnDialogResponse then skip it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)