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

[ANY] AFK Manager (Version 4.3.0 / Updated July 2nd 2018)


Post New Thread Reply   
 
Thread Tools Display Modes
St00ne
Veteran Member
Join Date: Jan 2011
Location: Annecy - France
Old 09-15-2019 , 09:10   Re: [ANY] AFK Manager (Version 4.3.0 / Updated July 2nd 2018)
Reply With Quote #2001

Hi,
Great plugin, thx. I found out 2 errors:

1: Can't compile cuz it says

Code:
//SourceMod Batch Compiler
// by the SourceMod Dev Team


//// afk_manager4.sp
//
// C:\Users\Bast\Downloads\last dls\csgosl-windows\csgosl\server\csgo\addons\sourcemod\scripting\afk_manager4.sp(904) : error 180: function return type differs from prototype. expected 'void', but got 'int'
//
// 1 Error.
//
// Compilation Time: 0,98 sec
// ----------------------------------------

Press enter to exit ...
So ofc I changed the public int Updater_OnPluginUpdated() to public void Updater_OnPluginUpdated() and it worked.

*** EDIT: I had an old version of updater.inc. ***

2: Then, before I made the changes above, I had this error when a AFK player who did not choose a team, was forced to join a team by the game, and THEN moved to spec (meaning the player actually did not do anything after connecting).

Code:
L 09/15/2019 - 14:07:02: SourceMod error session started
L 09/15/2019 - 14:07:02: Info (map "surf_ace") (file "errors_20190915.log")
L 09/15/2019 - 14:07:02: [SM] Exception reported: Script execution timed out
L 09/15/2019 - 14:07:02: [SM] Blaming: afk_manager4.smx
L 09/15/2019 - 14:07:02: [SM] Call stack trace:
L 09/15/2019 - 14:07:02: [SM]   [0] ForcePlayerSuicide
L 09/15/2019 - 14:07:02: [SM]   [1] Line 2365, /home/forums/content/files/3/2/0/9/1/170330.attach::MoveAFKClient
L 09/15/2019 - 14:07:02: [SM]   [2] Line 2204, /home/forums/content/files/3/2/0/9/1/170330.attach::Timer_CheckPlayer
L 09/15/2019 - 14:25:32: Error log file session closed.
By luck I could check the console when it happened, and I noticed that the client had the "No user logon" error:
Code:
PutClientInServer: no info_player_start on level
L 09/15/2019 - 14:02:53: "S¤ü╬▒ÐÅÐé╬╣╬▒Ðé╬Á<148><STEAM_1:0:123456789><>" entered the game
L 09/15/2019 - 14:03:25: "S¤ü╬▒ÐÅÐé╬╣╬▒Ðé╬Á<148><STEAM_1:0:123456789>" switched from team <Unassigned> to <TERRORIST>
L 09/15/2019 - 14:04:55: [afk_manager4.smx] S¤ü╬▒ÐÅÐé╬╣╬▒Ðé╬Á<148><STEAM_1:0:161302819><> was moved to spectate for being AFK too long.
L 09/15/2019 - 14:07:02: [SM] Exception reported: Script execution timed out
L 09/15/2019 - 14:07:02: [SM] Blaming: afk_manager4.smx
L 09/15/2019 - 14:07:02: [SM] Call stack trace:
L 09/15/2019 - 14:07:02: [SM]   [0] ForcePlayerSuicide
L 09/15/2019 - 14:07:02: [SM]   [1] Line 2365, /home/forums/content/files/3/2/0/9/1/170330.attach::MoveAFKClient
L 09/15/2019 - 14:07:02: [SM]   [2] Line 2204, /home/forums/content/files/3/2/0/9/1/170330.attach::Timer_CheckPlayer
L 09/15/2019 - 14:07:02: "S¤ü╬▒ÐÅÐé╬╣╬▒Ðé╬Á<148><STEAM_1:0:123456789><TERRORIST>" [-4400 -512 3972] committed suicide with "world"
L 09/15/2019 - 14:07:02: "S¤ü╬▒ÐÅÐé╬╣╬▒Ðé╬Á<148><STEAM_1:0:123456789>" switched from team <TERRORIST> to <Spectator>
STEAMAUTH: Client S¤ü╬▒ÐÅÐé╬╣╬▒Ðé╬Á received failure code 6
L 09/15/2019 - 14:07:02: STEAMAUTH: Client S¤ü╬▒ÐÅÐé╬╣╬▒Ðé╬Á received failure code 6
L 09/15/2019 - 14:07:02: "S¤ü╬▒ÐÅÐé╬╣╬▒Ðé╬Á<148><STEAM_1:0:123456789><Spectator>" disconnected (reason "No user logon")
L 09/15/2019 - 14:07:03: "S¤ü╬▒ÐÅÐé╬╣╬▒Ðé╬Á<148><STEAM_1:0:123456789>" switched from team <Spectator> to <Unassigned>
Dropped S¤ü╬▒ÐÅÐé╬╣╬▒Ðé╬Á from server: No user logon
I supposed it was a problem with the ForcePlayerSuicide function like the error log says, but indeed, after looking at the code, everything was normal there.
So I looked at the rest and noticed that all the hooks were default or post hooks, which means they should NOT return a value, see here: https://wiki.alliedmods.net/Events_(SourceMod_Scripting)

