AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   AMXX Gag v1.4.9 - Menu, Reconnect support (https://forums.alliedmods.net/showthread.php?t=101937)

nomi1492 09-04-2020 09:06

Re: AMXX Gag v1.4.9 - Menu, Reconnect support
 
bro where to add the plugin in which folder?

fysiks 09-04-2020 22:46

Re: AMXX Gag v1.4.9 - Menu, Reconnect support
 
Quote:

Originally Posted by nomi1492 (Post 2716600)
bro where to add the plugin in which folder?

Follow the basic instructions for installing plugins found here. If a plugin has special requirements for installation, they should be documented in the first post.

Rirre 08-05-2022 08:20

Re: AMXX Gag v1.4.9 - Menu, Reconnect support
 
It works fine by saving by file, but SQL, strtotime() formats the time incorrectly. iTimeLeft value is a lot higher on map change (leading to much longer time for gagged players to be ungagged on map changes).

Code:
new szDateGagged[DATE_SIZE]; while( SQL_MoreResults(hQuery) ) {     SQL_ReadResult( hQuery, iFieldSteamID, data[GAG_STEAMID], charsmax(data[GAG_STEAMID]) );     SQL_ReadResult( hQuery, iFieldDateGagged, szDateGagged, charsmax(szDateGagged) );     data[GAG_TIME] = SQL_ReadResult( hQuery, iFieldGagTime );     SQL_ReadResult( hQuery, iFieldGagFlags, szFlags, charsmax(szFlags) );     data[GAG_START] = strtotime( szDateGagged );     data[GAG_FLAGS] = read_flags( szFlags );     if( data[GAG_TIME] > 0 )     {         iTimeLeft = data[GAG_START] + data[GAG_TIME] - iSystime;         server_print("-- DEBUG: SteamID: %s | Date gagged: %s | length: %i", data[GAG_STEAMID], szDateGagged, iTimeLeft);                 if( iShortestTime > iTimeLeft )         {             iShortestTime = iTimeLeft;         }     }     ArrayPushArray( g_aGagData, data );     TrieSetCell( g_tArrayPos, data[GAG_STEAMID], g_iGagged );     g_iGagged++;     SQL_NextRow( hQuery ); } if( iShortestTime < 999999 ) {     entity_set_float( g_iThinker, EV_FL_nextthink, get_gametime() + iShortestTime );     server_print("-- DEBUG: Shortest time: %i", iShortestTime ); }
Code:

] say test
[AMXX GAG] 55 seconds left before your ungag!
] rcon changelevel stadium4
* Privileges set

Sven Co-op 5.25
Server Engine: 5.0.1.7 (build 8948)
Server Number: 193

- Rirre has joined the game.
Rirre has joined the game.
] say test
[AMXX GAG] 2 hours and 40 seconds left before your ungag!

EDIT: Found out it is timezone related as the SQL server is +2 hours.

kooomax 03-11-2024 10:44

Re: AMXX Gag v1.4.9 - Menu, Reconnect support
 
Quote:

Originally Posted by Rirre (Post 2785631)
It works fine by saving by file, but SQL, strtotime() formats the time incorrectly. iTimeLeft value is a lot higher on map change (leading to much longer time for gagged players to be ungagged on map changes).

Code:
new szDateGagged[DATE_SIZE]; while( SQL_MoreResults(hQuery) ) {     SQL_ReadResult( hQuery, iFieldSteamID, data[GAG_STEAMID], charsmax(data[GAG_STEAMID]) );     SQL_ReadResult( hQuery, iFieldDateGagged, szDateGagged, charsmax(szDateGagged) );     data[GAG_TIME] = SQL_ReadResult( hQuery, iFieldGagTime );     SQL_ReadResult( hQuery, iFieldGagFlags, szFlags, charsmax(szFlags) );     data[GAG_START] = strtotime( szDateGagged );     data[GAG_FLAGS] = read_flags( szFlags );     if( data[GAG_TIME] > 0 )     {         iTimeLeft = data[GAG_START] + data[GAG_TIME] - iSystime;         server_print("-- DEBUG: SteamID: %s | Date gagged: %s | length: %i", data[GAG_STEAMID], szDateGagged, iTimeLeft);                 if( iShortestTime > iTimeLeft )         {             iShortestTime = iTimeLeft;         }     }     ArrayPushArray( g_aGagData, data );     TrieSetCell( g_tArrayPos, data[GAG_STEAMID], g_iGagged );     g_iGagged++;     SQL_NextRow( hQuery ); } if( iShortestTime < 999999 ) {     entity_set_float( g_iThinker, EV_FL_nextthink, get_gametime() + iShortestTime );     server_print("-- DEBUG: Shortest time: %i", iShortestTime ); }
Code:

] say test
[AMXX GAG] 55 seconds left before your ungag!
] rcon changelevel stadium4
* Privileges set

Sven Co-op 5.25
Server Engine: 5.0.1.7 (build 8948)
Server Number: 193

- Rirre has joined the game.
Rirre has joined the game.
] say test
[AMXX GAG] 2 hours and 40 seconds left before your ungag!

EDIT: Found out it is timezone related as the SQL server is +2 hours.

okay how to fix this?


All times are GMT -4. The time now is 01:37.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.