예제 #1
0
 /// <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);
 }
예제 #2
0
        internal bool OnPlayerRequestSpawn(int playerid)
        {
            var args = new RequestSpawnEventArgs();

            OnPlayerRequestSpawn(GtaPlayer.FindOrCreate(playerid), args);

            return !args.PreventSpawning;
        }
예제 #3
0
 /// <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);
 }