Level 1 = Junior Administrator Level 2 = General Administrator Level 3 = Senior Administrator Level 4 = Head Administrator Level 5 = Excutive Administrator
stock UpdateStatus( playerid ) { if (PlayerInfo[ playerid ][ pVip ] == 0 && PlayerInfo[ playerid ][ Level ] == 0) { format( PlayerInfo[ playerid ][ Status ], 11, "Player" ); } else if ( PlayerInfo[ playerid ][ Level ] >= 5 ) { format( PlayerInfo[ playerid ][ Status ], 25, "Excutive Administrator" ); } else if ( PlayerInfo[ playerid ][ Level ] >= 4 ) { format( PlayerInfo[ playerid ][ Status ], 25, "Head Administrator" ); } else if ( PlayerInfo[ playerid ][ Level ] >= 3 ) { format( PlayerInfo[ playerid ][ Status ], 25, "Senior Administrator" ); } else if ( PlayerInfo[ playerid ][ Level ] >= 2 ) { format( PlayerInfo[ playerid ][ Status ], 25, "General Administrator" ); } else if ( PlayerInfo[ playerid ][ Level ] >= 1 ) { format( PlayerInfo[ playerid ][ Status ], 25, "Junior Administrator" ); }
stock UpdateStatus( playerid ) { if (PlayerInfo[ playerid ][ pVip ] == 0 && PlayerInfo[ playerid ][ Level ] == 0) { format( PlayerInfo[ playerid ][ Status ], 11, "Player" ); } else if ( PlayerInfo[ playerid ][ Level ] == 5 ) { format( PlayerInfo[ playerid ][ Status ], 25, "Excutive Administrator" ); } else if ( PlayerInfo[ playerid ][ Level ] == 4 ) { format( PlayerInfo[ playerid ][ Status ], 25, "Head Administrator" ); } else if ( PlayerInfo[ playerid ][ Level ] == 3 ) { format( PlayerInfo[ playerid ][ Status ], 25, "Senior Administrator" ); } else if ( PlayerInfo[ playerid ][ Level ] == 2 ) { format( PlayerInfo[ playerid ][ Status ], 25, "General Administrator" ); } else if ( PlayerInfo[ playerid ][ Level ] == 1 ) { format( PlayerInfo[ playerid ][ Status ], 25, "Junior Administrator" ); }
try it
Код:
stock UpdateStatus( playerid ) { if (PlayerInfo[ playerid ][ pVip ] == 0 && PlayerInfo[ playerid ][ Level ] == 0) { format( PlayerInfo[ playerid ][ Status ], 11, "Player" ); } else if ( PlayerInfo[ playerid ][ Level ] == 5 ) { format( PlayerInfo[ playerid ][ Status ], 25, "Excutive Administrator" ); } else if ( PlayerInfo[ playerid ][ Level ] == 4 ) { format( PlayerInfo[ playerid ][ Status ], 25, "Head Administrator" ); } else if ( PlayerInfo[ playerid ][ Level ] == 3 ) { format( PlayerInfo[ playerid ][ Status ], 25, "Senior Administrator" ); } else if ( PlayerInfo[ playerid ][ Level ] == 2 ) { format( PlayerInfo[ playerid ][ Status ], 25, "General Administrator" ); } else if ( PlayerInfo[ playerid ][ Level ] == 1 ) { format( PlayerInfo[ playerid ][ Status ], 25, "Junior Administrator" ); } |
new status[MAX_PLAYERS]; stock UpdateStatus(playerid) { switch(PlayerInfo[playerid][Level]) { case 0: status[playerid] = "Player"; case 1: status[playerid] = "Junior Administartor"; case 2: status[playerid] = "General Administrator"; case 3: status[playerid] = "Senior Administartor"; case 4: status[playerid] = "Head Administrator"; case 5: status[playerid] = "Excutive Administrator"; } return 1; }
Show your /admins command or whatever is displaying the admin rank incorrectly.
|
CMD:admins( playerid, params[ ] ) { gsString[ 0 ] = EOS; new V ; format( gsString, sizeof( gsString ), "%s"YE"Administrators:\n", gsString,CountAdmins()); foreach( Player, i ) { if ( PlayerInfo[ i ][ Level ] > 0 ) { format( gsString, sizeof( gsString ), ""W"* %s"W"* %s(%d) "W"(%s)\n\n"YE"Very Important Players:\n", gsString, PlayerName( i ),i, PlayerInfo[ i ][ Status ],PlayerName( i ), i, PlayerInfo[ i ][ pVip ] ); V++; } } format( gsString, sizeof( gsString ), "%s"W"Total of "YE"%d "W"admins/VIP's online!", gsString,CountAdmins()); if ( V == 0 ) { SendClientMessage( playerid, COLOR_ULTRARED, "{FF0000}GEF {7A7A7A}»{DBED15} {BABABA}There are no administrators online." ); SendClientMessage( playerid, COLOR_ULTRARED, "{FF0000}GEF {7A7A7A}»{DBED15} {BABABA}Use /report if you suspect a player of cheating." ); gsString[ 0 ] = EOS; } ShowPlayerDialog( playerid, DIALOG_EMPTY, DIALOG_STYLE_MSGBOX, String_Admin( V), gsString, "Close", "" ); return ( 1 ); } stock CountAdmins() { new count; foreach(Player,i) { if ( PlayerInfo[ i ][ Level ] > 0 ) count++; } return count; }