ziggi / FCNPC

FCNPC - Fully Controllable NPC
Apache License 2.0
138 stars 31 forks source link

Crash FCNPC_RemoveFromVehicle #236

Closed bigheada closed 3 years ago

bigheada commented 3 years ago

public OnPlayerExitVehicle(playerid, vehicleid) { for(new npcid = 0; npcid < MAX_PLAYERS; npcid++) { if(IsPlayerNPC(npcid)) { if(FCNPC_GetVehicleID(npcid) == vehicleid) { printf("test condition"); FCNPC_ExitVehicle(npcid); // crash } } } return 1; }

=========================== FCNPC Exception Handler ============================ Address: 0x4a2

Registers: EAX: 0x1 - EBX: 0x62ba34 - ECX: 0x18f75c - EDX: 0xffffffff ESI: 0x6c8ea68 - EDI: 0x4a57170 - EBP: 0x18f60c - ESP: 0x18f610

Stack: 0x0: 0xf36a379 - 0x4: 0x6c8ea68 - 0x8: 0x4a2 - 0xC: 0x14d - 0x10: 0x4a57170 - 0x14: 0xf37f19b 0x18: 0x1e9bf00 - 0x1C: 0x18f768 - 0x20: 0x4010b6

Information: System: Windows SA-MP: 0.3.7 R2 FCNPC: 2.0.2

Functions: FUNC_CPlayerPoolDeletePlayer: 0x466570 FUNC_CPlayer__Kill: 0x484620 FUNC_CPlayerEnterVehicle: 0x484c72 FUNC_CPlayer__ExitVehicle: 0x484f52 FUNC_CPlayerSpawnForWorld: 0x486d30 FUNC_GetVehicleModelInfo: 0x488240 FUNC_CConsoleGetIntVariable: 0x48b5b0 FUNC_ClientJoin_RPC: 0x4918f0

Pointers: VAR_ServerAuthentication: 0x4f5fe8 VAR_NetVersion: 0xfd9

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

Callbacks: FUNC_CGameModeOnPlayerGiveDamage: 0x46ed70 FUNC_CGameMode__OnPlayerTakeDamage: 0x46ecf0 FUNC_CGameModeOnPlayerWeaponShot: 0x46f360 FUNC_CGameModeOnPlayerStreamIn: 0x46e8e0 FUNC_CGameMode__OnPlayerStreamOut: 0x46e950 FUNC_CGameModeOnGameModeExit: 0x46d7b0 =========================== FCNPC Exception Handler ============================

bigheada commented 3 years ago

FCNPC_RemoveFromVehicle(npcid); works, but if i use DestroyVehicle(vehid); with bot int the car, server crash

ziggi commented 3 years ago

227