Hello, I was trying to do something myself about the ban system in the Yis code version.
In order to get the information of the players I have listed, I changed the "ban" button to an information button. But this time I can't pull players' data. If the previous command was
I was doing it as. But I don't know how to do it in buttons. I tried a few steps. The results are as follows.
I didn't change their names, but I changed the ban button to player information. So when we click it, it needs to access the player data.
When I use it with this code, it only takes the first player's username. If I do [$id+1], it takes the username of the 2nd player. How can I get players' information respectively? There is no way I haven't tried.
                
            In order to get the information of the players I have listed, I changed the "ban" button to an information button. But this time I can't pull players' data. If the previous command was
 ".GetPlayerVar( $argv,"UserName" ) ." I was doing it as. But I don't know how to do it in buttons. I tried a few steps. The results are as follows.
Sub Ban_player( $KeyFlags,$id )
    ### Set initial values for left/right and top/bottom coordinates ###
    $left_right_ban = 29;
    $top_bottom_ban = 50;
    ### End ###
    $mList = GetListOfPlayers("N");
    $mCount = arrayCount( $mList );
    $plyNum=0;
    ### Close previously opened buttons during automatic refresh, otherwise changed names or people who left aren't shown ###
    FOR ($i=0;$i<=40;$i=$i+1)
        closePrivButton ("player_".$i."_number&player_".$i."_nickname&player_".$i."_status&player_".$i."_ban");
    ENDFOR
    openPrivButton( "ban_screen_bg",$left_right_ban,$top_bottom_ban,142,125,5,-1,16,"");
    openPrivButton( "ban_screen_title",$left_right_ban+1,$top_bottom_ban+1,140,5,5,-1,32,"^7Oyuncu Listesi" );
    WHILE ($plyNum < $mCount)
        $uName = $mList[$plyNum];
        openPrivButton ("player_".$plyNum."_number",$left_right_ban+1,$top_bottom_ban+10,5,5,5,-1,32,$plyNum+1);
        openPrivButton ("player_".$plyNum."_nickname",$left_right_ban+7,$top_bottom_ban+10,25,5,5,-1,32,GetPlayerVar($uName,"NickName") );
        openPrivButton ("player_".$plyNum."_ban",$left_right_ban+33,$top_bottom_ban+10,15,5,5,-1,32,"^1Bilgi",banmenu);
        
        ### Raise $top_bottom_ban with 5 before drawing next button
        $top_bottom_ban=$top_bottom_ban+5;
        ### End ###
        $plyNum=$plyNum+1;
        ### When player 20 is reached, change value of $left_right_connected to start next colum. Set $top_bottom_connected to initial value ###
        IF ($plyNum == 20)
        THEN
          $left_right_ban = 100;
          $top_bottom_ban = 50;
        ENDIF
        ### End ###
    ENDWHILE
        
    openPrivButton( "refresh_ban",69,164,20,5,10,30,32,"^3Yenile (%cpt%)",Ban_player );
    openPrivButton( "close_ban",90,164,20,5,10,-1,32,"^3Kapat",close_ban_player );
EndSubI didn't change their names, but I changed the ban button to player information. So when we click it, it needs to access the player data.
Sub banmenu ( $KeyFlags,$id )
$id = Substr($id,7);
    $mList = GetListOfPlayers("N");
    $uName = $mList[$id+0];
    
    
closePrivButton ("ban_screen_bg&ban_screen_title&refresh_ban&close_ban");
    FOR ($i=0;$i<=40;$i=$i+1)
        closePrivButton ("player_".$i."_number&player_".$i."_nickname&player_".$i."_status&player_".$i."_ban");
    ENDFOR
closePrivButton ("ban_screen_bg&ban_screen_title&refresh_ban&close_ban");
penPrivButton( "modpanelmenu",60,50,70,100,4,-1,32,"");
openPrivButton( "info2",60,52,70,7,4,-1,16,"^7ADMIN PANEL ");
openPrivButton( "modpanelmesaj",60,71,15,5,5,-1,0,"^2Oyuncu K.Adi: ");
openPrivButton( "modpanelmesaj99",67,71,15,5,5,-1,0,"^7". GetPlayerVar ( $uName,"UserName" ) ."");
EndSub
When I use it with this code, it only takes the first player's username. If I do [$id+1], it takes the username of the 2nd player. How can I get players' information respectively? There is no way I haven't tried.