SAMP Gitlab CI Test
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.2 KiB

  1. //
  2. // A Driver NPC that goes around a path continuously
  3. // Kye 2009
  4. //
  5. #include <a_npc>
  6. #define NUM_PLAYBACK_FILES 3
  7. new gPlaybackFileCycle=0;
  8. //------------------------------------------
  9. main(){}
  10. //------------------------------------------
  11. NextPlayback()
  12. {
  13. // Reset the cycle count if we reach the max
  14. if(gPlaybackFileCycle==NUM_PLAYBACK_FILES) gPlaybackFileCycle = 0;
  15. if(gPlaybackFileCycle==0) {
  16. StartRecordingPlayback(PLAYER_RECORDING_TYPE_DRIVER,"at400_ls_to_lv_x1");
  17. }
  18. else if(gPlaybackFileCycle==1) {
  19. StartRecordingPlayback(PLAYER_RECORDING_TYPE_DRIVER,"at400_lv_to_sf_x1");
  20. }
  21. else if(gPlaybackFileCycle==2) {
  22. StartRecordingPlayback(PLAYER_RECORDING_TYPE_DRIVER,"at400_sf_to_ls_x1");
  23. }
  24. gPlaybackFileCycle++;
  25. }
  26. //------------------------------------------
  27. public OnRecordingPlaybackEnd()
  28. {
  29. NextPlayback();
  30. }
  31. //------------------------------------------
  32. public OnNPCEnterVehicle(vehicleid, seatid)
  33. {
  34. NextPlayback();
  35. }
  36. //------------------------------------------
  37. public OnNPCExitVehicle()
  38. {
  39. StopRecordingPlayback();
  40. gPlaybackFileCycle = 0;
  41. }
  42. //------------------------------------------