Ah ok, if you only want the numbers displayed and not the player's names then this should work:
elseif ($2 == !players) || ($2 == !pmplayers) {
if ($vcmp.cmdcheck(!players,%id) == fail) !halt
else {
var %aa = 0,%bb = 0
while (%aa <= 50) {
if ($vcmp.level(%aa) >= 1) {
inc %bb
}
inc %aa
}
vcmp.cmdsay $2 %id Online Players: $+($chr(90),%bb,/30,$chr(91))
}
}
Also dont forget to add the command name (!players) and its required-to-use level to the ini file.
Also this will only count the players who's level is more than or equal to 1.
If you want the script to count all players in the server, no matter what their level is, then use this instead:
elseif ($2 == !players) || ($2 == !pmplayers) {
if ($vcmp.cmdcheck(!players,%id) == fail) !halt
else {
var %aa = 0,%bb = 0
while (%aa <= 50) {
if ($vcmp.name(%aa) != Unknown) {
inc %bb
}
inc %aa
}
vcmp.cmdsay $2 %id Online Players: $+($chr(90),%bb,/30,$chr(91))
}
}