Jump to content

Ovii.Adv

Membru
  • Posts

    15
  • Joined

  • Last visited

Posts posted by Ovii.Adv

  1. On 10/8/2018 at 6:33 PM, peiN said:
    
    mysql_tquery(SQL, "SELECT `name`,`Admin`,`Helper` FROM `users` WHERE `Admin` > '0' OR `Helper` > '0' ORDER BY `id` DESC, `Admin` DESC, `Helper` DESC;", "showStaff", "d", playerid); 

    Incearca sa modifici linia a 3-a cu asta.

    tot la fel e broh

  2. sal baietii,am si eu o problema...

    cu comanda /staff,cand dau /staff gen imi apar toate conturile inregistrate pe server

    nu am facut ceva bine ?

    ceva de genul arata cand dai /staff in joc

    https://imgur.com/a/CpwSTv5

    1. CMD:staff(playerid)
    2. {
    3.     mysql_tquery(SQL, "SELECT `name`,`Admin`,`Helper` FROM `users` ORDER BY `id` DESC, `Admin` DESC, `Helper` DESC;", "showStaff", "d", playerid);
    4.     return 1;
    5. }
    6.  
    7. forward showStaff(playerid);
    8. public showStaff(playerid)
    9. {
    10.     if(cache_num_rows())
    11.     {
    12.         new staff_string[126], string_mare[300];
    13.         string_mare[0] = (EOS);
    14.  
    15.         strcat(string_mare, "Name\tAdmin level\nHelper level\n");
    16.  
    17.         for(new x; x < cache_num_rows(); x++)
    18.         {
    19.             new name[MAX_PLAYER_NAME]; cache_get_field_content(x, "name", name);
    20.             new admin = cache_get_field_content_int(x, "Admin");
    21.             new helper = cache_get_field_content_int(x, "Helper");
    22.  
    23.             format(staff_string, 126, "%s\t%d\t%d\n", name, admin, helper);
    24.             strcat(string_mare, staff_string);
    25.         }
    26.  
    27.         ShowPlayerDialog(playerid, 1, DIALOG_STYLE_TABLIST_HEADERS, "SERVER: List staff", string_mare, "Exit", "");
    28.     }
    29.     return 1;
    30. }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.