OnDialogResponse
#1

- Solved
Reply
#2

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

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 ^^
Reply
#4

- Solved
Reply
#5

- Solved
Reply
#6

Test again, I edited my post, sorry :X
Reply
#7

- Solved
Reply
#8

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)