/// <summary> /// Raises the <see cref="PlayerText" /> event. /// </summary> /// <param name="player">The player triggering the event.</param> /// <param name="e">An <see cref="TextEventArgs" /> that contains the event data. </param> protected virtual void OnPlayerText(GtaPlayer player, TextEventArgs e) { if (PlayerText != null) PlayerText(player, e); }
internal bool OnPlayerText(int playerid, string text) { var args = new TextEventArgs(text); OnPlayerText(GtaPlayer.FindOrCreate(playerid), args); return args.SendToPlayers; }
/// <summary> /// Raises the <see cref="PlayerText" /> event. /// </summary> /// <param name="player">The player triggering the event.</param> /// <param name="e">An <see cref="TextEventArgs" /> that contains the event data. </param> protected virtual void OnPlayerText(BasePlayer player, TextEventArgs e) { PlayerText?.Invoke(player, e); }