Raised This Month: $ Target: $400
 0% 

Array


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 05-26-2021 , 06:44   Re: Array
Reply With Quote #4

Quote:
Originally Posted by MacL View Post
Is there another way?
Create a global variable and save my_vib then use it on somearray when needed
PHP Code:
new g_vib

...

g_vib my_vib //Save your vib
switch(my_vib)
{
    case 
1:
    { 
        
somearray[0]
    }
    case 
2:
    {
        
somearray[1]
    }
    case 
3:
    {
        
somearray[2]
    }


...

client_print(idprint_chat"hi %s"somearray[g_vib]); 
Or there is dumber way is using for loop then comparing the string inside.
Once found the correct one then break the loop.
__________________
My plugin:

Last edited by Celena Luna; 05-26-2021 at 06:46.
Celena Luna 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