AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   SourceMod Equivalent of parse (https://forums.alliedmods.net/showthread.php?t=307356)

eyal282 05-06-2018 15:54

SourceMod Equivalent of parse
 
Is there a way to immitate AmxModX's ability to parse a string by arguments?

xines 05-06-2018 16:01

Re: SourceMod Equivalent of parse
 
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


Peace-Maker 05-06-2018 16:14

Re: SourceMod Equivalent of parse
 
You can loop https://sm.alliedmods.net/new-api/string/BreakString

eyal282 05-06-2018 16:35

Re: SourceMod Equivalent of parse
 
Quote:

Originally Posted by Peace-Maker (Post 2590999)

How do I immitate "..." in a stock? I want infinite possible instances of parse.

shavit 05-06-2018 18:12

Re: SourceMod Equivalent of parse
 
Quote:

Originally Posted by eyal282 (Post 2591003)
How do I immitate "..." in a stock? I want infinite possible instances of parse.

https://forums.alliedmods.net/showthread.php?t=300303

Fyren 05-06-2018 20:05

Re: SourceMod Equivalent of parse
 
Quote:

Originally Posted by shavit (Post 2591012)

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.

ddhoward 05-06-2018 23:14

Re: SourceMod Equivalent of parse
 
Quote:

Originally Posted by eyal282 (Post 2591003)
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?


All times are GMT -4. The time now is 06:13.

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