55using System . Collections . Generic ;
66using UnityEngine ;
77using MEC ;
8+ using Exiled . API . Features . Pickups ;
9+ using System . Linq ;
810
911namespace TestingDummies . SpawningHandler
1012{
@@ -13,7 +15,7 @@ public class Spawn : MonoBehaviour
1315 readonly int IDs = 1000 ;
1416 public Dictionary < Player , GameObject > PlayerPrefabs = new ( ) ;
1517 public Dictionary < Player , FakeConnection > PlayerConnIDs = new ( ) ;
16- public IEnumerator < float > SpawnDum ( string Name , RoleTypeId Role , Player targert )
18+ public IEnumerator < float > SpawnDum ( string Name , RoleTypeId Role , Player target )
1719 {
1820 GameObject newPlayer = Instantiate ( NetworkManager . singleton . playerPrefab ) ;
1921 Player NewPlayer = new ( newPlayer ) ;
@@ -40,10 +42,10 @@ public IEnumerator<float> SpawnDum(string Name, RoleTypeId Role, Player targert)
4042 NewPlayer . RankColor = Plugin . Instance . Config . NPCBadgeColor ;
4143 }
4244 hubPlayer . characterClassManager . GodMode = false ;
43- NewPlayer . RemoteAdminPermissions = PlayerPermissions . AFKImmunity ;
45+ if ( Plugin . Instance . Config . NPCAFKImmunity ) NewPlayer . RemoteAdminPermissions = PlayerPermissions . AFKImmunity ;
4446 yield return Timing . WaitForSeconds ( 0.3f ) ;
4547 NewPlayer . Role . Set ( Role , Exiled . API . Enums . SpawnReason . ForceClass ) ;
46- NewPlayer . Position = targert . Position ;
48+ NewPlayer . Position = target . Position ;
4749 NewPlayer . SessionVariables . Add ( "npc" , true ) ;
4850 yield break ;
4951 }
0 commit comments