ConnectNPC

From SA-MP Wiki

Jump to: navigation, search

ConnectNPC


Warning: This function was added in SA-MP version 0.3. It is not available in previous versions.


This will connect an NPC to your server.


Parameters:
(name[], script[])
name[]The NPC name.
script[]The NPC scriptname that is located in the npcmodes folder.


This function does not return a specific value.


public OnFilterScriptInit()
{
        ConnectNPC("MyName","myscript");
	return 1;
}

Related Functions

The following functions might be useful as well, as they're related to this function in one way or another.

  • IsPlayerNPC: Check if a player is an NPC or an actual player.


Related Callbacks

The following callbacks might be useful, as they're related to this function in one way or another.

Personal tools
In other languages