Skip to content

Releases: ziggi/FCNPC

FCNPC 1.6.0

19 Dec 04:42
Compare
Choose a tag to compare

Version notes

  • Add FCNPC_GetAimingPlayer function
  • Add FCNPC_PausePlayingNode and FCNPC_ResumePlayingNode functions
  • Add FCNPC_OnWeaponStateChange callback
  • #28: Add offset for FCNPC_AimAtPlayer
  • Removed node type defines
  • Additional parameters for FCNPC_PlayNode (like FCNPC_GoTo function)
  • Update citiziens script

Fixes

  • Codestyle fixes
  • Fix Z for nodes
  • Fix last weapon reload
  • Fix FCNPC_GetNodeType

New and changed functions

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);
native FCNPC_GetAimingPlayer(npcid);
native FCNPC_PlayNode(npcid, nodeid, move_type = MOVE_TYPE_AUTO, Float:speed = MOVE_SPEED_AUTO, bool:UseMapAndreas = false, Float:radius = 0.0, bool:setangle = true);
native FCNPC_PausePlayingNode(npcid);
native FCNPC_ResumePlayingNode(npcid);

New callbacks

forward FCNPC_OnWeaponStateChange(npcid, weapon_state);

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