|
|
#1 |
|
Little Clucker
![]() Join Date: Jul 2010
Posts: 8
Reputation: 0
|
Lenne egy kis gondom az NPC készítéssel.Megnéztem már rengeteg tutorialt és mindent jól csináltam (szerintem).
A rec fájl a helyén a filter script is és a másik amx is.Az NPC connectel fenn is marad viszont csak áll a kezdőhelyen. A filterscript: Code:
#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 );
}
}
}
a másik amx: Code:
#define RECORDING "busz3"
#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
|
|
|
|
|
#2 |
|
Little Clucker
![]() Join Date: Oct 2009
Posts: 7
Reputation: 0
|
csá Dave001
próbáld meg így: Code:
#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 );
return 1;
}
return 1;
}
return 1;
}
Code:
#define RECORDING "BusNPC"
#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
|
|
|
|
|
#3 |
|
Little Clucker
![]() Join Date: Oct 2009
Posts: 7
Reputation: 0
|
Bocs rosszul írtam
Code:
CreateVehicle(437, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1, 60); Code:
AddStaticVehicle(437, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1); Először nálam sem ment, ugyanez a probléma volt
|
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Tutorial] NPC készítés | [RKS]Ricsi | Archive | 21 | 26/07/2011 12:38 AM |