NPC question - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: NPC question (
/showthread.php?tid=481381)
NPC question -
random123 - 15.12.2013
I recorded an npc file in a vehicle, but the thing is, how do I detect when a player enters the npcs vehicle, then play the recording?
Re: NPC question -
niels44 - 15.12.2013
when there's nobody in the vehicle, pause it:
https://sampwiki.blast.hk/wiki/NPC:PauseRecordingPlayback
when someone enters the vehicle( as passenger ), resume it
https://sampwiki.blast.hk/wiki/NPC:ResumeRecordingPlayback
you could use OnPlayerStateChange for this, or OnPlayerEnterVehicle.
you could also reset the npc and the recording, if the person exits the vehicle again, while its still playing.
or a command like, /stopnpc, which will pause the recording, so the player can exit the vehicle.
Re: NPC question -
random123 - 15.12.2013
Quote:
Originally Posted by niels44
|
Can I use these functions in the gamemodes pwn? I thought you could only use the NPC: ones in the actual npcs script. Like how would I send data from the main game mode to the npcs script?