05.09.2009, 09:15
I got problem..
Its creating vehicle, But nobody drive on it.
I did all the things are needed in the folder npcmodes.
The amx I called: Police_PatrolNPC
Here what I did:
Top:
OnGameModeInit:
OnPlayerSpawn:
And In Police_PatrolNPC, I wrote:
And the bot is stays high in the sky,
And he doesn't spawn to the vehicle.
edit:
I did Police man walking..
He is spawn to the walk place, but he is not walking!
Its creating vehicle, But nobody drive on it.
I did all the things are needed in the folder npcmodes.
The amx I called: Police_PatrolNPC
Here what I did:
Top:
Quote:
new NPCP; |
Quote:
ConnectNPC("PoliceMan_","Police_PatrolNPC"); NPCP = CreateVehicle(596,1535.8658,-1668.4530,13.0795,358.5437,1,0, 5000); |
OnPlayerSpawn:
Quote:
if(IsPlayerNPC(playerid)) { new npcname[MAX_PLAYER_NAME]; GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name. if(!strcmp(npcname, "PoliceMan_", true)) //Checking if the NPC's name is MyFirstNPC { //SetPlayerSkin(playerid, 280); PutPlayerInVehicle(playerid, NPCP, 0); //Putting the NPC into the vehicle we created for it. //SetSpawnInfo( playerid, 0, 280, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0 ); } return 1; } |
And In Police_PatrolNPC, I wrote:
Quote:
#define RECORDING "Police_Patrol" //This is the filename of your recording without the extension. #define RECORDING_TYPE 1 //1 for in vehicle and 2 for on foot. #include <a_npc> main(){} public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING); public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING); public OnNPCExitVehicle() StopRecordingPlayback(); |
And he doesn't spawn to the vehicle.
edit:
I did Police man walking..
He is spawn to the walk place, but he is not walking!