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