Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

/admins bug

$
0
0
I have a problem with ym /admins command when i get in the players rank changes to Server Owner but when im out he is back to his normal rank

PHP Code:

CMD:admins(playeridparams[])
{
    new 
id;
    new 
n[MAX_PLAYER_NAME];
    new 
count 0string19[256];
    
GetPlayerName(id,n,sizeof(n));
    for(new 
0MAX_PLAYERS++)
    {
    if(
IsPlayerConnected(i))
    {
    if(
GetPVarInt(i"PlayerAdminLevel") < 1)
    {
    
format(string19sizeof(string19), "Trial Moderator : %s (%i)",,playerid);
    
count++;
    }
    if(
GetPVarInt(i"PlayerAdminLevel") < 2)
    {
    
format(string19sizeof(string19), "Moderator : %s (%i)",,playerid);
    
count++;
    }
    if(
GetPVarInt(i"PlayerAdminLevel") < 3)
    {
    
format(string19sizeof(string19), "Administrator : %s (%i)",,playerid);
    
count++;
    }
    if(
GetPVarInt(i"PlayerAdminLevel") < 4)
    {
    
format(string19sizeof(string19), "Chief Administrator : %s (%i)",,playerid);
    
count++;
    }
    if(
GetPVarInt(i"PlayerAdminLevel") < 5)
    {
    
format(string19sizeof(string19), "Server Owner : %s (%i)",,playerid);
    
count++;
    }
    }
    }
    if(
count == 0)
    {
    
SendClientMessage(playeridCOLOR_GREEN"");
    
SendClientMessage(playeridCOLOR_GREEN"|======== Online Admins =======|");
    
SendClientMessage(playeridCOLOR_WHITE"- No Admins Online at Time!");
    
SendClientMessage(playeridCOLOR_GREEN"|==============================|");
    
SendClientMessage(playeridCOLOR_GREEN"");
    }
    else
    {
    
SendClientMessage(playeridCOLOR_GREEN"");
    
SendClientMessage(playeridCOLOR_GREEN"|======== Online Admins =======|");
    
SendClientMessage(playeridCOLOR_WHITEstring19);
    
SendClientMessage(playeridCOLOR_GREEN"|==============================|");
    
SendClientMessage(playeridCOLOR_GREEN"");
    }
    return 
1;



Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>