Code looks ok, but if the gags are occurring in the current map then nvault utility will not have the latest/real-time data until map change. To address this you can try closing the vault and re-opening it before executing your code. Should also store get_systime() in a variable instead of calling it multiple times.
PHP Code:
nvault_close( g_iNVaultHandle );
g_iNVaultHandle = nvault_open( "GagVault" );
new iNVaultUtilHandle = nvault_util_open("GagVault");
new iPos, iTimeStamp, szAuthID[34], iEntryCount = nvault_util_count(iNVaultUtilHandle);
new iSysTime = get_systime();
for(new i = 0; i < iEntryCount; i++)
{
iPos = nvault_util_read(iNVaultUtilHandle, iPos, szAuthID, charsmax(szAuthID), "", 0, iTimeStamp);
if ( iSysTime >= iTimeStamp )
{
client_print(0, print_chat, "TRUE %s", szAuthID);
nvault_remove(g_iNVaultHandle, szAuthID);
new iTarget = find_player("c", szAuthID);
if ( iTarget )
{
g_bIsGagged[iTarget] = false;
}
}
}
nvault_util_close(iNVaultUtilHandle);
__________________