(The following code is a modified version of the PLAYER listing
command that I posted earlier. This version is corrected, and will
now prompt for hitting ENTER every pageful of info)
-------- act.informative.c --------
extern struct player_index_element *player_table;
extern int top_of_p_table;
ACMD(do_players)
{
int i, count = 0;
*buf = 0;
for (i = 0; i <= top_of_p_table; i++) {
sprintf(buf, "%s %-20.20s", buf, (player_table + i)->name);
count++;
if (count == 3) {
count = 0;
sprintf(buf, "\r\n");
}
}
page_string(ch->desc, buf, 1);
}
-------- interpreter.c ---------
ACMD(do_players);
{ "players" , POS_DEAD , do_players , 0, 0 },
Justin Robinson
jmrobins@vermontel.com
VTel --- http://www.vermontel.com/
------
Primacy
ruin@wired.uvm.edu
Ruin! Mud --- wired.uvm.edu:4000
http://wired.uvm.edu/~jmrobins/
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://cspo.queensu.ca/~fletcher/Circle/list_faq.html |
+-----------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/07/00 PST