SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 18/05/2017, 08:50 AM   #3221
iLearner
Banned
 
Join Date: Apr 2017
Posts: 434
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, 09:05 AM   #3222
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 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 19/05/2017, 12:29 AM   #3223
Blackaslan
Big Clucker
 
Blackaslan's Avatar
 
Join Date: Oct 2014
Location: CHILE <3
Posts: 157
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 07:39 AM.
Blackaslan is offline   Reply With Quote
Old 21/05/2017, 08:25 PM   #3224
Crystallize
High-roller
 
Join Date: Aug 2013
Posts: 1,553
Reputation: 293
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, 08:32 PM   #3225
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 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
Old 21/05/2017, 08:39 PM   #3226
Crystallize
High-roller
 
Join Date: Aug 2013
Posts: 1,553
Reputation: 293
Default Re: FCNPC - Fully Controllable NPC

Says undefined symbol
error 017: undefined symbol "MapAndreas_GetAddress"
Crystallize is offline   Reply With Quote
Old 21/05/2017, 08:39 PM   #3227
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,250
Reputation: 312
Default Re: FCNPC - Fully Controllable NPC

Quote:
Originally Posted by Crystallize View Post
Says undefined symbol
error 017: undefined symbol "MapAndreas_GetAddress"
Update MapAndreas to v1.2.1
AbyssMorgan is offline   Reply With Quote
Old 21/05/2017, 08:41 PM   #3228
Crystallize
High-roller
 
Join Date: Aug 2013
Posts: 1,553
Reputation: 293
Default Re: FCNPC - Fully Controllable NPC

Quote:
Originally Posted by AbyssMorgan View Post
Update MapAndreas to v1.2.1
Download link is dead for the 1.2.1
Crystallize is offline   Reply With Quote
Old 21/05/2017, 08:47 PM   #3229
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,250
Reputation: 312
Default Re: FCNPC - Fully Controllable NPC

Quote:
Originally Posted by Crystallize View Post
Download link is dead for the 1.2.1
MapAndreas v1.2.1

Last edited by AbyssMorgan; 16/09/2017 at 08:27 AM.
AbyssMorgan is offline   Reply With Quote
Old 21/05/2017, 08:49 PM   #3230
Crystallize
High-roller
 
Join Date: Aug 2013
Posts: 1,553
Reputation: 293
Default Re: FCNPC - Fully Controllable NPC

Quote:
Originally Posted by AbyssMorgan View Post
Love u honey
Crystallize 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 03:35 AM.


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