06.07.2012, 15:11
Hi, I have a problem with my NPC. I put in a few NPC, and they are flashing. Video link: [ame]http://www.youtube.com/watch?v=RwCkxtAxlgc[/ame]
When I'm have recorded the NPC, I put the .rec file to npcmodes/recordings. In the npcmodes folder I've created a .pwn file, contains:
And connected the NPC in OnGameModeInit():
When the NPC spawn, I put a 3DText over the NPC's head, and give a skin, and interior.
The recording is about 15 seconds. Sorry for my bad English.
When I'm have recorded the NPC, I put the .rec file to npcmodes/recordings. In the npcmodes folder I've created a .pwn file, contains:
Код:
#define RECORDING "NPC_Boltos" // .rec file name #define RECORDING_TYPE 2 // 1 if NPC is in vehicle, 2 if NPC is onfoot #include <a_npc> public OnRecordingPlaybackEnd ( ) { StartRecordingPlayback ( RECORDING_TYPE, RECORDING ); return 0; } #if RECORDING_TYPE == 1 // Vehicle public OnNPCEnterVehicle ( vehicleid, seatid ) { StartRecordingPlayback ( RECORDING_TYPE, RECORDING ); return 0; } public OnNPCExitVehicle ( ) { StopRecordingPlayback ( ); return 0; } #else // Onfoot public OnNPCSpawn ( ) { StartRecordingPlayback ( RECORDING_TYPE, RECORDING ); return 0; } #endif
Код:
ConnectNPC ("NPC_Boltos","NPC_Boltos");
Код:
if(!strcmp(npcname,"NPC_Boltos",true)) { SetPlayerInterior(playerid, 6); CreateDynamic3DTextLabel("[NPC] Eladу", 0x00BFFFFF, 0, 0, 0.5, 20.0, playerid, INVALID_VEHICLE_ID, 0); SetPlayerSkin(playerid, 210); }