YCMD:ytb(playerid, params[], help) {
if(playerVariables[playerid][pAdminLevel] < 6) return true;
new dialog[2048];
format(dialog, 2048, "Owner\tPromo code\tYoutube channel\tTimes used\n");
foreach(new yt : server_ytb) {
format(dialog, 2048, "%s{FFFFFF}%s\t%s\t{008080}%s{FFFFFF}\t%d\n", dialog, GetPlayerNameBySQLID(promoVariables[yt][prOwner]), promoVariables[yt][prCode], promoVariables[yt][prYTChannel], GetCodeTimesUsed(yt));
}
ShowPlayerDialogEx(playerid, DIALOG_PROMO_CODES, DIALOG_STYLE_TABLIST_HEADERS, "SERVER: Youtubers", dialog, "Exit", "");
return 1;
}
LinkMania
flaviush
YCMD:codes(playerid, params[], help) {
checkAdmin(6)
gDialog[0] = EOS;
format(gDialog, sizeof(gDialog), "No.\tOwner\tCode\tTimes used\n");
foreach(new c : server_codes) format(gDialog, sizeof(gDialog), "%s%d\t%s\t%s\t%d\n", gDialog, c, promoVariables[c][prOwnerName], promoVariables[c][prCode], GetCodeUsedTimes(c));
ShowPlayerDialog(playerid, DIALOG_GENERAL, DIALOG_STYLE_TABLIST_HEADERS, "Promo codes", gDialog, "Cancel", ""); //aici
return 1;
}