[Include] [v_NPC v1.1.4] Easy NPC Controlling! [BETA]
#1

Installation:
1. Download the Include.
2. Place it into your "Pawno > Include" folder.
3. Add "#include <a_npc>" and "#include <v_NPC>" above your script.
4. Add "vNPC_OnPlayerConnect(playerid);" at the top of OnPlayerConnect.
5. Add "vNPC_OnPlayerSpawn(playerid);" at the top of OnPlayerSpawn.
6. Use it! For more information about using it check the example code.

Functions:
pawn Код:
vNPC_CreateNPC(name[MAX_PLAYER_NAME], script[32], skinid, bool:usecolor, color = -1, vehmodelid = -1, vehcolor1 = 1, vehcolor2 = 1); // Returns the ID of the NPC.
//name[MAX_PLAYER_NAME] : The ingame name of the NPC.
//script[32] : The name of the script in your npcmodes folder.
//skinid : The ID of the skin the NPC has to wear.
//bool:usecolor : If you want to show the NPC's blimp or not.
//color = -1 : If above is set to true, set this to the color the NPC's blimp has to be. (Optional)
//vehmodelid = -1 : If the NPC is recorded in a car add the model of the vehicle here. (Optional)
//vehcolor1 = 1 : If the NPC is recorded in a car add the first vehicle color here. (Optional)
//vehcolor2 = 1 : If the NPC is recorded in a car add the second vehicle color here. (Optional)

vNPC_ConnectNPC(npcid); // Returns nothing.
//npcid : The ID that was returned at vNPC_CreateNPC.

vNPC_DisconnectNPC(npcid); // Returns nothing.
//npcid : The ID that was returned at vNPC_CreateNPC.
Downloads:
Pastebin (v1.1.4):
- Include
- Example Script

Additional Information:
Remember that this is still the beta version, it has been tested and worked fine.
Please report any bugs, suggestions for the future are also welcome.
If you want to use more then 50 NPC's then you have to change MAX_VNPCS in the include to the amount you want to use.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)