NPC Problems
#1

hi,
I'm trying to make a driving NPC but i have a problem.The NPCconnects and spawns but it stays at the spawn point.I've placed the rec and amx files in the correct folder.
I read many tutorials but it's still wrong.

script1:
Код:
#define RECORDING "bus"
#define RECORDING_TYPE 1 

#include <a_npc> 

public OnRecordingPlaybackEnd ( )
{
    StartRecordingPlayback ( RECORDING_TYPE, RECORDING );
    return 0;
}

#if RECORDING_TYPE == 1 
    public OnNPCEnterVehicle ( vehicleid, seatid )
    {
        StartRecordingPlayback ( RECORDING_TYPE, RECORDING );
        return 0;
    }
    public OnNPCExitVehicle ( )
    {
        StopRecordingPlayback ( );
        return 0;
    }
#else
    public OnNPCSpawn ( )
    {
        StartRecordingPlayback ( RECORDING_TYPE, RECORDING );
        return 0;
#endif
script2:
Код:
#include <a_samp>
#include <a_npc>

new Bus; 

public OnFilterScriptInit ( )
{
    print ( "BusNPC" );
    ConnectNPC ( "BusNPC", "BusRec" );
    Bus = CreateVehicle(437, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1, 60);
    return 1;
}

public OnPlayerSpawn ( playerid )
{
    if ( IsPlayerNPC ( playerid ) )
    {
        new npcname [ MAX_PLAYER_NAME ];
        GetPlayerName ( playerid, npcname, sizeof ( npcname ) );
        if ( !strcmp ( npcname, "BusNPC", true ) )
        {
            PutPlayerInVehicle ( playerid, Bus, 0 );
        }
    }
}
I can't figure out what's the problem
Reply


Messages In This Thread
NPC Problems - by Dave001 - 07.07.2010, 10:45
Re: NPC Problems - by CAR - 07.07.2010, 11:28
Re: NPC Problems - by Dave001 - 07.07.2010, 12:04
Re: NPC Problems - by CAR - 07.07.2010, 12:11
Re: NPC Problems - by Dave001 - 07.07.2010, 12:28
Re: NPC Problems - by CAR - 07.07.2010, 12:31
Re: NPC Problems - by Dave001 - 07.07.2010, 12:39

Forum Jump:


Users browsing this thread: 3 Guest(s)