[Tutorial] [BUD]Blazing User Database | Complete documentation
#9

Quote:
Originally Posted by ToiletDuck
Посмотреть сообщение
btw, nice give me example how to edit an offline acc?
for example /unban?
This should work, I guess.
pawn Код:
CMD:unban( playerid, params[ ] )
{
    new
        uUser;
       
    if( !IsPlayerAdmin( playerid ) ) return SendClientMessage( playerid, -1, "You need to be RCON Admin to use this command." );
    if( sscanf( params, "u", uUser ) ) return SendClientMessage( playerid, -1, "Syntax: /unban <player_name>" );
   
    new
        iUID = BUD::GetNameUID( GetName( uUser ) );
       
    if( BUD::GetIntEntry( iUID, "Banned" ) == 0 ) return SendClientMessage( playerid, -1, "Player not banned" );
    {
        BUD::SetIntEntry( iUID, "Banned", 0 );
        SendClientMessage( playerid, -1, "Player unbaned" );
    }
    return 1;
}
In your database banned users should have value 1 and 0 if not banned.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)