Esempio n. 1
0
 /// <summary>
 ///     Raises the <see cref="PlayerRequestClass" /> event.
 /// </summary>
 /// <param name="player">The player triggering the event.</param>
 /// <param name="e">An <see cref="RequestClassEventArgs" /> that contains the event data. </param>
 protected virtual void OnPlayerRequestClass(GtaPlayer player, RequestClassEventArgs e)
 {
     if (PlayerRequestClass != null)
         PlayerRequestClass(player, e);
 }
Esempio n. 2
0
        internal bool OnPlayerRequestClass(int playerid, int classid)
        {
            var args = new RequestClassEventArgs(classid);

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

            return !args.PreventSpawning;
        }
Esempio n. 3
0
 /// <summary>
 ///     Raises the <see cref="PlayerRequestClass" /> event.
 /// </summary>
 /// <param name="player">The player triggering the event.</param>
 /// <param name="e">An <see cref="RequestClassEventArgs" /> that contains the event data. </param>
 protected virtual void OnPlayerRequestClass(BasePlayer player, RequestClassEventArgs e)
 {
     PlayerRequestClass?.Invoke(player, e);
 }