SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 04/11/2017, 10:50 PM   #3441
Kaperstone
High-roller
 
Kaperstone's Avatar
 
Join Date: May 2011
Location: Home
Posts: 3,126
Reputation: 650
Default Re: FCNPC - Fully Controllable NPC

Quote:
Originally Posted by cuber View Post
0.3.8-RC1 is already released.(only for win servers)
Is it worth the few hours spent on updating for a temporary/unstable version?
__________________
Find me on GitHub Х SEF community (Official NEF Successor) Х Ko ko nut.
Kaperstone is offline   Reply With Quote
Old 04/11/2017, 11:25 PM   #3442
DRIFT_HUNTER
High-roller
 
Join Date: Oct 2009
Posts: 2,094
Reputation: 130
Default Re: FCNPC - Fully Controllable NPC

Quote:
Originally Posted by cuber View Post
0.3.8-RC1 is already released.(only for win servers)
That's a Release Candidate, not release itself. When official final 0.3.8 version is released only then they can start getting those addresses and looking for all the changes in samp server structure. Until then its a waste of time since there will be more release candidates for sure...
__________________
Путин here,
Путин there,
Путин просто everywhere.


Any PM's that include question about any kind of help will be ignored.
Use appropriate boards for that
DRIFT_HUNTER is offline   Reply With Quote
Old 09/11/2017, 08:32 AM   #3443
Sunehildeep
High-roller
 
Sunehildeep's Avatar
 
Join Date: Mar 2016
Posts: 1,002
Reputation: 89
Default Re: FCNPC - Fully Controllable NPC

Code:
=========================== FCNPC Exception Handler ============================
Address: 0x72ffb1b9

Registers:
EAX: 0x0 - EBX: 0x18fcb0 - ECX: 0x1e7dfd88 - EDX: 0x1
ESI: 0x2153ef68 - EDI: 0x4a - EBP: 0x18fc9c - ESP: 0x18fbc8

Stack:
0x0: 0x1e7dfd88 - 0x4: 0x1e7dfd88 - 0x8: 0x62f3f59f - 0xC: 0x21550848 - 0x10: 0x1e7dfd88 - 0x14: 0x432a0000
0x18: 0x18fc68 - 0x1C: 0x73021cf0 - 0x20: 0x18fcd0

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

Functions:
  FUNC_CPlayerPool__DeletePlayer: 0x466570
  FUNC_CPlayer__Kill: 0x484620
  FUNC_CPlayer__EnterVehicle: 0x484c70
  FUNC_CPlayer__ExitVehicle: 0x484f50
  FUNC_CPlayer__SpawnForWorld: 0x486d30
  FUNC_GetVehicleModelInfo: 0x488240
  FUNC_CConsole__GetIntVariable: 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
=========================== FCNPC Exception Handler ============================
__________________
Sunehildeep is online now   Reply With Quote
Old 09/11/2017, 06:09 PM   #3444
MrStead
Little Clucker
 
Join Date: Jul 2014
Location: samp-industrial.ru
Posts: 12
Reputation: 0
Default Re: FCNPC - Fully Controllable NPC

Why bots push away a vehicle when enter it and when I am already in this vehicle? I use FCNPC_EnterVehicle()

Althought with motorbikes no any issues, watch the video(in the end of this):
https://www.youtube.com/watch?v=C9uFnYIJ7gs
__________________
Industrial RPG
VK group
samp-industrial.ru

Last edited by MrStead; 13/11/2017 at 05:52 PM.
MrStead is offline   Reply With Quote
Old 16/11/2017, 12:43 AM   #3445
rrnovaesjr
Little Clucker
 
Join Date: Oct 2017
Posts: 4
Reputation: 0
Default Re: FCNPC - Fully Controllable NPC

