Quote:
Originally Posted by Spirit_12
Can you show me an example with multiple text values?
|
Not sure if that's what you're asking, nor if that's a good way to go.
PHP Code:
enum Values
{
bool:bValue,
String:sValue1[32]
String:sValue2[32]
String:sValue3[32]
}
any g_aValues[MAXPLAYERS + 1][Values];
void myfunction(int client)
{
g_aValues[client][bValue] = true;
strcopy(g_aValues[client][sValue1], 32, "Value1");
strcopy(g_aValues[client][sValue2], 32, "Value2");
strcopy(g_aValues[client][sValue3], 32, "Value3");
}
or
PHP Code:
enum Strings
{
String:sValue1[32],
String:sValue2[32],
String:sValue3[32]
}
enum Values
{
bool:bValue,
aStrings[Strings]
}
any g_aValues[MAXPLAYERS + 1][Values];
void myfunction(int client)
{
g_aValues[client][bValue] = true;
strcopy(g_aValues[client][aStrings][sValue1], 32, "Value1");
strcopy(g_aValues[client][aStrings][sValue2], 32, "Value2");
strcopy(g_aValues[client][aStrings][sValue3], 32, "Value3");
}
__________________