AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] AFK Manager (Version 4.3.0 / Updated July 2nd 2018) (https://forums.alliedmods.net/showthread.php?t=79904)

St00ne 09-15-2019 09:10

Re: [ANY] AFK Manager (Version 4.3.0 / Updated July 2nd 2018)
 
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

Rothgar 09-19-2019 08:20

Re: [ANY] AFK Manager (Version 4.3.0 / Updated July 2nd 2018)
 
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 ?

St00ne 09-19-2019 09:43

Re: [ANY] AFK Manager (Version 4.3.0 / Updated July 2nd 2018)
 
Right, I have a very old version of updater.inc (2017), thanks for pointing this out to me!
Sry :bacon!:

eyal282 09-20-2019 06:28

Re: [ANY] AFK Manager (Version 4.3.0 / Updated July 2nd 2018)
 
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?

Bara 09-20-2019 09:28

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

Originally Posted by eyal282 (Post 2667668)
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.

scoty 12-08-2019 20:01

Re: [ANY] AFK Manager (Version 4.3.0 / Updated July 2nd 2018)
 
Dead players are getting moved to spec for being afk and they are not, where the problem guys

ayrton09_arg 12-09-2019 03:03

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

Originally Posted by scoty (Post 2676251)
Dead players are getting moved to spec for being afk and they are not, where the problem guys


sm_afk_exclude_dead "1"

flashing 01-05-2020 09:01

Re: [ANY] AFK Manager (Version 4.3.0 / Updated July 2nd 2018)
 
how can i change the chat prefix of this plugin
like from [AFK Manager] to something else

Rothgar 01-28-2020 05:22

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

Originally Posted by flashing (Post 2679038)
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 ?

paulo_crash 02-03-2020 21:27

Re: [ANY] AFK Manager (Version 4.3.0 / Updated July 2nd 2018)
 
@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.


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

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