Quote:
Originally Posted by AbyssMorgan View Post
If not all of the callbacks are filterscript, you may experience this bug:
PHP Code:
//spamming this:
[11/07/2016 15:13:02] [debugRun time error 7"Stack underflow"
[11/07/2016 15:13:02] [debug]  Stack pointer (STKis 0x4C1FB8stack top (STPis 0x4C1FB4
[11/07/2016 15:13:02] [debugAMX backtrace
Hello,

I found your comment interesting as I've been experiencing the same error.

Could you explain a little further what does this mean? I'm using FCNPC_OnReachDestination(npcid) with a call to FCNPC_Destroy(npcid) whenever a NPC reaches a final state (a position, to be more specific). If I stop calling FCNPC_Destroy everything works ~almost~ fine, except by the fact that I need them destroyed.

Does anyone know anything about Stack Underflow and any relation with FCNPC_OnDestroy?

Thanks!

PS: I have a log with a NPC table printed and the following erros as soon as I start destroying NPC 104:

Code:
[22:25:36] ---------------------------------------------------------------------------------------------------------------------------------
[22:25:36] NPC Table ([616]SpawnVehicles)
[22:25:36] =================================================================================================================================
[22:25:36] RouteId 	 NpcId 	 NpcName 			 VehicleId 	 CurrentNode 	 CentralRange 	 Velocity
[22:25:36] ---------------------------------------------------------------------------------------------------------------------------------
[22:25:36] 13 		 91 	 driver_agent_13 		 14 		 3 		 0 		 1.03
[22:25:36] 12 		 92 	 driver_agent_12 		 13 		 4 		 0 		 1.03
[22:25:36] 11 		 93 	 driver_agent_11 		 12 		 7 		 0 		 1.03
[22:25:36] 10 		 94 	 driver_agent_10 		 11 		 9 		 0 		 1.03
[22:25:36] 9 		 95 	 driver_agent_9 		 10 		 15 		 0 		 1.03
[22:25:36] 8 		 96 	 driver_agent_8 		 9 		 19 		 0 		 1.03
[22:25:36] 7 		 97 	 driver_agent_7 		 8 		 30 		 0 		 1.03
[22:25:36] 6 		 98 	 driver_agent_6 		 7 		 68 		 1 		 1.03
[22:25:36] 5 		 99 	 driver_agent_5 		 6 		 81 		 1 		 1.03
[22:25:36] 4 		 100 	 driver_agent_4 		 5 		 45 		 0 		 1.03
[22:25:36] 3 		 101 	 driver_agent_3 		 4 		 63 		 1 		 1.03
[22:25:36] 2 		 102 	 driver_agent_2 		 3 		 51 		 0 		 1.03
[22:25:36] 1 		 103 	 driver_agent_1 		 2 		 68 		 0 		 1.03
[22:25:36] 14 		 104 	 driver_agent_14 		 1 		 0 		 0 		 1.03
[22:25:36] ---------------------------------------------------------------------------------------------------------------------------------
[22:25:36] [debug] Run time error 7: "Stack underflow"
[22:25:36] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:36] [debug] AMX backtrace:
[22:25:37] [debug] Run time error 7: "Stack underflow"
[22:25:37] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:37] [debug] AMX backtrace:
[22:25:37] [debug] Run time error 7: "Stack underflow"
[22:25:37] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:37] [debug] AMX backtrace:
[22:25:37] [debug] Run time error 7: "Stack underflow"
[22:25:37] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:37] [debug] AMX backtrace:
[22:25:37] [debug] Run time error 7: "Stack underflow"
[22:25:37] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:37] [debug] AMX backtrace:
[22:25:37] [debug] Run time error 7: "Stack underflow"
[22:25:37] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:37] [debug] AMX backtrace:
[22:25:37] [debug] Run time error 7: "Stack underflow"
[22:25:37] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:37] [debug] AMX backtrace:
[22:25:38] [debug] Run time error 7: "Stack underflow"
[22:25:38] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:38] [debug] AMX backtrace:
[22:25:38] [debug] Run time error 7: "Stack underflow"
[22:25:38] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:38] [debug] AMX backtrace:
[22:25:39] [debug] Run time error 7: "Stack underflow"
[22:25:39] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:39] [debug] AMX backtrace:
[22:25:39] [debug] Run time error 7: "Stack underflow"
[22:25:39] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:39] [debug] AMX backtrace:
[22:25:39] [debug] Run time error 7: "Stack underflow"
[22:25:39] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:39] [debug] AMX backtrace:
[22:25:40] [debug] Run time error 7: "Stack underflow"
[22:25:40] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:40] [debug] AMX backtrace:
[22:25:43] [debug] Run time error 7: "Stack underflow"
[22:25:43] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:43] [debug] AMX backtrace:
[22:25:43] [debug] Run time error 7: "Stack underflow"
[22:25:43] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:43] [debug] AMX backtrace:
And that's it. All vehicles just stop driving and stay there, frozen . It seems that the Stack underflow error is thrown by each FCNPC_OnReachDestination or even FCNPC_Spawn triggered after the destruction of NPC 104.
rrnovaesjr is offline   Reply With Quote
Old 16/11/2017, 07:01 AM   #3446
ZiGGi
High-roller
 
