ziggi / FCNPC

FCNPC - Fully Controllable NPC
Apache License 2.0
131 stars 30 forks source link

ToggleInfiniteAmmo removed? #261

Closed DJShocker closed 3 months ago

DJShocker commented 2 years ago

Hey, I'm working on updating a gamemode to the latest FCNPC. I'm getting undefined for: FCNPC_ToggleInfiniteAmmo FCNPC_ToggleInfiniteAmmo( npcid, true ); FCNPC_AimAtPlayer( npcid, playerid, .shoot = true, .shoot_delay = -1, .setangle = true, .offset_x = 0.0, .offset_y = 0.0, .offset_z = 0.6 ); Has this been replaced and I'm overlooking it or has it been completely removed?

ziggi commented 2 years ago

It was renamed to FCNPC_UseInfiniteAmmo

DJShocker commented 2 years ago

Yea i dscovered that. I cannot believe I overlooked that. I managed to rewrite that., but now my server crashes on connection and none of the NPCs connect. I do get this:

I'm on 0.3DL, everything is updated.

`=========================== FCNPC Exception Handler ============================ Address: 0x10006c1b

Registers: EAX: 0x0 - EBX: 0x67972a8 - ECX: 0x87 - EDX: 0x10006bf0 ESI: 0xa211730 - EDI: 0x0 - EBP: 0x19f19c - ESP: 0x19f190

Stack: 0x0: 0x30433f8 - 0x4: 0x30433f8 - 0x8: 0x87 - 0xC: 0x67d10e0 - 0x10: 0x4010b6 - 0x14: 0x30433f8 0x18: 0xa211730 - 0x1C: 0x6e73a90 - 0x20: 0x402b63

Information: System: Windows SA-MP: 0.3.DL R1 FCNPC: 2.0.4

Functions: FUNC_CPlayerPoolDeletePlayer: 0x466550 FUNC_CPlayer__Kill: 0x485020 FUNC_CPlayerEnterVehicle: 0x485670 FUNC_CPlayer__ExitVehicle: 0x485790 FUNC_CPlayerSpawnForWorld: 0x487730 FUNC_GetVehicleModelInfo: 0x4892a0 FUNC_CConsoleGetIntVariable: 0x490c80 FUNC_ClientJoin_RPC: 0x497ef0

Pointers: VAR_ServerAuthentication: 0x4fc470 VAR_NetVersion: 0xfde

Offsets: OFFSET_RemoteSystemManager: 0x33c OFFSET_RemoteSystemSize: 0xcb8 OFFSET_RemoteSystem__ConnectMode: 0xcb0 OFFSET_RemoteSystem__Unknown: 0xcb5

Callbacks: FUNC_CGameModeOnPlayerGiveDamage: 0x46f050 FUNC_CGameMode__OnPlayerTakeDamage: 0x46efd0 FUNC_CGameModeOnPlayerWeaponShot: 0x46f640 FUNC_CGameModeOnPlayerStreamIn: 0x46ebc0 FUNC_CGameMode__OnPlayerStreamOut: 0x46ec30 FUNC_CGameModeOnGameModeExit: 0x46da90 =========================== FCNPC Exception Handler ============================`

ziggi commented 2 years ago

I don't know. Try linux version and show your code.

DJShocker commented 2 years ago

I've tried the Linux and still getting crash on server bootup:

=========================== FCNPC Exception Handler ============================
Signal 11 (Segmentation fault), address is 109 from f67bb30a

Backtrace:
  #0 in plugins/FCNPC-DL.so(_ZN17CExceptionHandler24ExceptionHandlerCallbackEiP9siginfo_tPv+0x126) [0xf67ba866]
  #1 in linux-gate.so.1(__kernel_rt_sigreturn+0) [0xf7eff150]
  #2 in plugins/FCNPC-DL.so(_ZN10CFunctions13GetSkinBaseIDEj+0x1a) [0xf67bb30a]
  #3 in plugins/FCNPC-DL.so(_ZN11CPlayerData7SetSkinEib+0x55) [0xf67c0c55]
  #4 in plugins/FCNPC-DL.so(_ZN11CPlayerData5SpawnEi+0x4c) [0xf67c377c]
  #5 in plugins/FCNPC-DL.so(_ZN8CNatives11FCNPC_SpawnEP6tagAMXPi+0xb6) [0xf67cafa6]
  #6 in /home/tcagame/admin/2/samp03svr() [0x809d844]
  #7 in plugins/crashdetect.so(_ZN11CrashDetect15ProcessCallbackEiPiS0_+0x4af) [0xf7a7646f]
  #8 in plugins/crashdetect.so(+0x1dfeb) [0xf7a7bfeb]

Information:
  System: GNU/Linux
  SA-MP: 0.3.DL R1
  FCNPC: 2.0.4

Functions:
  FUNC_CPlayerPool__DeletePlayer: 0x80dc0b0
  FUNC_CPlayer__Kill: 0x80d5ac0
  FUNC_CPlayer__EnterVehicle: 0x80d6a70
  FUNC_CPlayer__ExitVehicle: 0x80d6bf0
  FUNC_CPlayer__SpawnForWorld: 0x80d7870
  FUNC_GetVehicleModelInfo: 0x80e14f0
  FUNC_CConsole__GetIntVariable: 0x80a87d0
  FUNC_ClientJoin_RPC: 0x80ba350

Pointers:
  VAR_ServerAuthentication: 0x81b7d2c
  VAR_NetVersion: 0xfde

Offsets:
  OFFSET_RemoteSystemManager: 0x334
  OFFSET_RemoteSystemSize: 0xc69
  OFFSET_RemoteSystem__ConnectMode: 0xc62
  OFFSET_RemoteSystem__Unknown: 0xc67
=========================== FCNPC Exception Handler ============================