String to array
Hello!
Very simple question, how can I make from String array? String looks like this weapons = "weapon_awp;weapon_smokegrenade;weapon_deagle " I want after some kind of function to make it look like this weapon[0] is weapon_awp weapon[1] is weapon_smokegrenade weapon[2] is weapon_deagle And is it possible to count, how many weapons are in array? Thanks alot! |
Re: String to array
I think this works; not totally sure though.
PHP Code:
|
Re: String to array
ExplodeString is what you're looking for, I think
|
Re: String to array
If this is hard-coded, you want Darkness_'s post.
If it is coming from user input (like a convar), look at ExplodeString. |
Re: String to array
Thanks!
Thats what I was searching for - ExplodeString! :) |
All times are GMT -4. The time now is 05:13. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.