Spawning fake players?
Hi
Im trying to test some plugins however i dont have any friends :(. Is there a way to spawn some fake baseplayers to test it?
I got two - three people i can test with but need to add like 10 players any ideas
That won't really test your plugins. You can create NPCs to test.
what do i want to spawn. i tried npctest but doenst count as a base player I do belive?
Anything you spawn won't handle or work the same was a normal player. What exactly are you wanting to test?
teleporting of active players. Im guessing form what you said it wont work :( guess ill find some friends
I mean, you could create an NPC that is based on BasePlayer, but you'd probably be better off just grabbing a friend to test.
How would i do that?
Can i use a command or do i have to code it
Code pretty much.
There is also a usual player `assets/prefabs/player/player.prefab`
Ill give that a go as well thanks all!

You can just use spawn npcplayertest and play around with that, same what misticos proposed except it's way easier to type.

There's also:

spawn scarecrow
spawn murderer
spawn zombie
spawn military
spawn npcplayertest

how can i add iplayer to my baseplayer spawn then. Because i coded my plugin in
CovalencePlugin not rustplugin ;/
mrcameron999
how can i add iplayer to my baseplayer spawn then. Because i coded my plugin in
CovalencePlugin not rustplugin ;/

You can get the BasePlayer from IPlayer with:

var basePlayer = player.Object as BasePlayer;

If you have a BasePlayer, you can get the IPlayer with:

var player = basePlayer.IPlayer;
It does not seem to work when spawning in a player prefab unfortunatly. Im guessing that the prefab doesnt have the ipplayer attached to it or something
[Command("sp")]
        private void spCommand(IPlayer iplayer, string command, string[] args)
        {
            var player = iplayer.Object as BasePlayer;
            var test = GameManager.server.CreateEntity("assets/prefabs/player/player.prefab",player.transform.position, blankQua, true);
            var block1 = test as BasePlayer;
            block1.Spawn();
            block1.IPlayer.Message("test command on ip player");
            

        } 

the player will spawn, but whem trying to run an ipcommand on the baseplayer it will crash and the player goes to sleep



Merged post


Merged post

https://gyazo.com/2ece0f055561bddbb6e0374bee7bddf0
Sure it will because they are not actually connected.