Raised This Month: $32 Target: $400
 8% 

AMXX Gag v1.4.9 - Menu, Reconnect support


Post New Thread Reply   
 
Thread Tools Display Modes
nomi1492
New Member
Join Date: Sep 2020
Old 09-04-2020 , 09:06   Re: AMXX Gag v1.4.9 - Menu, Reconnect support
Reply With Quote #421

bro where to add the plugin in which folder?
nomi1492 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-04-2020 , 22:46   Re: AMXX Gag v1.4.9 - Menu, Reconnect support
Reply With Quote #422

Quote:
Originally Posted by nomi1492 View Post
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.
__________________
fysiks is offline
Rirre
Veteran Member
Join Date: Nov 2006
Old 08-05-2022 , 08:20   Re: AMXX Gag v1.4.9 - Menu, Reconnect support
Reply With Quote #423

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.

Last edited by Rirre; 08-07-2022 at 05:06.
Rirre is offline
kooomax
Member
Join Date: Jan 2018
Old 03-11-2024 , 10:44   Re: AMXX Gag v1.4.9 - Menu, Reconnect support
Reply With Quote #424

Quote:
Originally Posted by Rirre View Post
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?
kooomax is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:06.


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