Skip to content

Releases: ziggi/FCNPC

FCNPC 1.8.1

05 Jan 14:17
Compare
Choose a tag to compare
  • Fix move path and move path point validation (crash fix)

FCNPC 1.8.0

04 Jan 20:06
Compare
Choose a tag to compare

Version notes

  • #106: Add ability to disable FCNPC crash log
  • #82: Add FCNPC_GetValidArray function
  • #107: Add FCNPC_SetSpeed and FCNPC_GetSpeed functions
  • #96: Fix shooting hit target vector for players on line of fire
  • #98: Fix default NPC ping and IP
  • Fix sync updates for melee attack with high delay
  • Reset moving keys in GoTo function
  • MapAndreas now working only in 0 interior
  • Rewrite FCNPC sample script
  • Fix move paths and points ids bugs
  • #121: Fix for empty NPC name crash

New functions

native FCNPC_SetSpeed(npcid, Float:speed);
native Float:FCNPC_GetSpeed(npcid);
native FCNPC_GetValidArray(npcs[], const size = sizeof(npcs));
native FCNPC_ToggleCrashLogCreation(bool:toggle);
native FCNPC_GetCrashLogCreation();

FCNPC 1.7.6

07 Oct 12:42
Compare
Choose a tag to compare

Fixes

  • #105: Now NPCs are despawning after the GMX
  • Now NPCs is not dying after the GMX
  • #105: Now FCNPC_Create returns current NPC id if he are already on the server
  • #109: Fix NPC key setting
  • Fix crash after calling FCNPC_Destroy in some callbacks
  • #108: Attempt to fix nodes infinity loop bug

New functions

native FCNPC_GetPluginVersion(version[], const size = sizeof(version));

FCNPC 1.7.5

06 Sep 17:38
Compare
Choose a tag to compare

Version notes

  • #103: Add compatibility with Linux SA-MP server 0.3.7 R2-2-1

FCNPC 1.7.4

15 Aug 17:24
Compare
Choose a tag to compare

Version notes

  • #84: Add FCNPC_DISABLE_VERSION_CHECK define for add ability to disable version check
  • #84: Additional checks to response data after version request
  • Call FCNPC_OnGiveDamage when an NPC gives damage to another NPC
  • Update error messages (thanks to @WoutProvost)
  • #92: Now plugin tickrate can be changed
  • Add FCNPC_GetUpdateRate, FCNPC_SetTickRate and FCNPC_GetTickRate functions
  • #90: Added declaration for some needed callback functions
  • Removed upper bound for vehicles health
  • #83: Rename definitions

Fixes

  • Now NPC can't give damage to dead NPC
  • #89: Fixed error reporting for invalid and stolen names
  • #93: Fix OnVehicleEntryComplete vehicle ID and angle

New functions

native FCNPC_GetUpdateRate();
native FCNPC_SetTickRate(rate);
native FCNPC_GetTickRate();

Changed defines

#define FCNPC_MOVE_TYPE_AUTO      (-1)
#define FCNPC_MOVE_TYPE_WALK      (0)
#define FCNPC_MOVE_TYPE_RUN       (1)
#define FCNPC_MOVE_TYPE_SPRINT    (2)
#define FCNPC_MOVE_TYPE_DRIVE     (3)

#define FCNPC_MOVE_SPEED_AUTO     (-1.0)
#define FCNPC_MOVE_SPEED_WALK     (0.1552086)
#define FCNPC_MOVE_SPEED_RUN      (0.56444)
#define FCNPC_MOVE_SPEED_SPRINT   (0.926784)

#define FCNPC_MAX_NODES           (64)

#define FCNPC_INVALID_MOVEPATH_ID (-1)
#define FCNPC_INVALID_RECORD_ID   (-1)

FCNPC 1.7.3

14 Jun 13:53
Compare
Choose a tag to compare

Version notes

  • #73: Add stopdelay parameter to GoTo functions

Fixes

  • #81: Fix node crash
  • Fix encoding and line endings in sample scripts
  • Fix FCNPC including in sample scripts
  • Disabled killing of dead NPC
  • GetNumberMovePoint returns 0 if path is invalid
  • Added exception handling in CreateMovePath, now this returns INVALID_MOVEPATH_ID if failure

Changed functions

native FCNPC_GoTo(npcid, Float:x, Float:y, Float:z, type = MOVE_TYPE_AUTO, Float:speed = MOVE_SPEED_AUTO, bool:UseMapAndreas = false, Float:radius = 0.0, bool:setangle = true, Float:dist_offset = 0.0, stopdelay = 250);
native FCNPC_GoToPlayer(npcid, playerid, type = MOVE_TYPE_AUTO, Float:speed = MOVE_SPEED_AUTO, bool:UseMapAndreas = false, Float:radius = 0.0, bool:setangle = true, Float:dist_offset = 0.0, Float:dist_check = 1.5, stopdelay = 250);

FCNPC 1.7.2

01 May 06:10
Compare
Choose a tag to compare

