Kick everyone besides people with a certain name?
#1

Hello, I want to make a thing so if someone connects, and their name isnt coded into the server, then they're banned..

Its for a BETA testing, and its to help ensure that only beta's get in, and I am locking the server, but the testers can leak the password, so I want to know how I can make it only allow people that are coded into the server

Like for example, I know this wouldnt work but i'm wondering if theres a way of doing it this way

pawn Код:
public OnPlayerConnect(playerid)
{
    if PlayerName(playerid,"Player1");
    {
        SendClientMessage(playerid,color,"Welcome to the server, Player1);
    }
    else if PlayerName(playerid,"
Player2");
    {
        SendClientMessage(playerid,color,"
Welcome to the server, Player2);
    }
    else if PlayerName(playerid,"Player3");
    {
        SendClientMessage(playerid,color,"Welcome to the server, Player3);
    }
    else
    {
        SendClientMessage(playerid,color,"
You are not a beta tester! Banned!");
        BanEx(playerid,"
Beta Testing");
    }
    return 1;
}
??

Thanks
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)