mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
clean-up and make game interface gsc consistent
This commit is contained in:
@ -1,45 +1,48 @@
|
||||
init()
|
||||
Init()
|
||||
{
|
||||
|
||||
level.startmessagedefaultduration = 2;
|
||||
level.regulargamemessages = spawnstruct();
|
||||
level.regulargamemessages.waittime = 6;
|
||||
|
||||
|
||||
level thread onplayerconnect();
|
||||
thread OnPlayerConnect();
|
||||
}
|
||||
|
||||
onplayerconnect()
|
||||
OnPlayerConnect()
|
||||
{
|
||||
for ( ;; )
|
||||
{
|
||||
level waittill( "connecting", player );
|
||||
player thread displaypopupswaiter();
|
||||
player thread DisplaypopupsWaiter()();
|
||||
}
|
||||
}
|
||||
|
||||
displaypopupswaiter()
|
||||
DisplaypopupsWaiter()
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self.ranknotifyqueue = [];
|
||||
if ( !isDefined( self.pers[ "challengeNotifyQueue" ] ) )
|
||||
|
||||
if ( !IsDefined( self.pers[ "challengeNotifyQueue" ] ) )
|
||||
{
|
||||
self.pers[ "challengeNotifyQueue" ] = [];
|
||||
}
|
||||
if ( !isDefined( self.pers[ "contractNotifyQueue" ] ) )
|
||||
if ( !IsDefined( self.pers[ "contractNotifyQueue" ] ) )
|
||||
{
|
||||
self.pers[ "contractNotifyQueue" ] = [];
|
||||
}
|
||||
|
||||
self.messagenotifyqueue = [];
|
||||
self.startmessagenotifyqueue = [];
|
||||
self.wagernotifyqueue = [];
|
||||
|
||||
while ( !level.gameended )
|
||||
{
|
||||
if ( self.startmessagenotifyqueue.size == 0 && self.messagenotifyqueue.size == 0 )
|
||||
{
|
||||
self waittill( "received award" );
|
||||
}
|
||||
|
||||
waittillframeend;
|
||||
|
||||
if ( level.gameended )
|
||||
{
|
||||
return;
|
||||
@ -50,7 +53,7 @@ displaypopupswaiter()
|
||||
{
|
||||
nextnotifydata = self.startmessagenotifyqueue[ 0 ];
|
||||
arrayremoveindex( self.startmessagenotifyqueue, 0, 0 );
|
||||
if ( isDefined( nextnotifydata.duration ) )
|
||||
if ( IsDefined( nextnotifydata.duration ) )
|
||||
{
|
||||
duration = nextnotifydata.duration;
|
||||
}
|
||||
@ -58,15 +61,18 @@ displaypopupswaiter()
|
||||
{
|
||||
duration = level.startmessagedefaultduration;
|
||||
}
|
||||
|
||||
self maps\mp\gametypes_zm\_hud_message::shownotifymessage( nextnotifydata, duration );
|
||||
wait duration;
|
||||
wait ( duration );
|
||||
|
||||
continue;
|
||||
}
|
||||
else if ( self.messagenotifyqueue.size > 0 )
|
||||
{
|
||||
nextnotifydata = self.messagenotifyqueue[ 0 ];
|
||||
arrayremoveindex( self.messagenotifyqueue, 0, 0 );
|
||||
if ( isDefined( nextnotifydata.duration ) )
|
||||
|
||||
if ( IsDefined( nextnotifydata.duration ) )
|
||||
{
|
||||
duration = nextnotifydata.duration;
|
||||
}
|
||||
@ -74,13 +80,14 @@ displaypopupswaiter()
|
||||
{
|
||||
duration = level.regulargamemessages.waittime;
|
||||
}
|
||||
|
||||
self maps\mp\gametypes_zm\_hud_message::shownotifymessage( nextnotifydata, duration );
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
wait 1;
|
||||
wait ( 1 );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user