Help , with command
#1

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
Reply
#2

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
Reply
#3

who can make the cmd for me?
Reply
#4

PHP код:
//zcmd
CMD:telep(playeridparams[])
{
    
ShowPlayerDialog(playerid1337DIALOG_STYLE_PASSWORD"Enter password""Enter password""Enter""Cancel");
    return 
1;
}
//OnDialogResponse
case 1337:
{
    if(!
response) return 1;
    if(
strlen(inputtext) && !strcmp(inputtext"YOURPASSWORD"))
    {
        
SetPlayerPos(playeridXYZ); //coords
        
SendClientMessage(playerid, -1"You are teleported");
    }
    else 
SendClientMessage(playerid, -1"Wrong password");

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)