dannyvanlierop icon

Rx_Mutator_VoteSystem

dannyvanlierop | PRO | 02/23/17 01:11:08 PM UTC | 0 ⭐ | 6172 👁️ | Never ⏰ | []
UnrealScript |

3 KB

|

None

|

0 👍

/

0 👎

// *****************************************************************************
//  * * * * * * * * * * * * Rx_Mutator_VoteSystem * * * * * * * * * * * * * *
// *****************************************************************************
class Rx_Mutator_VoteSystem extends UTMutator;
 
function bool CheckReplacement(Actor Other)
{   
    if(Other.IsA('Rx_TeamInfo')) 
    { 
        Rx_Game(WorldInfo.Game).PlayerControllerClass = class'Rx_Mutator_VoteSystem_Controller' ; 
    } return true;
}
 
defaultproperties
{
}
 
 
// *****************************************************************************
//  * * * * * * * * * * Rx_Mutator_VoteSystem_Controller * * * * * * * * * * * *
// *****************************************************************************
//class Rx_Controller extends UTPlayerController;
class Rx_Mutator_VoteSystem_Controller extends Rx_Controller;
 
function EnableVoteMenu(bool donate)
{
    // just in case, turn off previous one
    DisableVoteMenu();
 
    if (!donate && WorldInfo.TimeSeconds < NextVoteTime)
    {
        ClientMessage("You must wait"@ int(NextVoteTime - WorldInfo.TimeSeconds) @"more seconds before you can start another vote.");
        return;
    }
    if (donate) VoteHandler = new (self) class'Rx_CreditDonationHandler';
    else VoteHandler = new (self) class'Rx_VoteMenuHandler_Ext';
    VoteHandler.Enabled(self);
}
 
defaultproperties
{
 
}
 
 
 
// *****************************************************************************
//  * * * * * * * * * * * * * Rx_VoteMenuHandler_Ext  * * * * * * * * * * * * *
// *****************************************************************************
//class Rx_VoteMenuHandler extends Object;
class Rx_VoteMenuHandler_Ext extends Rx_VoteMenuHandler;
 
DefaultProperties
{
//  VoteChoiceClasses(0) = class'Rx_VoteMenuChoice_RestartMap'
//  VoteChoiceClasses(1) = class'Rx_VoteMenuChoice_ChangeMap'
//  VoteChoiceClasses(2) = class'Rx_VoteMenuChoice_Surrender'
//  VoteChoiceClasses(3) = class'Rx_VoteMenuChoice_MineBan'
//  VoteChoiceClasses(4) = class'Rx_VoteMenuChoice_RemoveBots'
//  VoteChoiceClasses(5) = class'Rx_VoteMenuChoice_Kick'
//  VoteChoiceClasses(6) = class'Rx_VoteMenuChoice_AddBots'
    VoteChoiceClasses(7) = class'Rx_VoteMenuChoice_Survey'
    VoteChoiceClasses(8) = class'Rx_VoteMenuChoice_ExtraChoice_Ext'
    VoteChoiceClasses(9) = class'Rx_VoteMenuChoice_ExtraChoice_Ext'
}
 
 
 
 
// *****************************************************************************
//  * * * * * * * * * * Rx_VoteMenuChoice_ExtraChoice_Ext * * * * * * * * * * *
// *****************************************************************************
class Rx_VoteMenuChoice_ExtraChoice_Ext extends Rx_VoteMenuChoice;
 
function Init()
{
    ToTeam = Handler.PlayerOwner.PlayerReplicationInfo.Team.TeamIndex;
    Finish();
}
 
function string ComposeTopString()
{
    return super.ComposeTopString() $ " is calling for turn mode1";
}
 
function Execute(Rx_Game game)
{
    // Do something
}
 
DefaultProperties
{
    PercentYesToPass=0.20f
    MenuDisplayString = "ExtraChoice"
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