Try this? Just change the old stock in your code with this one
PHP Code:
stock InsertInfo(id)
{
// Scan to see if this entry is the last entry in the list
// If it is, then update the name and access
// If it is not, then insert it again.
if (g_Size > 0)
{
new ip[32]
new auth[32];
get_user_authid(id, auth, charsmax(auth));
get_user_ip(id, ip, charsmax(ip), 1/*no port*/);
new last = 0;
if (g_Size < sizeof(g_SteamIDs))
{
last = g_Size - 1;
}
else
{
last = g_Tracker - 1;
if (last < 0)
{
last = g_Size - 1;
}
}
if (equal(auth, g_SteamIDs[last]) && equal(ip, g_IPs[last])) // need to check ip too, or all the nosteams will while it doesn't work with their illegitimate server
{
get_user_name(id, g_Names[last], charsmax(g_Names[]));
g_Access[last] = get_user_flags(id);
return;
}
}
// Need to insert the entry
new target = 0; // the slot to save the info at
// Queue is not yet full
if (g_Size < sizeof(g_SteamIDs))
{
target = g_Size;
++g_Size;
}
else
{
target = g_Tracker;
++g_Tracker;
// If we reached the end of the array, then move to the front
if (g_Tracker == sizeof(g_SteamIDs))
{
g_Tracker = 0;
}
}
get_user_authid(id, g_SteamIDs[target], charsmax(g_SteamIDs[]));
get_user_name(id, g_Names[target], charsmax(g_Names[]));
if(access(id, ADMIN_RCON))
formatex(g_IPs[target], charsmax(g_IPs[]), "[HIDDEN]")
else
get_user_ip(id, g_IPs[target], charsmax(g_IPs[]), 1/*no port*/);
g_Access[target] = get_user_flags(id);
}