07.07.2010, 10:45
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:
script2:
I can't figure out what's the problem
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
Код:
#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 ); } } }