Raised This Month: $ Target: $400
 0% 

Array


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
MacL
Member
Join Date: May 2021
Old 05-26-2021 , 02:02   Array
Reply With Quote #1

how can i get array number? like:
PHP Code:
new somearray[][]={
"im 0",
"im 1",
"im 2"

And for example, we create a switch elsewhere in the plugin. like:
PHP Code:
 switch(my_vib)
         {
                case 
1:
                { 
                            
somearray[0]
                }
                case 
2:
                {
                            
somearray[1]
                }
                case 
3:
                {
                            
somearray[2]
                }
         } 
so now we need to get array number. how? like:
PHP Code:
 client_print(idprint_chat"hi %s"somearray[getnumber]); 

Last edited by MacL; 05-27-2021 at 04:44.
MacL is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:00.


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