Not changing
#1

So for my script I am trying to add /admins so it shows if you are on duty or off duty. Except it is stuck at off duty.

PHP код:
YCMD:admins(playeridparams[], help) {
    if(
help) {
        
SendClientMessage(playeridX11_WHITE"Lists in game admins");
        return 
1;
    }
    new 
EAdminFlags:aflags EAdminFlags:GetPVarInt(playerid"AdminFlags");
    new 
EAdminFlags:userflags;
    new 
msg[128];
    new 
count;
    
SendClientMessage(playeridCOLOR_YELLOW"{BDBDBD}Admins Online:");
    foreach(
Playeri) {
        if(
IsPlayerConnectEx(i)) {
            
userflags EAdminFlags:GetPVarInt(i"AdminFlags");
            if(((
GetPVarInt(i"AdminHidden") == || aflags EAdminFlags_All)) || aflags EAdminFlags_ServerManager) {
                if(
userflags != EAdminFlags_None) {
                    if(
GetPVarInt(i"AdminHidden") != 2) {
                        if(
GetPVarInt(i"AdminDuty"); == 1){
                        
format(msg,sizeof(msg), "{F2F2F2}%s %s (%s) {30BF00}[ON DUTY]",getAdminName(i), GetPlayerNameEx(iENameType_CharName), GetPlayerNameEx(iENameType_AccountName));
                    } else {
                        
format(msg,sizeof(msg), "{F2F2F2}%s %s (%s) {FF6347}[OFF DUTY]",getAdminName(i), GetPlayerNameEx(iENameType_CharName), GetPlayerNameEx(iENameType_AccountName));
                    }
                        
SendClientMessage(playeridGetPVarInt(i,"AdminHidden") == X11_GREY : (GetPVarInt(i"AdminDuty") == ?COLOR_YELLOW2:getNameTagColour(i)), msg);
                        
count++;
                    }
                }
            }
        }
    }
    if(
count != 0) {
        
format(msgsizeof(msg), "{D8D8D8}Admin Count: %s",getNumberString(count));
        
SendClientMessage(playeridX11_ORANGEmsg);
    }
    return 
1;

Reply
#2

if(GetPVarInt(i, "AdminDuty"); == 1){

i guess that semi colon is blocking your code
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)