Raised This Month: $12 Target: $400
 3% 

amxclient_cmd | more than 2 params


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PTE
Junior Member
Join Date: Aug 2018
Location: localhost
Old 01-04-2019 , 04:29   amxclient_cmd | more than 2 params
Reply With Quote #1

How to pass more than 2 params in amxclient_cmd? I tried to pass more than 1 param in arg1 and arg2 and both weren't working fine with read_argv(_*), it can read only 2 params.

I only wanna know if there's any way to force user execute amxmodx command with 3+ params(currently I need 4) without client_cmd, or should I parse params by myself(with strtok e.g.)?
PTE is offline
thEsp
BANNED
Join Date: Aug 2017
Old 01-04-2019 , 13:18   Re: amxclient_cmd | more than 2 params
Reply With Quote #2

http://amxxmodx.ru/core/amxmodxinc/8...tdelnosti.html
thEsp is offline
E1_531G
Senior Member
Join Date: Dec 2017
Old 01-04-2019 , 15:53   Re: amxclient_cmd | more than 2 params
Reply With Quote #3

I would say no.
amxclient_cmd() and endclient_cmd() have the same syntax.
This means, the same usage: *client_cmd( id, "drop", "weapon_c4" )
So, only cmd and/with 2 args.
https://github.com/alliedmodders/amx...modx.cpp#L2757
https://github.com/alliedmodders/amx...modx.cpp#L2701
__________________
My English is A0

Last edited by E1_531G; 01-04-2019 at 15:54.
E1_531G is offline
PTE
Junior Member
Join Date: Aug 2018
Location: localhost
Old 01-04-2019 , 18:20   Re: amxclient_cmd | more than 2 params
Reply With Quote #4

So it mean I am only able to use client_cmd (to format cmd and params) or use read_args (to read all the params in one string and parse it on my own)?

Last edited by PTE; 01-04-2019 at 18:21.
PTE is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-04-2019 , 20:51   Re: amxclient_cmd | more than 2 params
Reply With Quote #5

If what you say is true then it looks like you would need to submit a feature request to make it so that it can do a variable number of arguments (hopefully it will make it into AMX Mod X 1.10.0). I was the one who originally requested amxclient_cmd() and I guess I never thought about it needing to support more than what engclient_cmd() does probably because I've only ever used engclient_cmd() with a single argument IIRC.

Hopefully a variable number of arguments is possible because it's a good idea.
__________________

Last edited by fysiks; 01-04-2019 at 20:54.
fysiks is offline
PTE
Junior Member
Join Date: Aug 2018
Location: localhost
Old 01-05-2019 , 08:37   Re: amxclient_cmd | more than 2 params
Reply With Quote #6

How do I submit the request?(Sorry for kinda stupid question)
PTE is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-05-2019 , 17:22   Re: amxclient_cmd | more than 2 params
Reply With Quote #7

You can create an issue here: https://github.com/alliedmodders/amxmodx/issues (this will need an account)
__________________

Last edited by Arkshine; 01-05-2019 at 17:22.
Arkshine 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 10:14.


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