06.02.2017, 11:23
PHP код:
#if defined Loop
#undef Loop(%1)
#endif
#define Loop(%1) for(new %1 = GetPlayerPoolSize(); %1 != -1; %1 --) if(IsPlayerConnected(%1))
CMD:viplist(playerid)
{
new count;
Loop(i)
{
if(PlayerInfo[i][pVIP])
{
format(string, sizeof string, "- {ffff00}%s{00ff00}| {0066ff}(ID:%s) {00ff00}| %x %s\n", GetName(i), i, GetVipColor(i), GetVipLevel(i));
strcat(string, string, sizeof string);
count += 1;
}
}
if(!count) return ShowPlayerDialog(playerid, 18, DIALOG_STYLE_MSGBOX, "{00ff00}Online VIPs:","There isn't any online V.I.P", "Ok", "");
else return ShowPlayerDialog(playerid, 18, DIALOG_STYLE_MSGBOX, "{00ff00}Online VIPs:",string, "Okay", "");
}
GetVipLevel(playerid)
{
new str[10];
switch(PlayerInfo[playerid][pVIP])
{
case 0: str = "None";
case 1: str = "Bronze";
case 2: str = "Silver";
case 3: str = "Gold";
}
return str;
}
GetVipColor(playerid)
{
new str[10];
switch(PlayerInfo[playerid][pVIP])
{
case 1: str = "{996600}";
case 2: str = "{adad85}";
case 3: str = "{e68a00}";
}
return str;
}