Multidimensional Array
#7

Hey sorry for the delay, you had the solution yet I wanted to suggest
PHP код:
static const Msgs[][50] = 
{
    {
"Together forever!"},
    {
"Long live!"},
    {
"Test Server"},
    {
"It's a great day!"}
};
main(){ 
    for(new 
04++){
        if(
strfind(Msgs[x], "Long"true) != -1){ // Looking for Long Live! string, edit this line how you look for it
            
printf("String found: %s"Msgs[x]); // printing the found string for debugging purposes
            
switch(x) {
                case 
0printf("CASE 1 : %s"Msgs[x]); // Together Forever! Won't be found
                
case 1printf("CASE 2 : %s"Msgs[x]); // <-- Long Live! Will be found.
                
case 2printf("CASE 3 : %s"Msgs[x]); // Test Server Won't be found
                
case 3printf("CASE 4 : %s"Msgs[x]); // It's a great day! Won't be found
                // Instead of printing the strings, use TextDrawSetString on the desired textdraw
            
}
        }
    }
    return 
1;    
}  
[
15:26:16String foundLong live!
[
15:26:16] CASE Long live
In case you were looking for something plainer
Reply


Messages In This Thread
Multidimensional Array - by NealPeteros - 14.09.2018, 10:59
Re: Multidimensional Array - by v1k1nG - 14.09.2018, 11:00
Re: Multidimensional Array - by NealPeteros - 14.09.2018, 11:17
Re: Multidimensional Array - by Shinja - 14.09.2018, 11:19
Re: Multidimensional Array - by AmirSavand - 14.09.2018, 12:02
Re: Multidimensional Array - by NealPeteros - 14.09.2018, 12:54
Re: Multidimensional Array - by v1k1nG - 14.09.2018, 13:35

Forum Jump:


Users browsing this thread: 4 Guest(s)