I NEED SOME HELP QUICKLY! PLEASE! :(
#1

Ok the thing i want to do is a filterscript that check 3 PlayerName (not ID, NAME!) that are the Admins and just connected a DIALOG_STYLE_MSGBOX come out and say to enter the server password.. if the password is correct he can enter the server, else he will be kicked out! Is this a possible thing to do or is impossible?

Thanks to everyone who help me!

Reply
#2

It is possible to make a FS which checks 3 different player nicks and shows up a dialog box for them to enter a password. If the entered password does not match your defined password (in the FS) then they get kicked.
Reply
#3

Quote:
Originally Posted by jikesh_jus
View Post
It is possible to make a FS which checks 3 different player nicks and shows up a dialog box for them to enter a password. If the entered password does not match your defined password (in the FS) then they get kicked.
exact this i what i would like! can you please help with coding it? **
Reply
#4

UP!!
Reply
#5

pawn Code:
public OnPlayerConnect(playerid)
{
    new pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, sizeof(pName));
    if(strcmp(pName, "Test", true) || strcmp(pName, "Test1", true) || strcmp(pName, "test2", true))
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Password", "Please enter the server password", "Enter", "Quit");
    }
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1)
    {
        if(response)
        {
            new password = strval(inputtext);
            if(password == strval("Testing"))
            {
                // GivePlayerAdmin
            }
            else return Kick(playerid);
        }
        else return Kick(playerid);
    }
    return 1;
}
Not tested it, not even sure if it will work. but i imagine it will be something very similar to that.
Reply
#6

Quote:
Originally Posted by Shadow_
View Post
pawn Code:
public OnPlayerConnect(playerid)
{
    new pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, sizeof(pName));
    if(strcmp(pName, "Test", true) || strcmp(pName, "Test1", true) || strcmp(pName, "test2", true))
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Password", "Please enter the server password", "Enter", "Quit");
    }
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1)
    {
        if(response)
        {
            new password = strval(inputtext);
            if(password == strval("Testing"))
            {
                // GivePlayerAdmin
            }
            else return Kick(playerid);
        }
        else return Kick(playerid);
    }
    return 1;
}
Not tested it, not even sure if it will work. but i imagine it will be something very similar to that.
I Will test it after lunch and tell here if it works! Thanks a lot at the moment bro!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)