Raised This Month: $ Target: $400
 0% 

HUD-based player input prompt


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TheFrozenFire
Junior Member
Join Date: Jun 2010
Old 04-13-2011 , 17:57   HUD-based player input prompt
Reply With Quote #1

I've seen in other plugins that a HUD-based input prompt is possible.

I need to prompt the player for a float, but I cannot find the function necessary to do this.

Can anyone point me in the right direction?
TheFrozenFire is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 04-13-2011 , 18:02   Re: HUD-based player input prompt
Reply With Quote #2

Well, the command: "messagemode yourcmd" can act like a say message but it sends the data to "yourcmd" like you'd type it in console "yourcmd whatever you said in messagemode".

So if you want a float, you can do str_to_float() at the string received, you can't get direct float.
__________________
Hunter-Digital is offline
TheFrozenFire
Junior Member
Join Date: Jun 2010
Old 04-13-2011 , 18:06   Re: HUD-based player input prompt
Reply With Quote #3

Ah, that's of great help. I hadn't thought of doing that.

Just to be clear, that message appears at the top-left of the HUD, yes? I want to be able to have it displayed as "Question: <input>".
TheFrozenFire is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 04-13-2011 , 18:11   Re: HUD-based player input prompt
Reply With Quote #4

Well it actually displays the command the player's sending to... so if you want it to be displayed as "Question" you need to make the command "Question" :}
__________________
Hunter-Digital is offline
TheFrozenFire
Junior Member
Join Date: Jun 2010
Old 04-13-2011 , 18:19   Re: HUD-based player input prompt
Reply With Quote #5

A bit inelegant, but I can work with that.

Thanks for your help.
TheFrozenFire is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:10.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode