AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved About cvar / parse (https://forums.alliedmods.net/showthread.php?t=309189)

wilianmaique 07-16-2018 17:00

About cvar / parse
 
Guys, I wanted to know how to block the following maps that are in a cvar, using loop.

Ex: my_cvar "aim_ fy_ cs_ de_"

How do I loop to block maps that have these tags using parse or something else?


sorry for my bad english.

OciXCrom 07-16-2018 17:16

Re: About cvar / parse
 
Block what?

wilianmaique 07-16-2018 18:29

Re: About cvar / parse
 
I want to check if the map that is in the cvar is equal to the initials of fy_, _aim ....
will perform X function


sorry for my bad english.

edon1337 07-16-2018 19:26

Re: About cvar / parse
 
But, you can't add multiple words in a single cvar, can you?

wilianmaique 07-16-2018 20:19

Re: About cvar / parse
 
Quote:

Originally Posted by edon1337 (Post 2604106)
But, you can't add multiple words in a single cvar, can you?

Can use with spaces, I believe that the verification method would be with PARSE, but I do not know how to proceed.

OciXCrom 07-16-2018 20:44

Re: About cvar / parse
 
You can use a while() loop and inside it extract the values using strtok().

wilianmaique 07-16-2018 22:45

Re: About cvar / parse
 
Ok, thanks for reply.


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

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