14.08.2013, 12:27
I've recently made a NPC and got it working perfectly. Except the part where it stops. After a few testing I've found that the problem occurs when the StopRecordingPlayback() is called. When that happens the server closes itself without leaving any error messages on the server log. Anyone know a solution for this?
P.S The NPC receives commands to stop or start the playback
Here's the NPC's file
And here's the stock method I use in my gamemode to stop the recording
P.S The NPC receives commands to stop or start the playback
Here's the NPC's file
pawn Код:
public OnClientMessage(color, text[]) {
if(text[0] != '/' || color != 123456) return;
if(strcmp(text, "/startdriving", true) == 0) {
StartRecordingPlayback(PLAYER_RECORDING_TYPE_DRIVER, "Car");
return;
}
if(strcmp(text, "/stopdriving", true) == 0) {
StopRecordingPlayback();
return;
}
}
pawn Код:
stock ResetTaxiDriver() {
NPCDriving = false;
SendClientMessage(Cardriver, 123456, "/stopdriving");
DestroyVehicle(Car);
Kick(Cardriver);
}