ZiGGi's Avatar
 
Join Date: Sep 2008
Location: Russia
Posts: 1,626
Reputation: 274
Default Re: FCNPC - Fully Controllable NPC

Quote:
Originally Posted by rrnovaesjr View Post
Hello,

I found your comment interesting as I've been experiencing the same error.

Could you explain a little further what does this mean? I'm using FCNPC_OnReachDestination(npcid) with a call to FCNPC_Destroy(npcid) whenever a NPC reaches a final state (a position, to be more specific). If I stop calling FCNPC_Destroy everything works ~almost~ fine, except by the fact that I need them destroyed.

Does anyone know anything about Stack Underflow and any relation with FCNPC_OnDestroy?

Thanks!

PS: I have a log with a NPC table printed and the following erros as soon as I start destroying NPC 104:

Code:
[22:25:36] ---------------------------------------------------------------------------------------------------------------------------------
[22:25:36] NPC Table ([616]SpawnVehicles)
[22:25:36] =================================================================================================================================
[22:25:36] RouteId 	 NpcId 	 NpcName 			 VehicleId 	 CurrentNode 	 CentralRange 	 Velocity
[22:25:36] ---------------------------------------------------------------------------------------------------------------------------------
[22:25:36] 13 		 91 	 driver_agent_13 		 14 		 3 		 0 		 1.03
[22:25:36] 12 		 92 	 driver_agent_12 		 13 		 4 		 0 		 1.03
[22:25:36] 11 		 93 	 driver_agent_11 		 12 		 7 		 0 		 1.03
[22:25:36] 10 		 94 	 driver_agent_10 		 11 		 9 		 0 		 1.03
[22:25:36] 9 		 95 	 driver_agent_9 		 10 		 15 		 0 		 1.03
[22:25:36] 8 		 96 	 driver_agent_8 		 9 		 19 		 0 		 1.03
[22:25:36] 7 		 97 	 driver_agent_7 		 8 		 30 		 0 		 1.03
[22:25:36] 6 		 98 	 driver_agent_6 		 7 		 68 		 1 		 1.03
[22:25:36] 5 		 99 	 driver_agent_5 		 6 		 81 		 1 		 1.03
[22:25:36] 4 		 100 	 driver_agent_4 		 5 		 45 		 0 		 1.03
[22:25:36] 3 		 101 	 driver_agent_3 		 4 		 63 		 1 		 1.03
[22:25:36] 2 		 102 	 driver_agent_2 		 3 		 51 		 0 		 1.03
[22:25:36] 1 		 103 	 driver_agent_1 		 2 		 68 		 0 		 1.03
[22:25:36] 14 		 104 	 driver_agent_14 		 1 		 0 		 0 		 1.03
[22:25:36] ---------------------------------------------------------------------------------------------------------------------------------
[22:25:36] [debug] Run time error 7: "Stack underflow"
[22:25:36] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:36] [debug] AMX backtrace:
[22:25:37] [debug] Run time error 7: "Stack underflow"
[22:25:37] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:37] [debug] AMX backtrace:
[22:25:37] [debug] Run time error 7: "Stack underflow"
[22:25:37] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:37] [debug] AMX backtrace:
[22:25:37] [debug] Run time error 7: "Stack underflow"
[22:25:37] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:37] [debug] AMX backtrace:
[22:25:37] [debug] Run time error 7: "Stack underflow"
[22:25:37] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:37] [debug] AMX backtrace:
[22:25:37] [debug] Run time error 7: "Stack underflow"
[22:25:37] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:37] [debug] AMX backtrace:
[22:25:37] [debug] Run time error 7: "Stack underflow"
[22:25:37] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:37] [debug] AMX backtrace:
[22:25:38] [debug] Run time error 7: "Stack underflow"
[22:25:38] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:38] [debug] AMX backtrace:
[22:25:38] [debug] Run time error 7: "Stack underflow"
[22:25:38] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:38] [debug] AMX backtrace:
[22:25:39] [debug] Run time error 7: "Stack underflow"
[22:25:39] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:39] [debug] AMX backtrace:
[22:25:39] [debug] Run time error 7: "Stack underflow"
[22:25:39] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:39] [debug] AMX backtrace:
[22:25:39] [debug] Run time error 7: "Stack underflow"
[22:25:39] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:39] [debug] AMX backtrace:
[22:25:40] [debug] Run time error 7: "Stack underflow"
[22:25:40] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:40] [debug] AMX backtrace:
[22:25:43] [debug] Run time error 7: "Stack underflow"
[22:25:43] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:43] [debug] AMX backtrace:
[22:25:43] [debug] Run time error 7: "Stack underflow"
[22:25:43] [debug]  Stack pointer (STK) is 0x25EB0C, stack top (STP) is 0x25EB08
[22:25:43] [debug] AMX backtrace:
And that's it. All vehicles just stop driving and stay there, frozen . It seems that the Stack underflow error is thrown by each FCNPC_OnReachDestination or even FCNPC_Spawn triggered after the destruction of NPC 104.
Show your code.
ZiGGi is offline   Reply With Quote
Old 16/11/2017, 07:25 AM   #3447
ZiGGi
High-roller
 
