Pausing NPC untill a certain time
#1

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
Reply
#2

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

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
Reply
#4

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^^
Reply
#5

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

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
Reply
#7

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
Reply
#8

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.
Reply
#9

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)