21.04.2013, 18:55
I try several way to put NPC in car as driver but :
1-st attempt : Npc just stand still.
- Under OnGameModeInit Created NPC
- Under OnGameModeInit Created Vehicle
- Under OnGameModeInit PutInVehicle
2-nd attempt: Npc crash from server.
-All this but in command
And right way to put rnpc in car is ?
1-st attempt : Npc just stand still.
- Under OnGameModeInit Created NPC
- Under OnGameModeInit Created Vehicle
- Under OnGameModeInit PutInVehicle
pawn Код:
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
npc = ConnectRNPC("Racer");
new veh = CreateVehicle(420, 0.0, 0.0, 25.0, 0.0, -1, -1, 0);
PutPlayerInVehicle(npc, veh, 0);
RNPC_CreateBuild(npc, PLAYER_RECORDING_TYPE_DRIVER);
RNPC_SetAcceleration(0.003);
RNPC_AddMovementAlt(0.0, 0.0, 25.0, 0.0, 500.0, 25.0, 0.15, false);
RNPC_FinishBuild();
RNPC_StartBuildPlayback(npc);
return 1;
}
-All this but in command
And right way to put rnpc in car is ?