Raised This Month: $32 Target: $400
 8% 

SourceMod Equivalent of parse


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eyal282
Veteran Member
Join Date: Aug 2011
Old 05-06-2018 , 15:54   SourceMod Equivalent of parse
Reply With Quote #1

Is there a way to immitate AmxModX's ability to parse a string by arguments?
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334

Last edited by eyal282; 05-06-2018 at 15:55.
eyal282 is offline
xines
Veteran Member
Join Date: Aug 2013
Location: Denmark
Old 05-06-2018 , 16:01   Re: SourceMod Equivalent of parse
Reply With Quote #2

Code:
GetCmdArg
- Retrieves a command argument given its index, from the current console or server command.
https://sm.alliedmods.net/new-api/console/GetCmdArg

GetCmdArgs
- Returns the number of arguments from the current console or server command.
https://sm.alliedmods.net/new-api/console/GetCmdArgs

GetCmdArgString
- Retrieves the entire command argument string in one lump from the current console or server command.
https://sm.alliedmods.net/new-api/co...etCmdArgString
__________________
xines is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 05-06-2018 , 16:14   Re: SourceMod Equivalent of parse
Reply With Quote #3

You can loop https://sm.alliedmods.net/new-api/string/BreakString
__________________
Peace-Maker is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 05-06-2018 , 16:35   Re: SourceMod Equivalent of parse
Reply With Quote #4

Quote:
Originally Posted by Peace-Maker View Post
How do I immitate "..." in a stock? I want infinite possible instances of parse.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 05-06-2018 , 18:12   Re: SourceMod Equivalent of parse
Reply With Quote #5

Quote:
Originally Posted by eyal282 View Post
How do I immitate "..." in a stock? I want infinite possible instances of parse.
https://forums.alliedmods.net/showthread.php?t=300303
__________________
retired
shavit is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 05-06-2018 , 20:05   Re: SourceMod Equivalent of parse
Reply With Quote #6

Quote:
Originally Posted by shavit View Post
I would not use this if you're not comfortable with the possibility of it breaking suddenly. It definitely does work at the moment, but does not rely on functionality we intentionally provide.
Fyren is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 05-06-2018 , 23:14   Re: SourceMod Equivalent of parse
Reply With Quote #7

Quote:
Originally Posted by eyal282 View Post
How do I immitate "..." in a stock? I want infinite possible instances of parse.
Push the strings to an ArrayList or a DataPack, then pass the handle?
__________________
ddhoward 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 16:25.


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