Connect an NPC to the server.
Namespace:
SampSharp.GameMode.SAMP
Assembly:
SampSharp.GameMode (in SampSharp.GameMode.dll) Version: 0.0.0-local+709673996c0cc3c0733358a87691d1009326afa7
Syntaxpublic static BasePlayer ConnectNPC(
string name,
string script
)
Parameters
- name
- Type: SystemString
The name the NPC should connect as. Must follow the same rules as normal player names. - script
- Type: SystemString
The NPC script name that is located in the npcmodes folder (without the .amx extension).
Return Value
Type:
BasePlayer
An instance of
BasePlayer based on the first available player slot. If no slots are available,
null.
See Also