SA-MP Forums Archive
Taxi Dispatch text draws - 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: Taxi Dispatch text draws (/showthread.php?tid=607288)



Taxi Dispatch text draws - Luicy. - 17.05.2016

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.


Re: Taxi Dispatch text draws - JasperM - 17.05.2016

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.


Re: Taxi Dispatch text draws - Luicy. - 17.05.2016

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


Re: Taxi Dispatch text draws - JasperM - 17.05.2016

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.


Re: Taxi Dispatch text draws - Luicy. - 17.05.2016

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);