But I need players to have multiple binds (i.e. Multiple strings) in the id-specific array. Here's my loading function...
PHP Code:
public load_binds(id)
{
id -= TASK_ID_BINDS;
new szData[256], szKey[64];
formatex(szKey, 63, "%sSETTINGS", g_szAuthID[id]);
// Load bind settings
if( nvault_get(g_BindVault, szKey, szData, 255) )
{
new szSettings[2][2];
parse(szData, szSettings[0], 1, szSettings[1], 1);
g_iSettings[0][id] = str_to_num(szSettings[0]);
g_iSettings[1][id] = str_to_num(szSettings[1]);
}
get_pcvar_num(p_BindMulti) ?
formatex(szKey, 63, "%s%s", g_szAuthID[id], g_szBindMode) : formatex(szKey, 63, "%sBINDS", g_szAuthID[id]);
// Load specific bind configuration
if( nvault_get(g_BindVault, szKey, szData, 255) )
{
new szLeft[16], temp;
temp = ArraySize(g_iPlayerBind[id]);
while( contain(szData, "#") != -1 && temp < g_MaxBinds )
{
strtok(szData, szLeft, 15, szData, 255, '#', 1);
ArrayPushString(g_iPlayerBind[id], szLeft);
temp++;
}
// Make sure that the array is fully initialised
for(new i = temp; temp < g_MaxBinds; i++)
{
ArrayPushString(g_iPlayerBind[id], "");
}
}
// Check if autobind is on
if( g_iSettings[0][id] )
set_binds(id);
}
So if I'm reading yours correctly, each player can only have one string?