Initial Commit
Initial Commit
This commit is contained in:
20
_module/nss/bjnextplyr.nss
Normal file
20
_module/nss/bjnextplyr.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Script for handling PlayAgain and actually restarting
|
||||
*
|
||||
* Copyright (C) 2002-2003 Jim Woodgate - woody@realtime.net
|
||||
*/
|
||||
|
||||
void main()
|
||||
{
|
||||
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