Problem with OnDialogResponse and (%)
#8

Quote:
Originally Posted by RedGun2015
Посмотреть сообщение
So, all my gamemode (75%) is modular, every system (almost every system) has his include.
The problem is with hook.

I have a report system (/report - > then I show a dialog and then he need to select 'Report with message')

Then when he write '%s' in the dialog, the server crash (I know i can do that:
Код:
if(strfind(inputtext, "%", true) != -1)  {
        SCM(playerid, -1, "Don't use %%!");
        return 1;
    }
but I already have that in public OnDialogResponse, should I put that code before all OnDialogResponse that i hooked??

EDIT: hook OnDialogResponse is below the public OnDialogResponse...
PHP код:
    for(new 0strlen(inputtext); l++)
    {
        if(
inputtext[i] == '%') { the rest of the code here }
    } 
EDIT:
Or you can just replace it instead of sending a client message.
PHP код:
    for(new 0strlen(inputtext); l++)
    {
        if(
inputtext[i] == '%')  inputtext[i] = '#';
    } 
Reply


Messages In This Thread
Problem with OnDialogResponse and (%) - by RedGun2015 - 30.09.2018, 14:49
Re: Problem with OnDialogResponse and (%) - by RedGun2015 - 01.10.2018, 15:49
Re: Problem with OnDialogResponse and (%) - by v1k1nG - 01.10.2018, 15:56
Re: Problem with OnDialogResponse and (%) - by RedGun2015 - 01.10.2018, 18:43
Re: Problem with OnDialogResponse and (%) - by KinderClans - 01.10.2018, 19:03
Re: Problem with OnDialogResponse and (%) - by v1k1nG - 01.10.2018, 19:03
Re: Problem with OnDialogResponse and (%) - by Banditul18 - 01.10.2018, 19:10
Re: Problem with OnDialogResponse and (%) - by d3Pedro - 01.10.2018, 21:26

Forum Jump:


Users browsing this thread: 1 Guest(s)