Quote:
Originally Posted by MacL
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(id, print_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.
__________________