FCNPC.inc 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /* ---------------------------------
  2. FCNPC Plugin PAWN include
  3. - File: FCNPC.inc
  4. - Author: OrMisicL
  5. ---------------------------------*/
  6. #if defined _FCNPC_included
  7. #endinput
  8. #endif
  9. #define _FCNPC_included
  10. #pragma library FCNPC
  11. // Definitions
  12. #define MOVE_TYPE_WALK 0
  13. #define MOVE_TYPE_RUN 1
  14. #define MOVE_TYPE_SPRINT 2
  15. #define MOVE_TYPE_DRIVE 3
  16. #define MAX_NODES 64
  17. #define NODE_TYPE_NONE (-1)
  18. #define NODE_TYPE_PED 0
  19. #define NODE_TYPE_VEHICLE 1
  20. #define NODE_TYPE_BOAT 2
  21. // Callbacks
  22. forward FCNPC_OnCreate(npcid);
  23. forward FCNPC_OnSpawn(npcid);
  24. forward FCNPC_OnRespawn(npcid);
  25. forward FCNPC_OnDeath(npcid, killerid, weaponid);
  26. forward FCNPC_OnVehicleEntryComplete(npcid, vehicleid, seat);
  27. forward FCNPC_OnVehicleExitComplete(npcid);
  28. forward FCNPC_OnReachDestination(npcid);
  29. forward FCNPC_OnFinishPlayback(npcid);
  30. forward FCNPC_OnTakeDamage(npcid, damagerid, weaponid, bodypart, Float:health_loss);
  31. forward FCNPC_OnFinishNodePoint(npcid, point);
  32. forward FCNPC_OnChangeNode(playerid, nodeid);
  33. forward FCNPC_OnFinishNode(npcid);
  34. // Natives
  35. native FCNPC_SetUpdateRate(rate);
  36. native FCNPC_InitZMap(file[]);
  37. native FCNPC_Create(name[]);
  38. native FCNPC_Destroy(npcid);
  39. native FCNPC_Spawn(npcid, skinid, Float:X, Float:Y, Float:Z);
  40. native FCNPC_Respawn(npcid);
  41. native FCNPC_IsSpawned(npcid);
  42. native FCNPC_Kill(npcid);
  43. native FCNPC_IsDead(npcid);
  44. native FCNPC_SetPosition(npcid, Float:X, Float:Y, Float:Z);
  45. native FCNPC_GetPosition(npcid, &Float:X, &Float:Y, &Float:Z);
  46. native FCNPC_SetAngle(npcid, Float:Angle);
  47. native Float:FCNPC_GetAngle(npcid);
  48. native FCNPC_SetQuaternion(npcid, Float:X, Float:Y, Float:Z, Float:A);
  49. native FCNPC_GetQuaternion(npcid, &Float:X, &Float:Y, &Float:Z, &Float:A);
  50. native FCNPC_SetVelocity(npcid, Float:X, Float:Y, Float:Z);
  51. native FCNPC_GetVelocity(npcid, &Float:X, &Float:Y, &Float:Z);
  52. native FCNPC_SetInterior(npcid, interiorid);
  53. native FCNPC_GetInterior(npcid);
  54. native FCNPC_SetHealth(npcid, Float:health);
  55. native Float:FCNPC_GetHealth(npcid);
  56. native FCNPC_SetArmour(npcid, Float:armour);
  57. native Float:FCNPC_GetArmour(npcid);
  58. native FCNPC_SetSkin(npcid, skinid);
  59. native FCNPC_GetSkin(npcid);
  60. native FCNPC_SetWeapon(npcid, weaponid);
  61. native FCNPC_GetWeapon(npcid);
  62. native FCNPC_SetAmmo(npcid, ammo);
  63. native FCNPC_GetAmmo(npcid);
  64. native FCNPC_SetKeys(npcid, Keys);
  65. native FCNPC_GetKeys(npcid, &UDAnalog, &LRAnalog, &Keys);
  66. native FCNPC_SetSpecialAction(npcid, actionid);
  67. native FCNPC_GetSpecialAction(npcid);
  68. native FCNPC_ToggleReloading(npcid, bool:toggle);
  69. native FCNPC_ToggleInfiniteAmmo(npcid, bool:toggle);
  70. native FCNPC_GoTo(npcid, Float:X, Float:Y, Float:Z, type, Float:speed, UseZMap);
  71. native FCNPC_Stop(npcid);
  72. native FCNPC_IsMoving(npcid);
  73. native FCNPC_AimAt(npcid, Float:X, Float:Y, Float:Z, shoot);
  74. native FCNPC_StopAim(npcid);
  75. native FCNPC_MeleeAttack(npcid, delay);
  76. native FCNPC_StopAttack(npcid);
  77. native FCNPC_IsAiming(npcid);
  78. native FCNPC_IsShooting(npcid);
  79. native FCNPC_IsReloading(npcid);
  80. native FCNPC_EnterVehicle(npcid, vehicleid, seatid, type);
  81. native FCNPC_ExitVehicle(npcid);
  82. native FCNPC_PutInVehicle(npcid, vehicleid, seatid);
  83. native FCNPC_RemoveFromVehicle(npcid);
  84. native FCNPC_GetVehicleID(npcid);
  85. native FCNPC_GetVehicleSeat(npcid);
  86. native FCNPC_StartPlayingPlayback(npcid, file[]);
  87. native FCNPC_StopPlayingPlayback(npcid);
  88. native FCNPC_PausePlayingPlayback(npcid);
  89. native FCNPC_ResumePlayingPlayback(npcid);
  90. native FCNPC_OpenNode(nodeid);
  91. native FCNPC_CloseNode(nodeid);
  92. native FCNPC_IsNodeOpen(nodeid);
  93. native FCNPC_GetNodeType(nodeid);
  94. native FCNPC_SetNodePoint(nodeid, point);
  95. native FCNPC_GetNodePointPosition(nodeid, &Float:X, &Float:Y, &Float:Z);
  96. native FCNPC_GetNodePointCount(nodeid);
  97. native FCNPC_GetNodeInfo(nodeid, &vehnodes, &pednodes, &navinode);
  98. native FCNPC_PlayNode(npcid, nodeid, type);
  99. native FCNPC_StopPlayingNode(npcid);
  100. native FCNPC_GetZGround(Float:x, Float:y, &Float:z);