REO-EE/_module/nss/record_pc_count.nss
Jaysyn904 f82740bbbd Initial commit
Initial commit
2024-02-22 13:22:03 -05:00

31 lines
907 B
Plaintext

#include "colors_inc"
#include "aps_include"
void main()
{
object oModule = OBJECT_SELF;
int iRecordPlayerCount = GetPersistentInt(oModule, "REO_RECORD_PLAYER_COUNT");
int iNumOfPlayers;
object oPC = GetFirstPC();
while(GetIsObjectValid(oPC))
{
iNumOfPlayers++;
oPC = GetNextPC();
}
// Inform all players that the player count record has been exceeded
if(iNumOfPlayers > iRecordPlayerCount)
{
SetPersistentInt(oModule, "REO_RECORD_PLAYER_COUNT", iNumOfPlayers);
oPC = GetFirstPC();
while(GetIsObjectValid(oPC))
{
FloatingTextStringOnCreature(ColorTokenDM() + "The record for number of simultaneous players connected at the same time has been broken! " + IntToString(iNumOfPlayers) + " players is the new record to beat!" + ColorTokenEnd(), oPC, FALSE);
oPC = GetNextPC();
}
}
}