Thread: Variable + Afk
View Single Post
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-13-2017 , 05:56   Re: Variable + Afk
Reply With Quote #3

Quote:
Originally Posted by aron9forever View Post
for 1, look at client_print_color, a function added in 1.8.3
here you can use yellow, green and either team color or any of grey / red / blue (but not multiple ones in the same sentence)
it does it by faking the team of a client for a moment while showing the message

for no 2, one way (that I use) is to mark all clients as g_hasmoved[id] = false at spawn
then
Code:
const ButtonBits = ( IN_FORWARD | IN_BACK | IN_MOVELEFT | IN_MOVERIGHT | IN_JUMP); register_forward(FM_CmdStart , "fw_FMCmdStart"); public fw_FMCmdStart( id , handle , seed )     if ( get_uc( handle , UC_Buttons ) & ButtonBits )         g_hasmoved[id] = true;

this will only mark player as not afk once one of those keys has been pressed (wasd or space)
Checking each second seems much better than doing it per frame. Do you really need such precision for an afk manager plugin?
__________________
HamletEagle is offline