SA-MP Forums Archive
I need a dialog - 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: I need a dialog (/showthread.php?tid=613333)



I need a dialog - Hapukoorepakk - 26.07.2016

Can someone make me this dialogue? Thanks.

Код:
COMMAND:vipid(playerid,  params[])
{
    new name[24], string[128];
    new vips = 0;
    SendClientMessage(playerid,0x2E8B57AA,"Vхrgus olevad vipid:");
    for(new i = 0; i < MAX_PLAYERS; i++){
        if (IsPlayerConnected(i)){
            if(PlayerInfo[i][pVipLevel] >= 1){
                GetPlayerName(i, name,sizeof(name));
                format(string,sizeof string," ", name, PlayerInfo[i][pVipLevel]);
                format(string,sizeof string,"%s - VIP Level: %d", name, PlayerInfo[i][pVipLevel]);
                SendClientMessage(playerid,0xFF4500AA,string);
                vips ++;
            }
        }
    }
    if(vips== 0){
        SendClientMessage(playerid, 0xFF0000AA, "Ьhtegi vipi pole vхrgus!");
      }
    return 1;
}



Re: I need a dialog - Hapukoorepakk - 26.07.2016

Please help me


Re: I need a dialog - K0P - 26.07.2016

Код:
COMMAND:vipid(playerid,  params[])
{
    new name[24], string[128];
    new vips = 0;
    new str[300];
    SendClientMessage(playerid,0x2E8B57AA,"Vхrgus olevad vipid:");
    for(new i = 0; i < MAX_PLAYERS; i++){
        if (IsPlayerConnected(i)){
            if(PlayerInfo[i][pVipLevel] >= 1){
                GetPlayerName(i, name,sizeof(name));
                format(string,sizeof string," ", name, PlayerInfo[i][pVipLevel]);
                format(string,sizeof string,"%s - VIP Level: %d\n", name, PlayerInfo[i][pVipLevel]);
				strcat(str, string);
                vips ++;
            }
        }
    }
    ShowPlayerDialog(playerid, 1000 /* change it to a unique one if it collides */, DIALOG_STYLE_MSGBOX, "VIPs", str, "Ok", "");
    if(vips== 0){
        SendClientMessage(playerid, 0xFF0000AA, "Ьhtegi vipi pole vхrgus!");
      }
    return 1;
}



Re: I need a dialog - Hapukoorepakk - 26.07.2016

Thanks K0P!