EMERGENCY [NEED A QUICK HELP]
#1

How will i make an /admins system? This are some code

adminlevel[playerid]


if(adminlevel[playerid] == 4)
Reply
#2

Loop through all players, check if they're admin ( if(adminlevel[playerid] >= 1) ) and send a client message if they are
Reply
#3

yup i know that. But it's not working
Reply
#4

Post the code, we can't point the error out without it ^^
Reply
#5

Hey i wrote it in ur guestbook
should work
Reply
#6

ZCMD
pawn Код:
CMD:admins( playerid, params[ ] )
{
    new c = 0;
    SendClientMessage( playerid, 0xAAAAAA, "Current administrators online: " );
    for( new i = 0; i < MAX_PLAYERS; i++ )
    {
        if( adminlevel[ i ] >= 1 )
        {
            c++;
            new string[ 128 ];
            new pName[ MAX_PLAYER_NAME ];
            GetPlayerName( i, pName, sizeof pName );
            format( string, sizeof string, "Level: %d, Admin: %s", adminlevel[ i ], pName );
            SendClientMessage( playerid, 0xAAAAAA, string );
        }
    }
    if( c == 0 ) SendClientMessage( playerid, 0xAAAAAA, "No administrators online" );
    return 1;
}
Untested.
EDIT: I would really like to know if it did work...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)