Fixes

  • Fix SetWeaponClipSize
  • Fix SetWeaponInfo
  • Fix SetWeaponState
  • Fix SetWeaponSkill
  • Reset ammo in clip after SetWeapon
  • Fix infinite loop and instant ammo refill when starting to shoot (#75)
  • Infinite ammo fix infinite loop
  • Fix reloading for one bullet weapons (#77)
  • Fix double handed weapon reload time
  • Fix StopAim while reloading
  • Fix GetWeaponActualReloadTime for double hadned weawpons
  • Fix weapon info array

FCNPC 1.7.1

16 Apr 14:54
Compare
Choose a tag to compare

Version notes

  • Rename GetWeaponClipSize to GetWeaponActualClipSize add new GetWeaponClipSize
  • Add AmmoInClip native functions
  • Add FCNPC_GetWeaponActualReloadTime

Fixes

  • Fix shotguns #65 (#66)
  • Fix hooked callbacks (#67, #68)
  • Add clip size for weapons (#65, #70, #71)
  • Fix weapon states
  • Fix reloading
  • Fix infinite ammo reloading
  • Set NO_TEAM as default NPC team (#69)
  • Fix shotgun reload time
  • Fix double WEAPON_SAWEDOFF reload time

New and changed functions

native FCNPC_SetAmmoInClip(npcid, ammo);
native FCNPC_GiveAmmoInClip(npcid, ammo);
native FCNPC_GetAmmoInClip(npcid);
native FCNPC_GetWeaponActualReloadTime(npcid, weaponid);
native FCNPC_GetWeaponActualClipSize(npcid, weaponid);

FCNPC 1.7.0

02 Apr 11:11
Compare
Choose a tag to compare

Version notes

  • Disable MapAndreas find Z for Z pos under 0.0
  • #36: Add FCNPC_ToggleMapAndreasUsage and FCNPC_IsMapAndreasUsed
  • #39: Add FCNPC_GetDestinationPoint function
  • Add FCNPC_AddPointsToPath2 function
  • #35: Add Float:dist_offset parameter to GoTo[Player] functions
  • #56: Add FCNPC_OnChangeHeightPos callback (disabled by default, to enable use FCNPC_SetMinHeightPosCall)
  • samples/bg: NPC now with infinite ammo

Fixes

  • Fix npcid and damagedid arguments in FCNPC_OnGiveDamage callback
  • #40: Fix death reason weapon while drive bying
  • Fix error init reporting system
  • #45: Fix hooked stream functions
  • Fix move type configuration
  • #59: Set angle after respawn
  • #48: End of movement position
  • samples/missions: FreeCamera after EndMission
  • samples/bg: Fix random NPC rotation while following
  • samples/bg: UnFollow player before entering the vehicle

New and changed functions

native FCNPC_GoTo(npcid, Float:x, Float:y, Float:z, type = MOVE_TYPE_AUTO, Float:speed = MOVE_SPEED_AUTO, bool:UseMapAndreas = false, Float:radius = 0.0, bool:setangle = true, Float:dist_offset = 0.0);
native FCNPC_GoToPlayer(npcid, playerid, type = MOVE_TYPE_AUTO, Float:speed = MOVE_SPEED_AUTO, bool:UseMapAndreas = false, Float:radius = 0.0, bool:setangle = true, Float:dist_offset = 0.0, Float:dist_check = 1.5);
native FCNPC_GoByMovePath(npcid, pathid, type = MOVE_TYPE_AUTO, Float:speed = MOVE_SPEED_AUTO, bool:UseMapAndreas = false, Float:radius = 0.0, bool:setangle = true, Float:dist_offset = 0.0);
native FCNPC_GetDestinationPoint(npcid, &Float:x, &Float:y, &Float:z);
native FCNPC_AddPointsToPath2(pathid, Float:points_x[], Float:points_y[], Float:points_z[], const size = sizeof(points_x));
native FCNPC_ToggleMapAndreasUsage(npcid, bool:enabled);
native FCNPC_IsMapAndreasUsed(npcid);
native FCNPC_SetMinHeightPosCall(npcid, Float:height);
native Float:FCNPC_GetMinHeightPosCall(npcid);

New and changed callbacks

forward FCNPC_OnGiveDamage(npcid, damagedid, weaponid, bodypart, Float:health_loss);
forward FCNPC_OnChangeHeightPos(npcid, Float:new_z, Float:old_z); // disabled by default, see FCNPC_SetMinHeightPosCall

FCNPC 1.6.1

25 Dec 11:22
Compare
Choose a tag to compare

Version notes

  • #33: Add offsets parameters to Aim functins
  • #31: Add FCNPC_IsPlayingNodePaused
  • Add FCNPC_IsPlayingNode

Fixes

  • Case insensitive for GetIndexByName (animations)
  • #32: Fix FCNPC_SetAnimationByName arguments
  • #30: Pausing playing nodes now does not interrupt his updates
  • Zero division checks for GoTo functions
  • Nodes pausing fixed
  • Fixes for sample scripts

New and changed functions

native FCNPC_AimAt(npcid, Float:x, Float:y, Float:z, bool:shoot = false, shoot_delay = -1, bool:setangle = true, Float:offset_from_x = 0.0, Float:offset_from_y = 0.0, Float:offset_from_z = 0.0);
native FCNPC_AimAtPlayer(npcid, playerid, bool:shoot = false, shoot_delay = -1, bool:setangle = true, Float:offset_x = 0.0, Float:offset_y = 0.0, Float:offset_z = 0.0, Float:offset_from_x = 0.0, Float:offset_from_y = 0.0, Float:offset_from_z = 0.0);
native FCNPC_TriggerWeaponShot(npcid, weaponid, hittype, hitid, Float:x, Float:y, Float:z, bool:ishit = true, Float:offset_from_x = 0.0, Float:offset_from_y = 0.0, Float:offset_from_z = 0.0);
native FCNPC_IsPlayingNode(npcid);
native FCNPC_IsPlayingNodePaused(npcid);