SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 17/05/2017, 01:53 AM   #3221
Blackaslan
Big Clucker
 
Blackaslan's Avatar
 
Join Date: Oct 2014
Location: CHILE <3
Posts: 156
Reputation: 8
Default Re: FCNPC - Fully Controllable NPC

Quote:
=========================== FCNPC Exception Handler ============================
Signal 11 (Segmentation fault), address is 39e1cbb2 from f54aa66a

Backtrace:
#0 in plugins/FCNPC.so(_ZN17CExceptionHandler24ExceptionHandlerC allbackEiP9siginfo_tPv+0x126) [0xf54a5fd6]
#1 in [0xf7794420]
#2 in plugins/FCNPC.so(_ZN11CPlayerData8GetStateEv+0xa) [0xf54aa66a]
#3 in plugins/FCNPC.so(_ZN11CPlayerData11GetPositionEP7CVector+0 x22) [0xf54ac1f2]
#4 in plugins/FCNPC.so(_ZN11CPlayerData7ProcessEv+0x22a) [0xf54af14a]
#5 in plugins/FCNPC.so(_ZN14CPlayerManager7ProcessEv+0x39) [0xf54b0449]
#6 in plugins/FCNPC.so(_ZN7CServer7ProcessEv+0x4f) [0xf54b2c1f]
#7 in plugins/FCNPC.so(ProcessTick+0x23) [0xf54b4153]
#8 in ./samp03svr() [0x80d1ce2]
#9 in ./samp03svr() [0x80aef6c]

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

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 ============================
This is for what? is crashing my server
__________________
Black Lagoon RPG

Lsa Zombie apocalypse is back with bots !
Blackaslan is offline   Reply With Quote
Old 17/05/2017, 06:11 AM   #3222
ZiGGi
High-roller
 
ZiGGi's Avatar
 
Join Date: Sep 2008
Location: Russia
Posts: 1,580
Reputation: 228
Default Re: FCNPC - Fully Controllable NPC

Quote:
Originally Posted by Blackaslan View Post
This is for what? is crashing my server
Can you show your Pawn code?
ZiGGi is offline   Reply With Quote
Old 17/05/2017, 07:14 AM   #3223
Blackaslan
Big Clucker
 
Blackaslan's Avatar
 
Join Date: Oct 2014
Location: CHILE <3
Posts: 156
Reputation: 8
Default Re: FCNPC - Fully Controllable NPC

Quote:
Originally Posted by ZiGGi View Post
Can you show your Pawn code?
The crash ocurrs when a bot is generated and spawn So I think the problem maybe is in this part? :

Code:

stock setZombieSpawn(npcid)
{
	new masX;
	new masY;
	new Float:finalX;
	new Float:finalY;
	new Float:finalZ;
	new unBreak = 0;
	do
	{
		unBreak++;
		masX = random(2649);
		masY = random(1686);
		finalX = 160.1896 + masX;
		finalY = -962.9752 - masY;
		CA_FindZ_For2DCoord(finalX, finalY, finalZ);
	}
	while(finalZ < 0.001 && unBreak < 20);
	FCNPC_Spawn(npcid, skinsZombie[random(sizeof(skinsZombie))], finalX, finalY, finalZ+1.2);
	SetPlayerColor(npcid, ZOMBIE_COLOR);
	printf("Bot en %.2f, %.2f, %.2f", finalX, finalY, finalZ);
	getMovementPosition(finalX, finalY, finalZ);
	
	FCNPC_GoTo(npcid, finalX, finalY, finalZ+1.2, MOVE_TYPE_RUN, MOVE_SPEED_RUN);
}
__________________
Black Lagoon RPG

Lsa Zombie apocalypse is back with bots !

Last edited by Blackaslan; 17/05/2017 at 05:49 PM.
Blackaslan is offline   Reply With Quote
Old 17/05/2017, 12:50 PM   #3224
ZiGGi
High-roller
 
ZiGGi's Avatar
 
Join Date: Sep 2008
Location: Russia
Posts: 1,580
Reputation: 228
Default Re: FCNPC - Fully Controllable NPC

Quote:
Originally Posted by Blackaslan View Post
The crash ocurrs when a bot is generated and spawn So I think the problem maybe is in this part? :
Try to move FCNPC_GoTo function call to the FCNPC_OnSpawn.
ZiGGi is offline   Reply With Quote
Old 17/05/2017, 04:52 PM   #3225
Blackaslan
Big Clucker
 
Blackaslan's Avatar
 
Join Date: Oct 2014
Location: CHILE <3
Posts: 156
Reputation: 8
Default Re: FCNPC - Fully Controllable NPC

Quote:
Originally Posted by ZiGGi View Post
Try to move FCNPC_GoTo function call to the FCNPC_OnSpawn.

I'll try thanks you very much
__________________
Black Lagoon RPG

Lsa Zombie apocalypse is back with bots !
Blackaslan is offline   Reply With Quote
Old 18/05/2017, 07:50 AM   #3226
iLearner
Banned
 
Join Date: Apr 2017
Posts: 450
Reputation: 89
Default Re: FCNPC - Fully Controllable NPC

Quote:
Originally Posted by iLearner View Post
v1.3.1
4char
iLearner is offline   Reply With Quote
Old 18/05/2017, 08:05 AM   #3227
ZiGGi
High-roller
 
ZiGGi's Avatar
 
Join Date: Sep 2008
Location: Russia
Posts: 1,580
Reputation: 228
Default Re: FCNPC - Fully Controllable NPC

Quote:
Originally Posted by iLearner View Post
Quote:
Originally Posted by iLearner View Post
v1.3.1
I read your message, but I don't know where is the problem. Try to use other versions of the plugin.
ZiGGi is offline   Reply With Quote
Old 18/05/2017, 11:29 PM   #3228
Blackaslan
Big Clucker
 
Blackaslan's Avatar
 
Join Date: Oct 2014
Location: CHILE <3
Posts: 156
Reputation: 8
Default Re: FCNPC - Fully Controllable NPC

Quote:
=========================== FCNPC Exception Handler ============================
Signal 11 (Segmentation fault), address is 2be5 from f54aa66a

Backtrace:
#0 in plugins/FCNPC.so(_ZN17CExceptionHandler24ExceptionHandlerC allbackEiP9siginfo_tPv+0x126) [0xf54a5fd6]
#1 in [0xf7789420]
#2 in plugins/FCNPC.so(_ZN11CPlayerData8GetStateEv+0xa) [0xf54aa66a]
#3 in plugins/FCNPC.so(_ZN11CPlayerData11GetPositionEP7CVector+0 x22) [0xf54ac1f2]
#4 in plugins/FCNPC.so(_ZN11CPlayerData16UpdateMovingDataE7CVect orfbff+0x5a) [0xf54acb8a]
#5 in plugins/FCNPC.so(_ZN11CPlayerData7ProcessEv+0x892) [0xf54af7b2]
#6 in plugins/FCNPC.so(_ZN14CPlayerManager7ProcessEv+0x39) [0xf54b0449]
#7 in plugins/FCNPC.so(_ZN7CServer7ProcessEv+0x4f) [0xf54b2c1f]
#8 in plugins/FCNPC.so(ProcessTick+0x23) [0xf54b4153]
#9 in ./samp03svr() [0x80d1ce2]

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

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 ============================
Code:
stock crearZombies()
{
	new name[MAX_PLAYER_NAME + 1];
	for(new i = 0; i<MAX_ZOMBIES; i++)
	{
		format(name, sizeof(name), "Zombie_%d", i);
		crearZombie(name);
	}
}

stock crearZombie(name[])
{
	new npcid;
	npcid = FCNPC_Create(name);
	setZombieSpawn(npcid);
	FCNPC_SetHealth(npcid, 500.0); //variable vida de los zombies bot's
    new Text3D:label = Create3DTextLabel("ZOMBIE", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    Attach3DTextLabelToPlayer(label, npcid , 0.0, 0.0, 0.7);
    return 1;
}

stock destruirZombies()
{
	for(new i = 1; i<=MAX_ZOMBIES; i++)
		FCNPC_Destroy(MAX_PLAYERS-i);
}

stock setZombieSpawn(npcid)
{
	new masX;
	new masY;
	new Float:finalX;
	new Float:finalY;
	new Float:finalZ;
	new unBreak = 0;
	do
	{
		unBreak++;
		masX = random(2649);
		masY = random(1686);
		finalX = 160.1896 + masX;
		finalY = -962.9752 - masY;
		CA_FindZ_For2DCoord(finalX, finalY, finalZ);
	}
	while(finalZ < 0.001 && unBreak < 20);
	FCNPC_Spawn(npcid, skinsZombie[random(sizeof(skinsZombie))], finalX, finalY, finalZ+1.2);
	SetPlayerColor(npcid, ZOMBIE_COLOR);
	printf("Bot en %.2f, %.2f, %.2f", finalX, finalY, finalZ);
	
}

public FCNPC_OnSpawn(npcid)
{
    new
        Float:pos_x,
        Float:pos_y,
        Float:pos_z;

    FCNPC_GetPosition(npcid, pos_x, pos_y, pos_z);
    getMovementPosition(pos_x, pos_y, pos_z);

    FCNPC_GoTo(npcid, pos_x, pos_y, pos_z + 1.2, MOVE_TYPE_RUN, MOVE_SPEED_RUN);
}
I think you've read my my message but anyways I will put this there if somebody can help me please , thanks.
__________________
Black Lagoon RPG

Lsa Zombie apocalypse is back with bots !

Last edited by Blackaslan; 20/05/2017 at 06:39 AM.
Blackaslan is offline   Reply With Quote
Old 21/05/2017, 07:25 PM   #3229
Crystallize
High-roller
 
Join Date: Aug 2013
Posts: 1,477
Reputation: 283
Default Re: FCNPC - Fully Controllable NPC

Which function replaced
"FCNPC_GetZGround" ? and "FCNPC_InitZMap"
if(!FCNPC_InitZMap("scriptfiles/ZMap.hmap")) return print("map file not loaded");
__________________

Crystallize is offline   Reply With Quote
Old 21/05/2017, 07:32 PM   #3230
ZiGGi
High-roller
 
ZiGGi's Avatar
 
Join Date: Sep 2008
Location: Russia
Posts: 1,580
Reputation: 228
Default Re: FCNPC - Fully Controllable NPC

Quote:
Originally Posted by Crystallize View Post
Which function replaced
"FCNPC_GetZGround" ? and "FCNPC_InitZMap"
What is the functions?
MapAndreas can be initiated with:
PHP Code:
FCNPC_InitMapAndreas(address
ZiGGi 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 06:08 AM
[Plugin] FCNPC - Fully Controllable NPC sa-mp 0.3x R2 [LCK]Chris Plugin Development 82 16/05/2014 02:16 PM
Controllable HighPitchedVoice Scripting Help 5 25/05/2012 09:38 PM
[?]New SZR fully controllable NOS system Qeux Help Archive 3 17/03/2011 02:24 AM
Controllable NPC Andreq Русский/Russian 5 25/10/2010 07:57 AM


All times are GMT. The time now is 04:03 AM.


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