Taxi Dispatch text draws
#1

Hi, So I got this idea of creating the Taxi Dispatch using textdraws,
This is an example I made with a filterscript editor: http://imgur.com/3GHns8K
(Imgur was overloaded while I uploaded so, Check attached image if you can't enter imgur.)

At the right bottom you see "Dispatch" then some calls.
I want this but the calls updates to latest, The variable/strings for the 4 latest calls would be:
td_Stats[call1]
td_Stats[call2]
td_Stats[call3]
td_Stats[call4]

and they return the playerid that made the call,
Here's a .txt for the generated textdraws.
http://pastebin.com/NmaZXfra

Thank you alot! I know this is a request, but I really don't understand Textdraws, The one's that help me out will receive indeed a reputation.
Reply
#2

You are going to need something to store the 4 most recent calls in. Than you will need to call some kind of update function in your /calltaxi command, so everytime someone calls a taxi the dispatch textdraws get updated. In that function, you can use TextDrawSetString To re-set all 4 textdraws to the new value.
Reply
#3

Thanks JasperM, I'm right now doing the Updater using a 1second timer everything the driver gets on duty.
Reply
#4

Quote:
Originally Posted by Meller
Посмотреть сообщение
Thanks JasperM, I'm right now doing the Updater using a 1second timer everything the driver gets on duty.
Why would you use a timer for this? You only need to update it when a taxi driver enters his vehicle (assuming the dispatch screen would realisticly only be visible from inside the car), when he exits it and when someone calls a taxi.
Reply
#5

I get this error: warning 213: tag mismatch
at this line:
PHP код:
TextDrawSetString(Textdraw3Updater3); 
Full code:
PHP код:
new Updater3[255];
        
format(Updater3sizeof(Updater3), "%s(%i) requested a pickup."GetRPName(td_Stats_call3), td_Stats_call3);
        
TextDrawSetString(Textdraw3Updater3); 
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)