ConnectNPC
From SA-MP Wiki
ConnectNPC
Warning: This is a new function working since SA-MP 0.3. It won't work in previous versions.
This will connect an NPC to your server.
(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, it's best to simply ignore it.
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: Checks if a player is a NPC or not.
