Scripts / PromptDuration does not work for me

Author
Message
Kalle801
10
Years of Service
User Offline
Joined: 8th Jan 2014
Location: Germany
Posted: 15th Jun 2016 00:32
Hello. i try to use: PromptDuration("Weapons are disabled in this Zone",3000) but this does not work.
If i use: Prompt("Weapons are disabled in this Zone") this works, but it stays on my screen.

I want the text to be show only for a view Seconds.

Maybe anyone can help me pls?

Greetings.
wermer
8
Years of Service
User Offline
Joined: 18th Sep 2015
Location:
Posted: 15th Jun 2016 08:01
Your PromptDuration function is working fine for me. Maybe the trigger isn't working? Maybe your global.lua got corrupted?
Maybe try to call the function directly with this:
SendMessageS("promptduration",3000,"Weapons are disabled in this Zone")
Windows 10 Home 64-bit / Intel i5 2500k @ 4.4Ghz + Asetek 510LC / Intel DP67DE / Intel 530 Series 240GB SSD / 16GB Kingston KVR 1333 / XFX Radeon R9 380X / Corsair TX 650 / Antec 300
PM
Kalle801
10
Years of Service
User Offline
Joined: 8th Jan 2014
Location: Germany
Posted: 15th Jun 2016 10:54 Edited at: 15th Jun 2016 10:56
Im using a trigger zone, which disables weapons if a user triggers it. If the user leave's the Zone, the weapons become enabled again. This works just fine but the message "Weapons enabled" <- when leaving the Zone, is shown all the time and not for only 3 Seconds.

Edit: Maybe its cause the fact, tha the command is in a loop and gets always triggered?
if g_Entity[e]['plrinzone']==0 then
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 15th Jun 2016 17:00
Add some flag to control it. IE:



I guess you are looping around, so Prompt are being running, all the time.

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM

Login to post a reply

Server time is: 2024-05-04 07:55:08
Your offset time is: 2024-05-04 07:55:08