ZiGGi's Avatar
 
Join Date: Sep 2008
Location: Russia
Posts: 1,626
Reputation: 274
Default Re: FCNPC - Fully Controllable NPC

Quote:
Originally Posted by MrStead View Post
Why bots push away a vehicle when enter it and when I am already in this vehicle? I use FCNPC_EnterVehicle()

Althought with motorbikes no any issues, watch the video(in the end of this):
https://www.youtube.com/watch?v=C9uFnYIJ7gs
I know about this and I will try to fix this, but I'm not sure in my success.
ZiGGi is offline   Reply With Quote
Old 16/11/2017, 07:12 PM   #3448
rrnovaesjr
Little Clucker
 
Join Date: Oct 2017
Posts: 4
Reputation: 0
Red face Re: FCNPC - Fully Controllable NPC

Quote:
Originally Posted by ZiGGi View Post
Show your code.
Code:
/**
	A command to start a simulation. This will use the file received as a
	parameter to set N vehicle's routes and make them spawn dynamically over the
	city limits. The received parameter must be a valid simulation file,
	otherwise the server will respond with unexpected behaviour.

	@param params[]
	A string with the filename to be used in the simulation.
*/
CMD:init(playerid, params[]) {
	new command[128];
	if(sscanf(params, "s[128]", command)) {
	    SendClientMessage(playerid, -1, "{FF0000}[RoutesConfiguration] Unexpected format.");
	    return 1;
	}
	if(isSimulationRunning) {
	    SendClientMessage(playerid, -1, "{FF0000}[RoutesConfiguration] There's already a simulation in course.");
	    return 1;
	}
	new path[128];
	format(path, sizeof(path), "routes/%s", command);
	if(fexist(path)) {
		new File:routesFile = fopen(path, io_read);
		initializeRoutes(routesFile);
		fclose(routesFile);
		SendClientMessageToAll(-1, "{00CC00}[RoutesConfiguration] Simulation started.");
		SetTimer("SpawnVehicles", vehicleDelays[0], false);
	}
	else {
		new message[512];
		format(message, sizeof(message), "{FF0000}[RoutesConfiguration] File %s not found. Use /generateroutes to generate a simulation file.", path);
	    SendClientMessage(playerid, -1, message);
	}
	return 1;
}
A note in the SetTimer, please. This is when I start spawning vehicles. This is the implementation:

