Storing Console Cmds in Variable
Is there a way to store a command entered on the console, store that command into a string variable and do stuff with it? Like compare it with other string or forcing it to be executed again? Last time I checked, if I remember correctly, PAWN doesn't handle strings...
|
Re: [HELP] Storing Console Cmds in Variable
Sure it does.
Describe what you are trying to do exatcly. |
Re: [HELP] Storing Console Cmds in Variable
Quote:
|
Re: [HELP] Storing Console Cmds in Variable
Then save the command in a string when it's executed, lol.
|
Re: [HELP] Storing Console Cmds in Variable
Quote:
http://amxmodx.org/doc/index.html?pa...g%2Fprimer.htm Last time I attempted this plugin I was having problems with a mismatched data type or something. I'll give it a go at it first and see what I come up with... |
Re: [HELP] Storing Console Cmds in Variable
Ok, I really don't know how to retrieve the concmd for use. I dabbled with the get_concmd but it seems I'm in the wrong track, or maybe not using it correctly. The thing's got sooooo many parameters...
|
Re: [HELP] Storing Console Cmds in Variable
Lol, lol, lol.
You are registering the commands, right? Then you know what command is called. Simply use copy(string, charsmax(string), "cmd_name") in the corresponding public. |
Re: [HELP] Storing Console Cmds in Variable
I uh, I know may sound stupid but I can't get it to work. Here's what I have:
PHP Code:
Sorry, I'm really trying not to turn this into a spoon-feeding session but I find I work best thru examples and so far I can't find a code where this is done... |
Re: [HELP] Storing Console Cmds in Variable
Ah, it's like that, I was thinking you have different publics for each command.
Then, probably your best bet is using client_command forward since it pass command name. |
Re: [HELP] Storing Console Cmds in Variable
Quote:
Sooooo, I should register a forward, like this? PHP Code:
|
| All times are GMT -4. The time now is 18:34. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.