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.

61 lines
1.3 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,"train_lv_to_ls1");
  17. //SendChat("I'm leaving LV for LS station.");
  18. }
  19. else if(gPlaybackFileCycle==1) {
  20. StartRecordingPlayback(PLAYER_RECORDING_TYPE_DRIVER,"train_ls_to_sf1");
  21. //SendChat("I'm leaving LS for SF station.");
  22. }
  23. else if(gPlaybackFileCycle==2) {
  24. StartRecordingPlayback(PLAYER_RECORDING_TYPE_DRIVER,"train_sf_to_lv1");
  25. //SendChat("I'm leaving SF for LV station.");
  26. }
  27. gPlaybackFileCycle++;
  28. }
  29. //------------------------------------------
  30. public OnRecordingPlaybackEnd()
  31. {
  32. NextPlayback();
  33. }
  34. //------------------------------------------
  35. public OnNPCEnterVehicle(vehicleid, seatid)
  36. {
  37. NextPlayback();
  38. }
  39. //------------------------------------------
  40. public OnNPCExitVehicle()
  41. {
  42. StopRecordingPlayback();
  43. gPlaybackFileCycle = 0;
  44. }
  45. //------------------------------------------