Raised This Month: $ Target: $400
 0% 

Using chat to fill in the blanks in a command?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Stealth Penguin
Junior Member
Join Date: Jan 2005
Old 06-24-2006 , 15:37   Using chat to fill in the blanks in a command?
Reply With Quote #1

I'm trying to make a menu plugin for a group of servers I play on. I know how to make basic menus and sub-menus, but I'm having trouble with one type of thing in particular...

I want to be able to select from a list of a couple options on one menu, which would read like this (minus the _'s):
__________
Menu Title

1. Psay
2. Execclient
3. Slay and send message

0. Exit
__________


Selecting option 0 would close the menu, but selecting options 1, 2, and 3 would bring up a new menu consisiting of the players on the server which would look something like this (minus the _'s) if there were 14 people on the server:
__________
Players 1/2

1. Bobby
2. Timmy
3. Jimmy
4. Tommy
5. Beepy
6. Tweety
7. Zippy
8. Mister Egg

9. More
0. Exit
__________


The hard part is that I'd like to be able to select one of those names and have it bring up a chat prompt (like when you use say or team say) so you don't have to open the console or add the players name before the message or command you want run on them. I need to be able to input something into that box which then would be added to the end of an amx_psay command or an execclient command as the message/command to be executed on the player of choice.

An example of what I'd like to be able to do:
_____________
1) Admin Bob presses 1

2) Admin Bob presses 5

3) Admin Bob types into message prompt (without the <>): <Hello, how are you doing?> and presses return

4) Admin Bob's client acts as though he has typed into his console (without the <>): <amx_psay Beepy "Hello, how are you doing?">

5) Beepy gets a private message from Admin Bob which reads (without the <>): <Hello, how are you doing?>
_____________

So basically what it comes down to is that I'd like to know how to make something like this:

First Menu choice equals variable x
Second Menu Choice equals variable y
What gets typed into the command prompt equals variable z

all of this should end up being the same as though you'd typed into the console (minus the <>): <"x" "y" "z">.


Thank you for reading the lengthly post.
~Fin~
Stealth Penguin is offline
Send a message via ICQ to Stealth Penguin Send a message via AIM to Stealth Penguin Send a message via Yahoo to Stealth Penguin
 



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 08:07.


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