Thread: [Solved] How use split_string?
View Single Post
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 03-24-2020 , 22:02   Re: How use split_string?
Reply With Quote #7

Quote:
Originally Posted by Bugsy View Post
Yea, to make this work you'd need to format it like "255,255,255,"
PHP Code:
new szRGBString[] = "251,252,253,";
new 
szRGB][ ];
new 
iPos;
    
while ( 
iPos sizeofszRGB ) )
{
    
+= split_stringszRGBString] , "," szRGBiPos++ ] , charsmaxszRGB[] ) );
}
    
server_print"%s %s %s" ,szRGB] , szRGB] , szRGB] ); 
oh wait..
last comma required?

0,0,255 => output:0 0 0(N/A)
0,0,255,=> output:0 0 255 yeah?!

Well, I'll try it when I get home.
__________________
GitHub
SteamWishlist

六四天安門事件
+ARUKARI- is offline