NPC Help.
#1

Hello, Its me again, I am using Kruence NPC creator but the problem is... After creating NPC, It automatically gets connected to server and I am using Roleplay script where NPC gets stuck in Tutorial and then They never spawn, I also tried TogglePlayerSpectating But no desire results.

EDIT: its only happen when i Create NPC in Vehicle. Onfoot spawns and work fine.
Reply
#2

Ok So now I tried something, and the NPC spawned successfully but now, Its on foot instead NPC should be inside the vehicle as i recorded it inside Vehicle...
Reply
#3

Even though you recorded it in a vehicle, you still need to place the NPC in that vehicle, and commence the playback.

Quote:

I am using Roleplay script where NPC gets stuck in Tutorial and then They never spawn

And that is because you're not checking whether the player connecting to the script, is an NPC and avoiding the hang that's happening. After all the script will be waiting for something like a login or something else, so it stops them spawning.

Then they will simply sit there.
Reply
#4

Look, I have placed the NPC inside the Vehicle on Its spawn...

PHP код:
public OnVehicleSpawn(vehicleid)
{
public 
OnPlayerConnect(playerid)
{
    if(
IsPlayerNPC(playerid))
    {
         
TogglePlayerSpectating(playerid0);
         new 
npcname[MAX_PLAYER_NAME];
         
GetPlayerName(playeridnpcnamesizeof(npcname));
         if(!
strcmp(npcname"DevilBusNPC"true))
         {
              
PutPlayerInVehicle(playeridDevilBusNPCVehicle0);
         }
         return 
1;
     }
     return 
1;

Reply
#5

We'll start again shall we...



What happens currently, as we stand now.

You have an NPC that connects, spawns, and stands idle, wihtout being in the vehicle they should be, and without them doing the playback they are supposed to be. Correct?

Have you tried it on a clean script, such as GrandLarceny, without anything else loaded but the gamemode, and the NPC FS, and seen whether it's loading on that?
Reply
#6

Its working fine on Other clean gamemodes.
Reply
#7

That, again, is your gamemode, (or maybe another filterscript) holding it back somewhere. Maybe try disabling all FSes except for the game and the NPC script to check entirely.

There'll be something stopping it getting in a vehicle seeing as you've got it spawned (Depending on where it actually spawned).

You may want to compare GrandLarceny and its callbacks that check for the NPCs, to your gamemode, and see where you are possibly missing one or 2.
Reply


Forum Jump:


Users browsing this thread: