SA-MP Forums Archive
Question about input limit - 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: Question about input limit (/showthread.php?tid=649365)



Question about input limit - jasperschellekens - 07.02.2018

So if i am right the limit of dialog_style_input is 128.
Is there another kind of way with a bigger input box which allows more characters?
Or a way to bypass this limit?


Re: Question about input limit - solstice_ - 07.02.2018

PHP код:
#define DIALOG_INPUT 0
CMD:input(playeridparams[])
{
    new 
input[2000];
    
strcat(input"Put your 128+ characters message here.");
    
ShowPlayerDialog(playeridDIALOG_INPUTDIALOG_STYLE_INPUT"Input"input"Okay""Cancel");
    return 
1;

Not sure if that's what you meant.


Re: Question about input limit - jasperschellekens - 07.02.2018

Quote:
Originally Posted by willbedie
Посмотреть сообщение
PHP код:
#define DIALOG_INPUT 0
CMD:input(playeridparams[])
{
    new 
input[2000];
    
strcat(input"Put your 128+ characters message here.");
    
ShowPlayerDialog(playeridDIALOG_INPUTDIALOG_STYLE_INPUT"Input"input"Okay""Cancel");
    return 
1;

Not sure if that's what you meant.
thank you but you misunderstood. When you display DIALOG_INPUT it only allows you to enter 128 characters right? i assume that because that is the limit.
I need to know how i can add more then 128.

I need that because when you create a note in the system i am creating it uses alot more then 128 characters and i want players be able to enter bigger notes.

example:
http://217.62.194.69/sa-mp-535.png
http://217.62.194.69/sa-mp-534.png


Re: Question about input limit - solstice_ - 07.02.2018

Quote:
Originally Posted by jasperschellekens
Посмотреть сообщение
thank you but you misunderstood. When you display DIALOG_INPUT it only allows you to enter 128 characters right? i assume that because that is the limit.
I need to know how i can add more then 128.

I need that because when you create a note in the system i am creating it uses alot more then 128 characters and i want players be able to enter bigger notes.

example:
http://217.62.194.69/sa-mp-535.png
http://217.62.194.69/sa-mp-534.png
Oh sorry, i thought that you were talking about the text, well i have no idea...


Re: Question about input limit - Dayrion - 07.02.2018

Unfortunately, you can't bypass this limit. It's like asking if we can bypass the input chattext limit. Sorry for you!


Re: Question about input limit - Gammix - 07.02.2018

No you cannot bypass the limit.

What you can do is show multiple input dialogs and strcat your global string untill player decides to finish.

Make secondary button a finish input button or check if player writes a special keyword in input field like "end" or "finish".


Re: Question about input limit - jasperschellekens - 07.02.2018

Thank you for the response.
I think bigger input boxes should be included in a next samp update :P

@Gammix i am going to do that thank you for the tip

@Dayrion of course it is like asking if we can bypass the input chattext limit because that is exactly what i did.


Re: Question about input limit - Dayrion - 07.02.2018

Quote:
Originally Posted by jasperschellekens
Посмотреть сообщение
@Dayrion of course it is like asking if we can bypass the input chattext limit because that is exactly what i did.
I'm wondering how did you do that.


Re: Question about input limit - jasperschellekens - 08.02.2018

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
I'm wondering how did you do that.
I wondering How you noticed


OT:
If anyone does want to do the same thing like i, this code will work:

PHP код:
           new tmpinput[128], filepl[64], tmpoldinput[2000], tmpnewinput[2000];
            
format(tmpinputsizeof(tmpinput), "%s"inputtext);
            
format(fileplsizeof(filepl), "Accounts/%s.ini"GetName(playerid));
            
format(tmpoldinputsizeof(tmpoldinput), "%s"INI_Get(filepl,"MDCCreateNoteTemp"));
            
format(tmpnewinputsizeof(tmpnewinput), "%s %s"tmpoldinputtmpinput);
            
INI_Set(filepl,"MDCCreateNoteTemp",tmpnewinput); 
You might have to edit it, but it will give you the feeling of how it works.