Help , with command - 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 , with command (
/showthread.php?tid=646535)
Help , with command -
NitroZeth - 18.12.2017
is there any way to make a command, teleportation that has a password? , I mean, to teleport to that place, I need a password, if I put the password right, it directs me to that position, if it's incorrect, it does not
help pls
Re: Help , with command -
Sting. - 18.12.2017
Yea, it is possible. But to create the password, you will have to use Dialogs with
https://sampwiki.blast.hk/wiki/Dialog_Styles
DIALOG_STYLE_PASSWORD
Re: Help , with command -
NitroZeth - 18.12.2017
who can make the cmd for me?
Re: Help , with command -
Argument - 18.12.2017
PHP код:
//zcmd
CMD:telep(playerid, params[])
{
ShowPlayerDialog(playerid, 1337, DIALOG_STYLE_PASSWORD, "Enter password", "Enter password", "Enter", "Cancel");
return 1;
}
//OnDialogResponse
case 1337:
{
if(!response) return 1;
if(strlen(inputtext) && !strcmp(inputtext, "YOURPASSWORD"))
{
SetPlayerPos(playerid, X, Y, Z); //coords
SendClientMessage(playerid, -1, "You are teleported");
}
else SendClientMessage(playerid, -1, "Wrong password");
}