Your code is limited to only 2 arrays of vips. With 32 VIPs online, it won't print all of them.
PHP Code:
public print_online_vips(id)
{
static const iMax = 4
new szVips[160], iPlayers[MAX_PLAYERS], iPnum, iCountAll
get_players(iPlayers, iPnum, "ch")
szVips = "^4VIPs Online: ^3"
for(new i, iCount, iPlayer; i < iPnum; i++)
{
iPlayer = iPlayers[i]
if(get_user_flags(iPlayer) & VIP_LEVEL)
{
iCountAll++
if(iCount++ < iMax)
{
add(szVips, charsmax(szVips), fmt("%n", iPlayer))
if(i < iPnum - 1)
{
add(szVips, charsmax(szVips), "^4, ^3")
}
}
else
{
iCount = 0
client_print_color(id, id, szVips)
szVips[0] = EOS
}
}
}
if(iCountAll)
{
client_print_color(id, id, szVips)
}
else
{
client_print_color(id, id, "^4%l", "NO_VIP_ONLINE")
}
return PLUGIN_HANDLED
}
iMax is the maximum number of players that will get printed on each line.
__________________