Advertisement
icorne

v_NPC - Example Script

Jan 13th, 2012
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.64 KB | None | 0 0
  1. #include <a_samp>
  2. #include <a_npc>
  3. #include <v_NPC>
  4.  
  5. new npcfly;
  6.  
  7. public OnFilterScriptInit()
  8. {
  9.     npcfly = vNPC_CreateNPC("TestPilot", "at400_ls", 287, false, 0xFF0000FF, 577, 1, 1);
  10.     return 1;
  11. }
  12.  
  13. public OnPlayerConnect(playerid)
  14. {
  15.     vNPC_OnPlayerConnect(playerid);
  16.     return 1;
  17. }
  18.  
  19. public OnPlayerSpawn(playerid)
  20. {
  21.     vNPC_OnPlayerSpawn(playerid);
  22.     return 1;
  23. }
  24.  
  25. public OnPlayerCommandText(playerid, cmdtext[])
  26. {
  27.     if (strcmp("/connectnpc", cmdtext, true, 10) == 0)
  28.     {
  29.         vNPC_ConnectNPC(npcfly);
  30.         return 1;
  31.     }
  32.     if (strcmp("/disconnectnpc", cmdtext, true, 10) == 0)
  33.     {
  34.         vNPC_DisconnectNPC(npcfly);
  35.         return 1;
  36.     }
  37.     return 0;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement