npc.pwn 727 B

1234567891011121314151617181920212223242526272829
  1. #define RECORDING "mynpc" //This is the filename of your recording without the extension.
  2. #define RECORDING_TYPE 1 //1 for in vehicle and 2 for on foot.
  3. #include <a_samp>
  4. #include <a_npc>
  5. main(){}
  6. public OnFilterScriptInit()
  7. {
  8. print("my filterscript");
  9. ConnectNPC("MyFirstNPC","mynpc");
  10. return 1;
  11. }
  12. public OnPlayerConnect(playerid)
  13. {
  14. if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
  15. {
  16. new npcname[MAX_PLAYER_NAME];
  17. GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
  18. if(!strcmp(npcname, "MyFirstNPC", true)) //Checking if the NPC's name is MyFirstNPC
  19. {
  20. }
  21. return 1;
  22. }
  23. //Other stuff for normal players goes here!
  24. return 1;
  25. }