NPC weird reaction
#1

Hello, so i`ll get straight to the problem.

I've got a BUS system controlled by npcs. The only problem is that, one of the buses works just perfectly, on the other hand, every time a player teleports or makes its presence around the second bus, the NPC practically get's out of the bus and the bus completely stops with the npc standing beside it. I know it's a rare problem and there may be not so much people that encountered it but, if someone does, please be kind and give me at least a hint about what it could be. I have to say that both buses work on the same matters. And by that i mean that they are scripted in the same way.
Reply
#2

can you show us the codes?
Reply
#3

If you think that pasting a code shuttered around the gm is that easy then... meh, mkay.
But, I will say again, there's not much difference between the codes. So, how does one bus work but the other one just stops in the presence of a player? [ The recording keeps going, if i TP to the bus id again, it teleports me to an invisible moving thingy which is the actual recording. ]

Код:
    OnPlayerSpawn:
    if(IsPlayerNPC(playerid))
    {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        if(!strcmp(npcname, "EasternBus", true))
        {
                SetPlayerColor(playerid, 0xFFFFFF00);
	        PutPlayerInVehicle(playerid, Bus38, 0);
        	SetPlayerSkin(playerid, 255);
        	ResetPlayerWeapons(playerid);
        	Attach3DTextLabelToVehicle(Text38, Bus38, 0.0, 0.0, 0.0);
        }
        if(!strcmp(npcname, "WesternBus", true))
        {
                SetPlayerColor(playerid, 0xFFFFFF00);
		PutPlayerInVehicle(playerid, Bus85, 0);
        	SetPlayerSkin(playerid, 255);
        	ResetPlayerWeapons(playerid);
        	Attach3DTextLabelToVehicle(Text85, Bus85, 0.0, 0.0, 0.0);
        }
        return 1;
    }
The basic stuff at ongamemodeinit: 
        ConnectNPC("EasternBus","Bus");
	ConnectNPC("WesternBus","Bus2");

The recordings .pwn files:
#define RECORDING "Bus"
#define RECORDING_TYPE 1

#include <a_npc>
main(){}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);

#if RECORDING_TYPE == 1
    public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
    public OnNPCExitVehicle() StopRecordingPlayback();
#else
    public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#endif

and

#define RECORDING "Bus2"
#define RECORDING_TYPE 1

#include <a_npc>
main(){}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);

#if RECORDING_TYPE == 1
    public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
    public OnNPCExitVehicle() StopRecordingPlayback();
#else
    public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#endif

The rest of the code doesn't matter so i won't bother pasting it.
Reply
#4

Uhm, no one?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)