AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:S] Simple !afk !unafk Plugin (https://forums.alliedmods.net/showthread.php?t=339311)

The SoupSpy 08-31-2022 13:18

[CS:S] Simple !afk !unafk Plugin
 
4 Attachment(s)
This is a plugin which is as useful as simple it is.

The plugin works in a really simple way. Players type !afk when they gotta go afk and !unafk once they come back.

I know that there are plugins similar to this but I've never found a plugin like I wanted, so I decided to write one myself. Also since it's my very first plugin, I'd be appreciated if you corrected any of the errors you may find in the source code.

This plugin doesn't support language preferences at the moment so you gotta change the language from the source code.

!afk => Logs the player's current team if he is in any and then moves the player to the spectator team
!unafk => Moves back the player to their old team. If the player hasn't been in any team before the plugin will move them to a random team.

Cvars:
Code:

soup_afk_enable - Enables or disables the plugin. [ 1 = Enable | 0 = Disable ]
ChangeLog
Code:

Edited so now you can only use the command if your hp is over 70 or if you are dead.
GitHub

L4D2Noob 08-31-2022 18:10

Re: [CS:S] Simple !afk !unafk Plugin
 
Why shouldn't the player just be the spectator?

The SoupSpy 08-31-2022 19:25

Re: [CS:S] Simple !afk !unafk Plugin
 
Quote:

Originally Posted by L4D2Noob (Post 2787868)
Why shouldn't the player just be the spectator?

Game doesn't allow you to join the spectators team unless you are dead. So in this case I personally wouldn't kill myself everytime I need to go AFK.


All times are GMT -4. The time now is 16:56.

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