[Help]: Ban Command (Dialog style Input) - 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: [Help]: Ban Command (Dialog style Input) (
/showthread.php?tid=436556)
[Help]: Ban Command (Dialog style Input) -
Areax - 11.05.2013
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!
Re: [Help]: Ban Command (Dialog style Input) -
Areax - 11.05.2013
Bump
Re: [Help]: Ban Command (Dialog style Input) -
_chimera_ - 11.05.2013
Код:
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!
|
AW: [Help]: Ban Command (Dialog style Input) -
Blackazur - 11.05.2013
Maybe like this or so:
https://sampforum.blast.hk/showthread.php?tid=158858
Re: AW: [Help]: Ban Command (Dialog style Input) -
Areax - 12.05.2013
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