Code:
public SpawnVehicles() {
    isSimulationRunning = true;
	if(vehicleCounter >= numberOfVehicles) {
        return 0;
    }
    new nPCName[64];
    new message[256];
	new nodeId = nodesList[routesMatrix[vehicleCounter][0]][ID_FIELD];
    new Float:pX = nodesList[routesMatrix[vehicleCounter][0]][PX_FIELD];
    new Float:pY = nodesList[routesMatrix[vehicleCounter][0]][PY_FIELD];
    new Float:pZ = nodesList[routesMatrix[vehicleCounter][0]][PZ_FIELD];
	new Float:dX = nodesList[routesMatrix[vehicleCounter][1]][PX_FIELD];
	new Float:dY = nodesList[routesMatrix[vehicleCounter][1]][PY_FIELD];
	new Float:dZ = nodesList[routesMatrix[vehicleCounter][1]][PZ_FIELD];
	format(nPCName, sizeof(nPCName), "driver_agent_%d", vehicleCounter);
    format(message, sizeof(message), "[RoutesConfiguration] '%s' spawned at SpaceNode %d (%.2f, %.2f, %.2f).", nPCName, nodeId, pX, pY, pZ);
    SendClientMessageToAll(-1, message);
	new npcid = FCNPC_Create(nPCName);
	nPCTable[npcid][ROUTE_ID] = vehicleCounter;
	nPCTable[npcid][NPC_ID] = npcid;
	nPCTable[npcid][CURRENT_NODE_COUNTER] = 0;
	nPCTable[npcid][IS_IN_CENTRAL_RANGE] = false;
	nPCTable[npcid][VELOCITY] = STANDARD_VELOCITY;
	format(nPCTable[npcid][NPC_NAME], 64, nPCName);
	FCNPC_Spawn(npcid, generateRandomSkin(), pX, pY, pZ + 2.0);
	nPCTable[npcid][VEHICLE_ID] = CreateVehicle(generateRandomVehicleModel(), pX, pY, pZ, 0.0000, generateRandomColor(), generateRandomSkin(), INFINITY_RESPAWN_DELAY);
	FCNPC_PutInVehicle(npcid, nPCTable[npcid][VEHICLE_ID], 0);
	CreateDynamic3DTextLabel(nPCName, -1, 0.0, 0.0, 0.8, 160.0, npcid, INVALID_VEHICLE_ID, 0, -1, -1, -1, 160.0);
	new Float:qW, Float:qX, Float:qY, Float:qZ;
	GetQuatRotForVehBetweenCoords2D(pX, pY, pZ, dX, dY, dZ, qW, qX, qY, qZ);
	FCNPC_GoTo(npcid, dX, dY, dZ, FCNPC_MOVE_TYPE_DRIVE, nPCTable[npcid][VELOCITY], true, 0.0, true, 0.0, 0);
	FCNPC_SetQuaternion(npcid, qW, qX, qY, qZ);
	vehicleCounter++;
	vehicleCountdown++;
	CreateDriverAgent(npcid, STANDARD_VELOCITY, 0.0);
	SetTimer("SpawnVehicles", vehicleDelays[vehicleCounter - 1], false);
	printNPCTable("[616]SpawnVehicles");
	return 1;
}
The routesMatrix is a structure that we've created to set up the routes along the city. Therefore, each vehicle has, according to its route's id, a list of n nodes that builds its path. Whenever the vehicle reaches node i, FCNPC_OnReachDestination (described below) must lead the vehicle to node (i + 1). If it has reached the final node, then FCNPC_OnDestroy must be called. Here it is:

