Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 |
/****************************************************************************** MutPlayerRedirector Creation date: 2011-09-20 18:32 Last change: $Id$ Copyright © 2011, Wormbo Website: http://www.koehler-homepage.de/Wormbo/ Feel free to reuse this code. Send me a note if you found it helpful or want to report bugs/provide improvements. Please ask for permission first, if you intend to make money off reused code. ******************************************************************************/ class MutPlayerRedirector extends Mutator config; var() config string RedirectionURL; var array<PlayerController> NewPlayers; function bool CheckReplacement(Actor Other, out byte bSuperRelevant) { if (PlayerController(Other) != None) NewPlayers[NewPlayers.Length] = PlayerController(Other); return true; } function Tick(float DeltaTime) { if (NewPlayers.Length > 0 && RedirectionURL != "") { if (NewPlayers[0] != None && NetConnection(NewPlayers[0].Player) != None) NewPlayers[0].ClientTravel(RedirectionURL, TRAVEL_Absolute, False); NewPlayers.Remove(0, 1); } } static function FillPlayInfo(PlayInfo PlayInfo) { Super.FillPlayInfo(PlayInfo); PlayInfo.AddSetting(default.ServerGroup, "RedirectionURL", "Player Redirection URL", 0, 0, "Text", "100"); } static event string GetDescriptionText(string PropName) { if (PropName == "RedirectionURL") return "URL to send connecting players to."; return Super.GetDescriptionText(PropName); } //============================================================================= // Default values //============================================================================= defaultproperties { FriendlyName = "Player Redirector" Description = "Sends players to a different server right after they connected." } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |