public static playerstate get(int i)
 {
     if (!_playerstate.ContainsKey(i))
     {
         _playerstate[i] = new playerstate();
     }
     return(_playerstate[i]);
 }
        public static @event TriggerRegisterPlayerStateEvent(trigger whichTrigger, player whichPlayer, playerstate whichState, limitop opcode, real limitval)
        {
            @event triEvent = new @event()
            {
                sourcePlayer = whichPlayer, playerStateEvent = whichState
            };

            whichTrigger.events.Add(triEvent);
            return(triEvent);
        }