Code:
**
	Callback implementation for a NPC that reaches a specific destination. This
	is the method that verifies if a Vehicle has reached its final node. If it
	has, then both NPC and Vehicle must be destroyed and the counter must be
	subtracted by one unity. Therefore, when the global counter reaches 0, the
	simulation has terminated. Otherwise, a new route must be set for the NPC to
	the next SpaceNode.
	
	@param npcid
	The NPC's identifier.
	@return 1
*/
public FCNPC_OnReachDestination(npcid) {
	nPCTable[npcid][CURRENT_NODE_COUNTER]++;
	new currentNode = nPCTable[npcid][CURRENT_NODE_COUNTER];
	if(currentNode == numberOfNodesPerVehicle[nPCTable[npcid][ROUTE_ID]] - 1) {
		new message[256];
		format(message, sizeof(message), "[RoutesConfiguration] %s has reached destination.", nPCTable[npcid][NPC_NAME]);
	 	DestroyDriverAgent(npcid);
		DestroyVehicle(nPCTable[npcid][VEHICLE_ID]);
	 	FCNPC_Destroy(npcid);
	 	nPCTable[npcid][ROUTE_ID] = 0;
		nPCTable[npcid][NPC_ID] = 0;
		format(nPCTable[npcid][NPC_NAME], 64, "");
		nPCTable[npcid][VEHICLE_ID] = 0;
		nPCTable[npcid][IS_IN_CENTRAL_RANGE] = 0;
		nPCTable[npcid][VELOCITY] = 0.0;
		vehicleCountdown--;
		SendClientMessageToAll(-1, message);
		if(vehicleCountdown == 0) {
		    vehicleCounter = 0;
		    SendClientMessageToAll(-1, "{00CC00}[RoutesConfiguration] Simulation terminated.");
		    isSimulationRunning = false;
		}
	    return 1;
	}
	new Float:qW, Float:qX, Float:qY, Float:qZ;
	GetQuatRotForVehBetweenCoords2D(
		nodesList[routesMatrix[nPCTable[npcid][ROUTE_ID]][currentNode]][PX_FIELD],
		nodesList[routesMatrix[nPCTable[npcid][ROUTE_ID]][currentNode]][PY_FIELD],
		nodesList[routesMatrix[nPCTable[npcid][ROUTE_ID]][currentNode]][PZ_FIELD],
		nodesList[routesMatrix[nPCTable[npcid][ROUTE_ID]][currentNode + 1]][PX_FIELD],
	 	nodesList[routesMatrix[nPCTable[npcid][ROUTE_ID]][currentNode + 1]][PY_FIELD],
	 	nodesList[routesMatrix[nPCTable[npcid][ROUTE_ID]][currentNode + 1]][PZ_FIELD],
	 	qW,
	 	qX,
	 	qY,
	 	qZ
	);
	FCNPC_GoTo(
		nPCTable[npcid][NPC_ID],
		nodesList[routesMatrix[nPCTable[npcid][ROUTE_ID]][currentNode + 1]][PX_FIELD],
		nodesList[routesMatrix[nPCTable[npcid][ROUTE_ID]][currentNode + 1]][PY_FIELD],
		nodesList[routesMatrix[nPCTable[npcid][ROUTE_ID]][currentNode + 1]][PZ_FIELD],
		FCNPC_MOVE_TYPE_DRIVE,
		nPCTable[npcid][VELOCITY],
		true,
		0.0,
		true,
		0.0,
		0
	);
	FCNPC_SetQuaternion(nPCTable[npcid][NPC_ID], qW, qX, qY, qZ);
	return 1;
}
I'm using Windows 10 (which is very awful, I suppose), but despite that I have no idea of what I'm doing wrong. Is there any solution for my problem?
rrnovaesjr 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 10:56 AM.


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