SA-MP Forums Archive
Dialog problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dialog problem (/showthread.php?tid=595558)



Dialog problem - TwinkiDaBoss - 04.12.2015

Simple, it shows only 1 administrator, mostly the last one logged in.
PHP код:
CMD:admins(playerid,params[]) {
    
#pragma unused params
    
new string[128],count;
    for (new 
0MAX_PLAYERSi++) {
        if(
IsPlayerConnected(i)) {
            if(
AccInfo[i][Admin] >= 1) {
                
format(string,sizeof(string),"{15D4ED}%s\t{FFFFFF}%s\t%s\n",GetName(i),GetPlayerAdminRank(i),GetAODStatus(i));
                
count++;
            }
        }
    }
    if(
count != 1) {
        
ShowPlayerDialog(playerid,DIALOG_ADMINS,DIALOG_STYLE_TABLIST,"Administrators online",string,"Confirm","Decline");
    }
     else 
ShowPlayerDialog(playeridDIALOG_ADMINSDIALOG_STYLE_MSGBOX"[!] Online Admins""No online admins""OK""");
    return 
true;




Re: Dialog problem - ATGOggy - 04.12.2015

Try this:
PHP код:
format(string,sizeof(string),"%s{15D4ED}%s\t{FFFFFF}%s\t%s\n",stringGetName(i),GetPlayerAdminRank(i),GetAODStatus(i)); 



Re: Dialog problem - TwinkiDaBoss - 04.12.2015

Thanks
+rep