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



OnDialogResponse - maksicnm - 26.10.2017

- Solved


Re: OnDialogResponse - Kraeror - 26.10.2017

Try this:
PHP код:
if(dialogid == DIALOG_SERVER_HOSTNAME)
{
    if(!
response) return 1;
    if(
response)
    {
        new 
hostname;
        new 
string[128];
         if(
strlen(inputtext) < || strlen(inputtext) > 30) return SPD(playeridDIALOG_SERVER_HOSTNAMEDSI"HOSTNAME""Hostname ne sme biti imate < 3 || > 30 karaktera!""Uredu""Exit");
           
format(string,128,"hostname %s",inputtext);
           
SendRconCommand(string);
           return 
1;
    }

Edited: Try now!!!


Re: OnDialogResponse - StrikerZ - 26.10.2017

Use this instead of strval
PHP код:
hostname strlen(inputtext); 
https://sampwiki.blast.hk/wiki/Strlen
Edit: Looks like we posted together but I got late ^^


Re: OnDialogResponse - maksicnm - 26.10.2017

- Solved


Re: OnDialogResponse - maksicnm - 26.10.2017

- Solved


Re: OnDialogResponse - Kraeror - 26.10.2017

Test again, I edited my post, sorry :X


Re: OnDialogResponse - maksicnm - 26.10.2017

- Solved


Re: OnDialogResponse - Kraeror - 26.10.2017

Use this:
PHP код:
if(dialogid == DIALOG_SERVER_HOSTNAME

    if(!
response) return 1
    if(
response
    { 
        new 
hostname
        new 
string[128]; 
         if(
strlen(inputtext) < || strlen(inputtext) > 30) return SPD(playeridDIALOG_SERVER_HOSTNAMEDSI"HOSTNAME""Hostname ne sme biti imate < 3 || > 30 karaktera!""Uredu""Exit"); 
           
format(string,128,"hostname %s",inputtext); 
           
SendRconCommand(string); 
           return 
1
    } 




Re: OnDialogResponse - maksicnm - 26.10.2017

HostName: It worked, thx <3
Address: localhost:7777
Players: 1 / 50
Ping: 2
Mode: AG:RP v0.1
Language: -