So I changed the 'public Action' on Post Hooks to 'public void', removed the return values in them, and after my first test, I don't have the error anymore.
But anyway this error might have been due to the No user logon situation.

Cheers,
St00ne
__________________

*** *** ***
-My plugins-

Last edited by St00ne; 09-19-2019 at 09:44.
St00ne is offline
Rothgar
Veteran Member
Join Date: Nov 2007
Old 09-19-2019 , 08:20   Re: [ANY] AFK Manager (Version 4.3.0 / Updated July 2nd 2018)
Reply With Quote #2002

Yeah thanks that looks right from reading the updater plugin again, I'll update the AFK Manager with that fix thanks.

I have never seen that Suicide error though, not sure how that happened, let me know if it happens again.

EDIT:

I actually cannot replicate that error at all when I try to compile using the regular updater.inc and changing to void I get:

afk_manager4.sp(904) : error 180: function return type differs from prototype. expected 'int', but got 'void'

Where did you get your updater.inc from? It doesn't seem like the stock one from https://forums.alliedmods.net/showthread.php?t=169095 ?

Last edited by Rothgar; 09-19-2019 at 08:38.
Rothgar is offline
Send a message via ICQ to Rothgar Send a message via AIM to Rothgar Send a message via MSN to Rothgar
St00ne
Veteran Member
Join Date: Jan 2011
Location: Annecy - France
Old 09-19-2019 , 09:43   Re: [ANY] AFK Manager (Version 4.3.0 / Updated July 2nd 2018)
Reply With Quote #2003

Right, I have a very old version of updater.inc (2017), thanks for pointing this out to me!
Sry
__________________

*** *** ***
-My plugins-
St00ne is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 09-20-2019 , 06:28   Re: [ANY] AFK Manager (Version 4.3.0 / Updated July 2nd 2018)
Reply With Quote #2004

I have reasons to believe that in CS:GO, this plugin is capable of making AFK spectators solid entities, which breaks the entire game. Do you think CS:GO should use CS_SwitchTeam instead of ChangeClientTeam?
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
Bara
AlliedModders Donor
Join Date: Apr 2012
Location: Germany
Old 09-20-2019 , 09:28   Re: [ANY] AFK Manager (Version 4.3.0 / Updated July 2nd 2018)
Reply With Quote #2005

Quote:
Originally Posted by eyal282 View Post
I have reasons to believe that in CS:GO, this plugin is capable of making AFK spectators solid entities, which breaks the entire game. Do you think CS:GO should use CS_SwitchTeam instead of ChangeClientTeam?
You should probably check your (custom) plugins first. I can't noticed any effects like this.
__________________
Discord (Bara#5006) | My Plugins (GitHub)
You like my work? Support is not a crime.
Bara is offline
scoty
Member
Join Date: Nov 2015
Old 12-08-2019 , 20:01   Re: [ANY] AFK Manager (Version 4.3.0 / Updated July 2nd 2018)
Reply With Quote #2006

Dead players are getting moved to spec for being afk and they are not, where the problem guys
scoty is offline
ayrton09_arg
Senior Member
Join Date: Nov 2017
Old 12-09-2019 , 03:03   Re: [ANY] AFK Manager (Version 4.3.0 / Updated July 2nd 2018)
Reply With Quote #2007

Quote:
Originally Posted by scoty View Post
Dead players are getting moved to spec for being afk and they are not, where the problem guys

sm_afk_exclude_dead "1"
ayrton09_arg is offline
flashing
Senior Member
Join Date: Jul 2019
Location: India
Old 01-05-2020 , 09:01   Re: [ANY] AFK Manager (Version 4.3.0 / Updated July 2nd 2018)
Reply With Quote #2008

how can i change the chat prefix of this plugin
like from [AFK Manager] to something else
flashing is offline
Rothgar
Veteran Member
Join Date: Nov 2007
Old 01-28-2020 , 05:22   Re: [ANY] AFK Manager (Version 4.3.0 / Updated July 2nd 2018)
Reply With Quote #2009

Quote:
Originally Posted by flashing View Post
how can i change the chat prefix of this plugin
like from [AFK Manager] to something else
You can shorten it using sm_afk_prefix_short ?
Rothgar is offline
Send a message via ICQ to Rothgar Send a message via AIM to Rothgar Send a message via MSN to Rothgar
paulo_crash
AlliedModders Donor
Join Date: May 2016
Location: Brazil
Old 02-03-2020 , 21:27   Re: [ANY] AFK Manager (Version 4.3.0 / Updated July 2nd 2018)
Reply With Quote #2010

@Rothgar, Can you help me with this doubt? How can I make the plugin kick all AFK players, but players with privileges will be moved to SPECS?

I tried to leave the CVARS like this:
Code:
sm_afk_admins_flag "b"
sm_afk_admins_immune "2"
However, all players are being moved to SPECS, even though some have no privileges. What can I be doing wrong?

The complete configuration I use on the server is attached.

Last edited by paulo_crash; 06-03-2020 at 13:38.
paulo_crash is offline
Reply


Thread Tools
Display Modes

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 06:09.


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