How to Disable RP Nick Checker for Admins?
#4

Quote:
Originally Posted by SmileyForCheat
Посмотреть сообщение
pawn Код:
public OnPlayerConnect(playerid)
{
    new adname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, adname, sizeof(adname));
        new adnamestring = strfind(adname, "Admin", true);
    if(adnamestring == -1)
    {
        ShowPlayerNameTagForPlayer(playerid, i, false);
    SendClientMessage(playerid, COLOR_BM, ">> OK you are an admin, wait for login..");
    return 1;
    }
   
   
    new plname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, plname, sizeof(plname));
    new namestring = strfind(plname, "_", true);
    if(namestring == -1)
    {
        SendClientMessage(playerid, COLOR_BM, ">> Bad nickname.");
        SendClientMessage(playerid, COLOR_BM, ">> Name type: Firstname_Lastname.");
        Kick(playerid);
        return 1;
        }
    return 1;
    }
I'M Add ShowPlayerNameTagForPlayer(playerid, i, false);
Good LUCK
Wtf? That will not work....

pawn Код:
public OnPlayerConnect( playerid )
{
    new
        useUnderscore[ MAX_PLAYERS ] = { 1, ... }
    ;

    new
        pName[ 24 ]
    ;

    GetPlayerName( playerid, pName, sizeof ( pName ) );

    if ( strfind( pName, "Admin", true ) != -1 ) {
        SendClientMessage(playerid, COLOR_BM, ">> OK you are an admin, wait for login..");
        useUnderscore[ playerid ] = 0;
    }

    useUnderscore[ playerid ] = 1;

    if ( useUnderscore[ playerid ] ) {
        if ( strfind( pName, "_", true ) == -1 ) {
            SendClientMessage(playerid, COLOR_BM, ">> Bad nickname.");
            SendClientMessage(playerid, COLOR_BM, ">> Name type: Firstname_Lastname.");
            Kick(playerid);
        }
    }

    return 1;
}
I think it will work like that...
Reply


Messages In This Thread
How to Disable RP Nick Checker for Admins? - by Matz - 08.07.2011, 21:49
Re: How to Disable RP Nick Checker for Admins? - by SmileyForCheat - 08.07.2011, 21:57
Re: How to Disable RP Nick Checker for Admins? - by Shadoww5 - 09.07.2011, 01:28
Re: How to Disable RP Nick Checker for Admins? - by Basicz - 09.07.2011, 02:55
Re: How to Disable RP Nick Checker for Admins? - by Scenario - 09.07.2011, 03:52
Re: How to Disable RP Nick Checker for Admins? - by Matz - 09.07.2011, 09:54
Re: How to Disable RP Nick Checker for Admins? - by jameskmonger - 09.07.2011, 10:14

Forum Jump:


Users browsing this thread: 1 Guest(s)