SA-MP Forums Archive
Pausing NPC untill a certain time - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Pausing NPC untill a certain time (/showthread.php?tid=96682)



Pausing NPC untill a certain time - scandragon - 10.09.2009

Hi,
is it somehow possible to use different states for NPCs so that once the recording is over it enters a pausing state untill a certain time before restarting?

I'm working on some public transport NPCs and I want the busses to leave at specific times, I just can't figure out how to do that..

Any help on this would be greatly appreciated


Re: Pausing NPC untill a certain time - Joe Staff - 10.09.2009

Use a timer to run a public callback that has the beginnings of your recordings once a recording is finished.


Re: Pausing NPC untill a certain time - scandragon - 10.09.2009

You have to bear with me, it's been years since I last worked on samp scripts..
How would I do that? Can't seem to find any good help on the wiki. All I really need is to make a check to see what the minute is, then start playback if the minute is more than 15 and less than 17.. Or more precisely start specific recordings, since I'll make each bus have two routes.. One only being driven once every hour..

I hope to get it all done and working before 0.3 final


Re: Pausing NPC untill a certain time - saiberfun - 10.09.2009

public OnRecordingPlaybackEnd()
{
}

maybe use the timer on this?
u could set a value for which route u started befor and then set the right timer for it^^


Re: Pausing NPC untill a certain time - lavamike - 11.09.2009

I would think you can just use PauseRecordingPlayback then set a timer and use ResumeRecordingPlayback when you want to un-pause


Re: Pausing NPC untill a certain time - scandragon - 13.09.2009

I've spent alot of time trying to do this now..
I just can't get it to work..

I guess someone else would just be able to write it without even thinking, but that's not me


Re: Pausing NPC untill a certain time - boelie - 26.09.2009

I have an alternative for this but it will also take lots of time.

1. buy a stopwatch
2. make sure you have at least 1 busnpc connect while you enter a command
3. get to the place where this 1 bus npc would start
4. get your stopwatch standby and get in another bus
5. type the command this bus npc would connect
6. if the npcbus is connected and driving click your stopwatch then type /vrecord
7. lets say you want another npc bus to leave 5 mins later...then drive your route at 5 mins

if you do this precise then it saves you alot of coding


Re: Pausing NPC untill a certain time - V1ceC1ty - 26.09.2009

Quote:
Originally Posted by scandragon
You have to bear with me, it's been years since I last worked on samp scripts..
you mean you registered a couple of days ago and your only just learning because Timers are easy to make.


Re: Pausing NPC untill a certain time - boelie - 26.09.2009

Quote:
Originally Posted by V№ceC№ty
Quote:
Originally Posted by scandragon
You have to bear with me, it's been years since I last worked on samp scripts..
you mean you registered a couple of days ago and your only just learning because Timers are easy to make.
Yes..find this noobhelp program called 'pawn help' im sure it helps you out