23.01.2014, 13:49
So, my problem is, i want to mek admin changde for examle hostname (name of server). I want to do it trough dialog. Can i change hostname with the text tiped in dialog. For example i have made:
And ofc DIALOG_HOST where the inputtext should be new name of server:
Thanks
Код:
if(dialogid == DIALOG_RCON) { if(!response) return 1; switch(listitem) { case 0: { SPD(playerid,DIALOG_HOST, DIALOG_STYLE_INPUT, ""BELA"Panel", "Change Hostname\nType new name!\n", "Enter", "Exit"); } bla bla bla
Код:
if(dialogid == DIALOG_HOST) { new host,string[256]; host = strval(inputtext); SendRconCommand("hostname inputtext"); //He always change to text typed here (inputtext) but i want to know can i make it change to name typed in dialog (Inputtext host) :) format(string,sizeof(string),""ZUTA"Admin %s has changed hostname to %d",GetName(playerid),host); SendClientMessageToAll(-1,string); }