protected override void HookEventHandlers() { OnPlayerDeathEvent.Register(HandlePlayerDeath, Priority.High); OnPlayerChatEvent.Register(HandlePlayerChat, Priority.High); OnPlayerCommandEvent.Register(HandlePlayerCommand, Priority.High); OnBlockChangeEvent.Register(HandleBlockChange, Priority.High); OnPlayerSpawningEvent.Register(HandlePlayerSpawning, Priority.High); OnTabListEntryAddedEvent.Register(HandleTabListEntryAdded, Priority.High); OnJoinedLevelEvent.Register(HandleJoinedLevel, Priority.High); base.HookEventHandlers(); }
public override void Load(bool startup) { OnEntitySpawnedEvent.Register(HandleEntitySpawned, Priority.High); OnTabListEntryAddedEvent.Register(HandleTabListEntryAdded, Priority.High); OnMoneyChangedEvent.Register(HandleMoneyChanged, Priority.High); OnPlayerConnectEvent.Register(HandlePlayerConnect, Priority.High); OnPlayerDisconnectEvent.Register(HandlePlayerDisconnect, Priority.High); OnPlayerMoveEvent.Register(HandlePlayerMove, Priority.High); OnPlayerActionEvent.Register(HandlePlayerAction, Priority.High); OnPlayerSpawningEvent.Register(HandlePlayerSpawning, Priority.High); OnBlockChangeEvent.Register(HandleBlockChange, Priority.High); OnLevelUnloadEvent.Register(HandleLevelUnload, Priority.High); }
public override void Load(bool startup) { OnPlayerDeathEvent.Register(HandlePlayerDeath, Priority.High); OnPlayerChatEvent.Register(HandlePlayerChat, Priority.High); OnPlayerCommandEvent.Register(HandlePlayerCommand, Priority.High); OnBlockChangeEvent.Register(HandleBlockChange, Priority.High); OnPlayerDisconnectEvent.Register(HandleDisconnect, Priority.High); OnLevelUnloadEvent.Register(HandleLevelUnload, Priority.High); OnPlayerSpawningEvent.Register(HandlePlayerSpawning, Priority.High); OnTabListEntryAddedEvent.Register(HandleTabListEntryAdded, Priority.High); OnJoinedLevelEvent.Register(HandleOnJoinedLevel, Priority.High); }
protected override void HookEventHandlers() { OnEntitySpawnedEvent.Register(HandleEntitySpawned, Priority.High); OnTabListEntryAddedEvent.Register(HandleTabListEntryAdded, Priority.High); OnMoneyChangedEvent.Register(HandleMoneyChanged, Priority.High); OnBlockChangeEvent.Register(HandleBlockChange, Priority.High); OnPlayerConnectEvent.Register(HandlePlayerConnect, Priority.High); OnPlayerMoveEvent.Register(HandlePlayerMove, Priority.High); OnPlayerSpawningEvent.Register(HandlePlayerSpawning, Priority.High); OnJoinedLevelEvent.Register(HandleJoinedLevel, Priority.High); OnPlayerChatEvent.Register(HandlePlayerChat, Priority.High); base.HookEventHandlers(); }
public void Enable(Player p) { if (!hookedEvents) { OnPlayerClickEvent.Register(PlayerClickCallback, Priority.Low); OnBlockChangeEvent.Register(BlockChangeCallback, Priority.Low); hookedEvents = true; } this.p = p; p.ClearBlockchange(); p.weapon = this; if (p.Supports(CpeExt.PlayerClick)) { p.Message(Name + " engaged, click to fire at will"); } else { p.Message(Name + " engaged, fire at will"); aimer = new AimBox(); aimer.Hook(p); } }