[Help]: Ban Command (Dialog style Input)
#1

Hello!

I have one question...I already have a ban command, but I don't know how to make a ban command with a DIALOG_STYLE_INPUT. I mean, when you type "/ban", then a DIALOG_STYLE_INPUT will pop up to enter the id of a player and the same for a reason.

Thank you!
Reply
#2

Bump
Reply
#3

Код:
   if (strcmp("/ban", cmdtext, true, 10) == 0)
        {
        ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"?","id","Ok!","Esci");
        return 1;
        }

OnPlayerDialog Response

Код:
if(dialogid == 1 && response == 1)
	{
        Ban(strval(inputtext));
	}
or



Код:
if(dialogid == 1 && response == 1)
	{
        Ban(inputtext);
	}



Quote:
I do not think it works but you try!
Reply
#4

Maybe like this or so:

https://sampforum.blast.hk/showthread.php?tid=158858
Reply
#5

Quote:
Originally Posted by Blackazur
Посмотреть сообщение
I already seen this tutorial, but i don't know how to make that, when I type an ID of a player and if is not connected, then it will be that "that player is not connected". I know that I need to use if(IsPlayerConnected(targetid)), but where to put that? In OneDialogResponse?

In this tutorial https://sampforum.blast.hk/showthread.php?tid=158858, if a player type number "3", he/she will be teleported to where? If he/she type "3" in it, then it will need to say ERROR: There are only 2 teleports! Choose one of them. (Or something like that).

I hope you understand me now, anyway Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)