Skip to content

Releases: ziggi/FCNPC

FCNPC 1.5.0

14 Nov 17:03
Compare
Choose a tag to compare

Version notes

  • CR-MP 0.3.7 support
  • Removed health and armour maximum limits

Fixes

  • Fix pathid in OnFinishMovePath
  • Fix sample scripts
  • Fixes for VS 2015 compilation

New functions

native FCNPC_TriggerWeaponShot(npcid, weaponid, hittype, hitid, Float:x, Float:y, Float:z, bool:ishit = true);

New callbacks

forward FCNPC_OnWeaponShot(npcid, weaponid, hittype, hitid, Float:x, Float:y, Float:z);

FCNPC 1.4.2

27 Oct 05:25
Compare
Choose a tag to compare
  • Fix memory corruption in playback manager
  • Fix foreach iterator initialization for filterscripts

FCNPC 1.4.1

26 Oct 08:21
Compare
Choose a tag to compare

Version notes

  • Add foreach iterator FCNPC

Fixes

  • Fix FCNPC_GetMovePoint and FCNPC_GetNumberMovePoint functions
  • Fix FCNPC_OnFinishMovePath callback

New callbacks

forward FCNPC_OnDestroy(npcid);

FCNPC 1.4.0

19 Oct 08:40
Compare
Choose a tag to compare

Version notes

  • Add bool:update_pos = false optional parameter to velocity functions (FCNPC_Set/GiveVelocity)
  • return 0 in FCNPC_OnUpdate works same as return 0 in OnPlayerUpdate
  • Optimization for processing loops
  • #6: Move path system implemented
  • #9: Playback improvements
  • #12: Notify of updates

New functions

native FCNPC_LoadPlayingPlayback(file[]);
native FCNPC_UnloadPlayingPlayback(recordid);
native FCNPC_SetPlayingPlaybackPath(npcid, path[]);
native FCNPC_GetPlayingPlaybackPath(npcid, path[], const size = sizeof(path));

native FCNPC_CreateMovePath();
native FCNPC_DestroyMovePath(pathid);
native FCNPC_IsValidMovePath(pathid);
native FCNPC_AddPointToPath(pathid, Float:x, Float:y, Float:z);
native FCNPC_AddPointsToPath(pathid, Float:points[][3], const size = sizeof(points));
native FCNPC_RemovePointFromPath(pathid, pointid);
native FCNPC_IsValidMovePoint(pathid, pointid);
native FCNPC_GetMovePoint(pathid, pointid, &Float:x, &Float:y, &Float:z);
native FCNPC_GetNumberMovePoint(pathid);
native FCNPC_GoByMovePath(npcid, pathid, type = MOVE_TYPE_AUTO, Float:speed = MOVE_SPEED_AUTO, bool:UseMapAndreas = false, Float:radius = 0.0, bool:setangle = true);

Updated functions

native FCNPC_SetVelocity(npcid, Float:x, Float:y, Float:z, bool:update_pos = false);
native FCNPC_GiveVelocity(npcid, Float:x, Float:y, Float:z, bool:update_pos = false);
native FCNPC_StartPlayingPlayback(npcid, file[] = "", recordid = INVALID_RECORD_ID, bool:auto_unload = false);

New callbacks

forward FCNPC_OnFinishMovePath(npcid, pathid);
forward FCNPC_OnFinishMovePathPoint(npcid, pathid, pointid);

New constants

#define INVALID_MOVEPATH_ID (-1)
#define INVALID_RECORD_ID   (-1)

FCNPC 1.3.1

26 Sep 15:13
Compare
Choose a tag to compare

Fixes

  • Fix NPC origin hit vector
  • Fix bodyguard sample script damage
  • Fixed correct work without required declared callbacks (but declaration still required for working all callbacks)

FCNPC 1.3.0

17 Sep 06:49
Compare
Choose a tag to compare

Version notes

  • Weapon accuracy (#23)
  • FCNPC_OnUpdate callback

Fixes

  • More player validation checks (less crashes)
  • Fix for FCNPC_GetWeaponInfo

New functions

native FCNPC_SetWeaponAccuracy(npcid, weaponid, Float:accuracy);
native Float:FCNPC_GetWeaponAccuracy(npcid, weaponid);

Updated functions

native FCNPC_SetWeaponInfo(npcid, weaponid, reload_time = -1, shoot_time = -1, clip_size = -1, Float:accuracy = 1.0);
native FCNPC_GetWeaponInfo(npcid, weaponid, &reload_time = -1, &shoot_time = -1, &clip_size = -1, &Float:accuracy = 1.0);
native FCNPC_SetWeaponDefaultInfo(weaponid, reload_time = -1, shoot_time = -1, clip_size = -1, Float:accuracy = 1.0);
native FCNPC_GetWeaponDefaultInfo(weaponid, &reload_time = -1, &shoot_time = -1, &clip_size = -1, &Float:accuracy = 1.0);

New callbacks

forward FCNPC_OnUpdate(npcid);

FCNPC 1.2.0

26 Aug 15:31
Compare
Choose a tag to compare

Version notes

  • Improve default weapon info (deagle, m4, ak47)
  • Add more FCNPC_Give* functions
  • Code cleanup

Fixes

  • Fix shoot delay updating
  • Fix node playing

New functions

native FCNPC_GivePosition(npcid, Float:x, Float:y, Float:z);
native Float:FCNPC_GiveAngle(npcid, Float:angle);
native FCNPC_GiveQuaternion(npcid, Float:w, Float:x, Float:y, Float:z);
native FCNPC_GiveVelocity(npcid, Float:x, Float:y, Float:z);
native Float:FCNPC_GiveHealth(npcid, Float:health);
native Float:FCNPC_GiveArmour(npcid, Float:armour);
native FCNPC_GiveAmmo(npcid, ammo);
native FCNPC_GiveWeaponSkillLevel(npcid, skill, level);
native FCNPC_GiveSurfingOffsets(npcid, Float:x, Float:y, Float:z);

FCNPC 1.1.3

09 Aug 05:04
Compare
Choose a tag to compare

Version notes

  • Rewrite Bodyguard sample script
  • Optimization

Fixes

  • Fixed FCNPC_IsStreamedForAnyone
  • Now FCNPC_PutInVehicle works for NPCs who is in vehicle
  • Fixed weapon shoot time and delay
  • Fixed more compilation warnings
  • More validation fixes (less crashes)

New callbacks

forward FCNPC_OnGiveDamage(npcid, issuerid, weaponid, bodypart, Float:health_loss);

FCNPC 1.1.2

03 Aug 08:54
Compare
Choose a tag to compare
  • Fixed work with Linux

FCNPC 1.1.1

03 Aug 06:52
Compare
Choose a tag to compare

Version notes

  • Surfing now supports attached objects
  • Optimization
  • Add speed definitions in the include file
  • Update load message

Fixes

  • Fix object and vehicle validation (less crashes)
  • Fix include version checks (thanks to Incognito streamer plugin for example)
  • Fix move radius for goto player
  • Fixed variable types and casts
  • Fix speed and type argument in GoTo function
  • Fix train speed bug
  • Fix sync for hydra thrusters and train speed in playbacks
  • Fix some crashes after destroying NPC vehicle

New defines

#define MOVE_SPEED_AUTO     (-1.0)
#define MOVE_SPEED_WALK     (0.1552086)
#define MOVE_SPEED_RUN      (0.56444)
#define MOVE_SPEED_SPRINT   (0.926784)