Initial Commit
Initial Commit
This commit is contained in:
23
_module/nss/bjreset.nss
Normal file
23
_module/nss/bjreset.nss
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Resets the pc (makes them commandable again) and goes to the next person
|
||||
*
|
||||
* Copyright (C) 2002-2003 Jim Woodgate - woody@realtime.net
|
||||
*/
|
||||
|
||||
void main() {
|
||||
object oPC = GetPCSpeaker();
|
||||
SetCommandable(TRUE, oPC);
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
|
||||
int numPlayers = GetLocalInt(OBJECT_SELF, "BJNUMPLYRS");
|
||||
int currentPlayer = GetLocalInt(OBJECT_SELF, "BJCURRENTPLYR");
|
||||
currentPlayer++;
|
||||
if (currentPlayer < numPlayers) {
|
||||
SetLocalInt(OBJECT_SELF, "BJCURRENTPLYR", currentPlayer);
|
||||
SignalEvent(OBJECT_SELF, EventUserDefined(215));
|
||||
}
|
||||
else {
|
||||
SignalEvent(OBJECT_SELF, EventUserDefined(214));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user