Raised This Month: $ Target: $400
 0% 

Custom text field?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ZombieBot
Junior Member
Join Date: Mar 2011
Old 05-11-2011 , 02:45   Custom text field?
Reply With Quote #1

Hi,

how i can make custom chat field? Like amx_banmenu custom reason?

Thx


(sry for my ban english)

bye =)
ZombieBot is offline
lis_16
Senior Member
Join Date: Feb 2008
Old 05-11-2011 , 04:55   Re: Custom text field?
Reply With Quote #2

You want a special plugin or just a filed to enter fe. interp?
lis_16 is offline
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 05-11-2011 , 06:50   Re: Custom text field?
Reply With Quote #3

ZombieBot
What exactly do you want?
__________________

SonicSonedit is offline
cFG
SourceMod Donor
Join Date: Aug 2009
Location: Poland, Łódź
Old 05-11-2011 , 09:59   Re: Custom text field?
Reply With Quote #4

for ex.
Code:
bind "." "messagemode amx_ban"
- now you have to enter the player name, ban lenght, reason and push enter
same as if you'll type it through the console but without the amx_ban prefix

This is it?
__________________
HLXBans - worthy successor of AMXBans

Last edited by cFG; 05-11-2011 at 10:01.
cFG is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-11-2011 , 10:06   Re: Custom text field?
Reply With Quote #5

"Custom text field" like you'd type into say but you actually type in a command ?

You just create a console command, example "CustomReason" and when you send your ban command or whatever, send cmd to client: "messagemode CustomReason", that'll show the user "CustomReason: " in top left corner of screen and he can type something there.

Then you just get the input client typed in CustomReason's callback function, I recommend using read_args() instead of read_argv() if you have only one long string that could contain other double quotes... anyway, just use read_args()

Simple.
__________________

Last edited by Hunter-Digital; 05-11-2011 at 23:55.
Hunter-Digital is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-11-2011 , 22:45   Re: Custom text field?
Reply With Quote #6

Quote:
Originally Posted by cFG View Post
for ex.
Code:
bind "." "messagemode amx_ban"
- now you have to enter the player name, ban lenght, reason and push enter
same as if you'll type it through the console but without the amx_ban prefix

This is it?
That doesn't work because the whole line of text you type will be interpreted at a single argument (the player name).
__________________
fysiks is offline
ZombieBot
Junior Member
Join Date: Mar 2011
Old 05-12-2011 , 01:51   Re: Custom text field?
Reply With Quote #7

Quote:
Originally Posted by Hunter-Digital View Post
"Custom text field" like you'd type into say but you actually type in a command ?

You just create a console command, example "CustomReason" and when you send your ban command or whatever, send cmd to client: "messagemode CustomReason", that'll show the user "CustomReason: " in top left corner of screen and he can type something there.

Then you just get the input client typed in CustomReason's callback function, I recommend using read_args() instead of read_argv() if you have only one long string that could contain other double quotes... anyway, just use read_args()

Simple.
Thx SO MUCH!
ZombieBot is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-12-2011 , 18:46   Re: Custom text field?
Reply With Quote #8

You can look at AMX SSBans plugin by Dorin. I did this in his plugin.
__________________
fysiks is offline
Reply


Thread Tools
Display Modes

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 04:29.


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