SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 20/07/2017, 12:03 AM   #3341
Blackaslan
Big Clucker
 
Blackaslan's Avatar
 
Join Date: Oct 2014
Location: CHILE <3
Posts: 157
Reputation: 8
Default Re: FCNPC - Fully Controllable NPC

Quote:
[04:02:56] [debug] Server crashed due to an unknown error
[04:02:56] [debug] Native backtrace:
[04:02:56] [debug] #0 b7449e8b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[04:02:56] [debug] #1 b7442bcf in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[04:02:56] [debug] #2 b7443dbc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[04:02:56] [debug] #3 b7444226 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[04:02:56] [debug] #4 b7449adc in ?? () from plugins/crashdetect.so
[04:02:56] [debug] #5 b77a1600 in __kernel_rt_sigreturn () from linux-gate.so.1
[04:02:56] [debug] #6 b77a1420 in __kernel_vsyscall () from linux-gate.so.1
[04:02:56] [debug] #7 b749c367 in gsignal () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[04:02:56] [debug] #8 b749da23 in abort () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[04:02:56] [debug] #9 b74da778 in ?? () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[04:02:56] [debug] #10 b74e07ea in ?? () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[04:02:56] [debug] #11 b74e143d in ?? () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[04:02:56] [debug] #12 b76c6e68 in _ZdlPv () from /usr/lib/i386-linux-gnu/libstdc++.so.6
[04:02:56] [debug] #13 0805fd0a in ?? () from samp03svr
[04:02:56] [debug] #14 0807f387 in ?? () from samp03svr
[04:02:56] [debug] #15 0807f4b4 in ?? () from samp03svr
[04:02:56] [debug] #16 080741c8 in ?? () from samp03svr
[04:02:56] [debug] #17 08074cb4 in ?? () from samp03svr
[04:02:56] [debug] #18 080763fe in ?? () from samp03svr
[04:02:56] [debug] #19 b7777ecb in ?? () from /lib/i386-linux-gnu/i686/cmov/libpthread.so.0
[04:02:56] [debug] #20 b7559d0e in clone () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
Quote:
Signal 11 (Segmentation fault), address is 5f6e6562 from b74af508
Signal 11 (Segmentation fault), address is 756b6f67 from b74be508
Signal 11 (Segmentation fault), address is 6f6c6f53 from b74ab508
Quote:
======================== FCNPC Exception Handler ============================
Signal 11 (Segmentation fault), address is 6c6c694d from b7492508

Backtrace:
#0 in plugins/FCNPC.so(_ZN17CExceptionHandler24ExceptionHandlerC allbackEiP9siginfo_tPv+0xdc) [0xb53342ec]
#1 in linux-gate.so.1(__kernel_rt_sigreturn+0) [0xb7779600]
#2 in /lib32/libc.so.6(_IO_vfprintf+0x227 [0xb7492508]
#3 in /lib32/libc.so.6(vsprintf+0x92) [0xb74b27a2]
#4 in /root/samp03/samp03svr() [0x80ad731]
#5 in /root/samp03/samp03svr() [0x80d99e9]
#6 in /root/samp03/samp03svr() [0x80950e4]
#7 in plugins/crashdetect.so(_ZN11CrashDetect13DoAmxCallbackEiPi S0_+0x49b) [0xb742594b]
#8 in plugins/crashdetect.so(+0x1b8f [0xb74288f8]
#9 in plugins/crashdetect.so(amx_Exec+0x18e6) [0xb742c916]

Information:
System: GNU/Linux
SA-MP: 0.3.7 R2-1
FCNPC: 1.7.3

Functions:
FUNC_CPlayerPool__DeletePlayer: 0x80d0a90
FUNC_CPlayer__Kill: 0x80cb220
FUNC_CPlayer__EnterVehicle: 0x80cc1c0
FUNC_CPlayer__ExitVehicle: 0x80cc340
FUNC_CPlayer__SpawnForWorld: 0x80ccfc0
FUNC_GetVehicleModelInfo: 0x80d5d30
FUNC_CConsole__GetIntVariable: 0x80a0070
FUNC_ClientJoin_RPC: 0x80b0030

Pointers:
VAR_ServerAuthentication: 0x81aa8a8
VAR_NetVersion: 0xfd9

Offsets:
OFFSET_RemoteSystemManager: 0x334
OFFSET_RemoteSystemSize: 0xc69
OFFSET_RemoteSystem__ConnectMode: 0xc62
OFFSET_RemoteSystem__Unknown: 0xc67
=========================== FCNPC Exception Handler ============================
Libs problems maybe? or the problem is in the plugin?
__________________
Black Lagoon RPG

Lsa Zombie apocalypse is back with bots !
Blackaslan is offline   Reply With Quote
Old 21/07/2017, 04:02 PM   #3342
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,249
Reputation: 312
Default Re: FCNPC - Fully Controllable NPC

When i'm using FCNPC_SetVehicleHealth(npcid, Float:health); //health = 12000.0
HP is set, but when i shot in vehicle health changes to 1000.0

Why ?
AbyssMorgan is online now   Reply With Quote
Old 21/07/2017, 06:25 PM   #3343
ZiGGi
High-roller
 
ZiGGi's Avatar
 
Join Date: Sep 2008
Location: Russia
Posts: 1,625
Reputation: 274
Default Re: FCNPC - Fully Controllable NPC

Quote:
Originally Posted by AbyssMorgan View Post
When i'm using FCNPC_SetVehicleHealth(npcid, Float:health); //health = 12000.0
HP is set, but when i shot in vehicle health changes to 1000.0

Why ?
Because this is full vehicle health. I didn't know about that vehicles can have more than 1000.0 health before.
Anyway, thanks, fixed.
ZiGGi is offline   Reply With Quote
Old 21/07/2017, 07:49 PM   #3344
Kar
High-roller
 
Kar's Avatar
 
Join Date: May 2010
Location: Black Asylum
Posts: 3,131
Reputation: 450
Default Re: FCNPC - Fully Controllable NPC

Quote:
Originally Posted by ZiGGi View Post
Because this is full vehicle health. I didn't know about that vehicles can have more than 1000.0 health before.
Anyway, thanks, fixed.
set a limit like nothing over 100000
Kar is offline   Reply With Quote
Old 21/07/2017, 07:54 PM   #3345
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,249
Reputation: 312
Default Re: FCNPC - Fully Controllable NPC

Quote:
Originally Posted by Kar View Post
set a limit like nothing over 100000
but why need any limit, limit is 2147483647.0
AbyssMorgan is online now   Reply With Quote
Old 22/07/2017, 06:34 PM   #3346
Kar
High-roller
 
Kar's Avatar
 
Join Date: May 2010
Location: Black Asylum
Posts: 3,131
Reputation: 450
Default Re: FCNPC - Fully Controllable NPC

u set a vehicle's health to 2147483647.0 and see what happens.
Kar is offline   Reply With Quote
Old 22/07/2017, 07:41 PM   #3347
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,249
Reputation: 312
Default Re: FCNPC - Fully Controllable NPC

Quote:
Originally Posted by Kar View Post
u set a vehicle's health to 2147483647.0 and see what happens.
Nothing special, but 2 000 000 000 works fine
AbyssMorgan is online now   Reply With Quote
Old 23/07/2017, 03:34 PM   #3348
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,249
Reputation: 312
Default Re: FCNPC - Fully Controllable NPC

Can you add option for disable FCNPC crash logs ?
AbyssMorgan is online now   Reply With Quote
Old 23/07/2017, 05:35 PM   #3349
jan123
Little Clucker
 
Join Date: Jun 2015
Posts: 4
Reputation: 0
Default Re: FCNPC - Fully Controllable NPC

Hi , any one can give me a simple example to shoot a player in random part of body or even outside of target player, I found this function

Code:
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);
But i really dont know how much and where i need to add some values to x , y, z and dont know difference of offset_x and offset_from_x and ...

Also i guess i can use below funnction too but i dont know how ?

Code:
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);
jan123 is offline   Reply With Quote
Old 23/07/2017, 08:47 PM   #3350
Freaksken
Gangsta
 
Freaksken's Avatar
 
Join Date: Mar 2009
Location: Belgium
Posts: 526
Reputation: 209
Default Re: FCNPC - Fully Controllable NPC

Quote:
Originally Posted by jan123 View Post
Hi , any one can give me a simple example to shoot a player in random part of body or even outside of target player, I found this function

Code:
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);
But i really dont know how much and where i need to add some values to x , y, z and dont know difference of offset_x and offset_from_x and ...

Also i guess i can use below funnction too but i dont know how ?

Code:
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);
We could add a parameter that targets a specific bodypart.
__________________
Always keep in mind that a lot of people are active on this forum in their spare time.
They are sacrificing time they could easily spend on things they would rather do, to help you instead.


[Include] FCNPC A.I. - [Tutorial] Speedometer - [WIP] Single-player-like Mission - [Other] List of all my work
Freaksken is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Include] Controllable NPC Lorenc_ Includes 101 02/06/2014 07:08 AM
[Plugin] FCNPC - Fully Controllable NPC sa-mp 0.3x R2 [LCK]Chris Plugin Development 82 16/05/2014 03:16 PM
Controllable HighPitchedVoice Scripting Help 5 25/05/2012 10:38 PM
[?]New SZR fully controllable NOS system Qeux Help Archive 3 17/03/2011 03:24 AM
Controllable NPC Andreq Русский/Russian 5 25/10/2010 08:57 AM


All times are GMT. The time now is 07:31 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.