Mostly Harmless

User:Crusha/UltimateMappingTools/VIPlayerEventGate

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search

VIPlayerEventGate

by Crusha K. Rool

UT2004 Object >> Actor >> Triggers >> EventGate >> VIPlayerEventGate (custom)
Package: 
UltimateMappingTools

This receives an incoming (Un)TriggerEvent and performs several checks about the Instigator of this Event. It will (un)trigger the next Event, depending on what the result of the check is.

Properties

Property group 'Events'

BlacklistEvent

Type: name

The optional event that is (un)triggered if the Instigator is in the BlackList.

NoMatchEvent

Type: name

The optional event that is (un)triggered if the Instigator is not in the WhiteList.

Property group 'VIPlayerEventGate'

bKillWarezPlayers

Type: bool

Kill the Instigator immediately, if he's using a demo CD-key. Otherwise nothing happens, no Event will be triggered at all.

Blacklist

Type: array<_PlayerProperties>

Modifiers: private

The normal event will not be called for players matching these criteria. Instead will the BlacklistEvent be called.

Whitelist

Type: array<_PlayerProperties>

Modifiers: private

The Instigators with these criteria trigger the default Event.

Internal variables

WAREZ_ID

Type: string

Modifiers: const

The hash of the demo key.

Default value: "238c7dd4ec4a065e2314c1c8b4d41ca6"

Enums

ECheckResult

What the result of the check can/must be to be valid.

Structs

_PlayerProperties

All these criteria per array entry have to be valid at once.

string PlayerName 
This string must be contained in the Instigator's name. Leaving this blank disables the criterium.
bool bCheckExactName 
Instigator's name must be EXACTLY the one entered in the PlayerName-field. (Unless the field is blank)
ECheckResult MustBeAdmin 
Player must be logged in with server admin rights.
ECheckResult MustBeBot 
Player must be a bot.
bool bVehicleCheck 
True to check whether the Instigator is in the RequiredVehicle, False to ignore this criteria.
class<Vehicle> RequiredVehicle 
The Instigator must be in this vehicle. None = must go by foot ; Vehicle = can be any vehicle.
string PlayerID 
Instigator needs to have this exact sequence of characters somewhere in his hash ID. The longer the sequence, the less the chance of a false-positive, but you should never ever put your full ID there. It's really hard if not nearly impossible to bruteforce the MD5 hash back into the original key but who knows what people do when they have too much time and bad intentions.
int MinimumRequiredScore 
Instigator needs to have at least this much points. Enter a very low value to let everyone pass this check. ;)
int TeamIndex 
Instigator needs to be in this specific team. 0= red, 1= blue, 255= disable check

Functions

Events

Trigger

event Trigger (Actor Other, Pawn EventInstigator)

Overrides: Actor.Trigger

Let's call the check.

UnTrigger

event UnTrigger (Actor Other, Pawn EventInstigator)

Overrides: Actor.UnTrigger

Let's call the Check.

Other instance functions

PerformCheck

function bool PerformCheck (Pawn Instigator, bool bBlacklist)

Run all the criteria checks on the Instigator.


Author comments

This actor is supposed to allow authorized personnel like Admins, clan members or the mapper himself to cause certain Events in the map, what can become pretty handy in conjunction with other actors of my tool set.

However, this actor is basically also a way to let the mapper do certain things to certain players which might not be fair, for example healing one kind of players and keeping the other kind of players from using a certain door, etc.

There are many ways how such a thing can be abused, but I follow the rule that I just offer you the tools and it's about you what you do with them. Keep in mind that players won't play your map if they feel like you give certain players advantages over the others and there is nothing they can do about it. No Admin will put such a map up in which you abuse this tool, unless he can bear to become a pretty empty server quickly.


I also added the restriction to distinguish players with the demo CD-key. Ok, killing them might be too hard, that's why I integrated it optionally, but I somehow found that it would be fair that those who paid for the game has the right to play it in it's full spectrum while the other guys have exceeded their testing time and shouldn't get all the features. Seriously, just buy the game if you haven't done yet.