[Dialog Input Help Me !!!!]
#1

I am making a command to kick players using the dialog input.
But how do i check what someone has put into the line ?
Код:
	  if(response)
	  {
	    if(listitem == 0) //Kick
	    {  
				ShowPlayerDialog(playerid,666,DIALOG_STYLE_INPUT,"Who do you want to kick?","Kick command.","Kick","Cancel");
			}
		}
That is what i have now but i need to know how you check wich id someone typt in .
I am stuck on this issue for almost a month now and nobody has been able to give me an anwer.
Please help me so i can continue to work instead of looking at the script and doin nothing.

/Artix
Reply
#2

Use a var to store the ID.
Код:
new StoreID[MAX_PLAYERS];
Also, you can use the var to store the actions (kick = 0, ban = 1, mute = 2 for example)

Here is a rip from my mode just as a help in hand for you.
http://pastebin.com/m26b20102

EDIT: Ooops. My coding is from the TAB screen.

Store the task and send to a new dialog box (INPUT), that's where you input the ID.


Reply
#3

Quote:
Originally Posted by Rac3r
Use a var to store the ID.
Код:
new StoreID[MAX_PLAYERS];
Also, you can use the var to store the actions (kick = 0, ban = 1, mute = 2 for example)

Here is a rip from my mode just as a help in hand for you.
http://pastebin.com/m26b20102

EDIT: Ooops. My coding is from the TAB screen.

Store the task and send to a new dialog box (INPUT), that's where you input the ID.


Can you please come on msn to explain i still dont get it .
(i already added you once)

/Artix
Reply
#4

Hmm, I haven't got MSN installed, reinstalled XP.

Give me 5 minutes, I'll write some code for you and post it here.

Reply
#5

Quote:
Originally Posted by Rac3r
Hmm, I haven't got MSN installed, reinstalled XP.

Give me 5 minutes, I'll write some code for you and post it here.

Thank you so much i love you i will putt you in the server credits if you keep helping me ?

/Artix
Reply
#6

Don't worry about credits, I just want to help.

This method, you click on their names in TAB. A good safe way to get the right ID.
Don't forget to add a check if player is admin.
http://pastebin.com/m73c23b48

Any problems, let me know.
Reply
#7

Quote:
Originally Posted by Rac3r
Don't worry about credits, I just want to help.

This method, you click on their names in TAB. A good safe way to get the right ID.
Don't forget to add a check if player is admin.
http://pastebin.com/m73c23b48

Any problems, let me know.
I only get a shitload of errors =/ and clicking a player is not really what i wanted.
I will explane some more :
On the server you do /actions you see a dialog with : minigames animations actions admin vip
You click admin it checks if your level is high enough then if it is you see the commands ( i dont got any commands yet cause it doesnt work)
Then you click kick you see : Wich id would you like to kick.
Then i want when you enter an id and press ok the id you put in the dialog gets kicked i dont want that when you click a player.

/Artix
Reply
#8

Learn how to use DIALOG, input dialog is easy enother, just make sure when the trigger OnDialogResponse, it checks if the inputtext(strval) is online, then kick. Very simple, there are numerous tutorials about it.


I forgot to add these to the TAB screen kick.
Код:
#define MAX_PLAYERSX 500 // server limit
#define COLOR_ORANGE 0xFF9900AA // colour orange
stock PlayerName(playerid)
{
  new name[MAX_PLAYER_NAME];
  GetPlayerName(playerid, name, MAX_PLAYER_NAME);
  return name;
}
Reply
#9

Quote:
Originally Posted by Rac3r
Learn how to use DIALOG, input dialog is easy enother, just make sure when the trigger OnDialogResponse, it checks if the inputtext(strval) is online, then kick. Very simple, there are numerous tutorials about it.


I forgot to add these to the TAB screen kick.
Код:
#define MAX_PLAYERSX 500 // server limit
#define COLOR_ORANGE 0xFF9900AA // colour orange
stock PlayerName(playerid)
{
  new name[MAX_PLAYER_NAME];
  GetPlayerName(playerid, name, MAX_PLAYER_NAME);
  return name;
}
I still dont get it =/.
I have 0 experience with dialogs so i dont get what the fuck your trying to explane :P.
Cant i put my GM in Pastebin and then you edit it a little with comments so i can understand ?

/Artix
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)