Jump to content

[VanREAL]

Membru
  • Posts

    5
  • Joined

  • Last visited

Posts posted by [VanREAL]

  1. On 4/30/2020 at 1:30 AM, BaFFyJunior said:

    Fa asa daca folosesti foreach:

    
    new string[600];
    foreach(new i: Player)
    {
        format(string, sizeof(string), "%s - %d\n", GetName(playerid), Score);
    }
    ShowPlayerDialog(playerid, DialogNoResponse, DIALOG_STYLE_LIST, "Server players", string, "Ok", "" );

    Inlocuieste dialognoresponse cu un dialog pe care il ai care nu raspunde(nu afiseaza) cu nimic cand apesi pe OK. In loc de Score pui variabila prin care iei scorul jucatorului/levelul.

    Daca nu ai foreach:

    
    new string[600];
    for(new i, j = GetMaxPlayers(); i < j; i++)
    {
        if(!IsPlayerConnected(playerid)) continue;
        format(string, sizeof(string), "%s - %d\n", GetName(playerid), Score);
    }
    ShowPlayerDialog(playerid, DialogNoResponse, DIALOG_STYLE_LIST, "Server players", string, "Ok", "" );

    si ce comanda pun ca sa arate chestia asta

×
×
  • 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.