Is This Bug or anything else
#1

hello friends
it is bug or anything else i don't know but help me out from this problem
i defined admin level as my own like this
Код:
Level 1 = Junior Administrator
Level 2 = General Administrator
Level 3 = Senior Administrator
Level 4 = Head Administrator
Level 5 = Excutive Administrator
you can check in these images
1.
2.
when i went for testing it
i kept my level 5
/setlevel 0 5
when i checked /admins cmd
it shows i'm Head Adminstrator
it need to show Excutive Administrator
again when i kept my level 4 /setlevel 0 4
It shows i'm senior administrator admins /cmds
next i kept level 3 for me /setlevel 0 3
it shows General Adminstrator
level 2 /setlevel Junior Admistrator
level 1 /setlevel Excutive Administrator it shows
it need to show Level Junior Adminstrator
Here i have some proofs
See

i kept my level 1 in this image but it shows Excutive administrator

Here it shows Junior Administrator on level 2



check the chat in these images what i'm keeping my level and what level it shows on /admins command
Help Me



Sorry for bad English
Reply
#2

Change [Level] >= ones to [Level]==
Reply
#3

paste ur code here or change it like @SonnyGamer says
Reply
#4

Here is the code
Код:
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" );
	}
Reply
#5

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" );
	}
Reply
#6

Quote:
Originally Posted by vikoo
Посмотреть сообщение
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" );
	}
Not Worked
Reply
#7

Show your /admins command or whatever is displaying the admin rank incorrectly.
Reply
#8

Try this
Код:
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;
}
Reply
#9

Show the code which include the dialog.
Reply
#10

Quote:
Originally Posted by Craft.
Посмотреть сообщение
Show your /admins command or whatever is displaying the admin rank incorrectly.
Here is the code
Код:
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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)