Raised This Month: $51 Target: $400
 12% 

IsClientTimingOut(client) usage [SOLVED]


Post New Thread Reply   
 
Thread Tools Display Modes
midnight9
Senior Member
Join Date: Nov 2012
Old 12-10-2016 , 15:08   Re: IsClientTimingOut(client) usage
Reply With Quote #11

Quote:
Originally Posted by Mitchell View Post
returning Plugin_Handled will kill the timer is what ddhoward is saying.
Ahh ok, well it doesnt work any ways
midnight9 is offline
Visual77
Veteran Member
Join Date: Jan 2009
Old 12-10-2016 , 15:19   Re: IsClientTimingOut(client) usage
Reply With Quote #12

Try with IsClientConnected instead and shorter timer.

PHP Code:
#pragma semicolon 1
#include <sourcemod>
#define CHECK_TIME   0.5

public void OnPluginStart() {
    
CreateTimer(CHECK_TIMECheck_Is_TimingOut_TIMER_REPEAT);
}

public 
Action Check_Is_TimingOut(Handle timer) {
    for (new 
1<= MaxClientsi++)
        if (
IsClientConnected(i) && !IsFakeClient(i) && IsClientTimingOut(i))
            
PrintToChatAll("\x04%N\x01 is TimingOut"i);

Visual77 is offline
midnight9
Senior Member
Join Date: Nov 2012
Old 12-10-2016 , 16:24   Re: IsClientTimingOut(client) usage
Reply With Quote #13

Got it solved, thanks everyone for help

Last edited by midnight9; 12-10-2016 at 19:14.
midnight9 is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 12-12-2016 , 00:41   Re: IsClientTimingOut(client) usage
Reply With Quote #14

Quote:
Originally Posted by Mitchell View Post
returning Plugin_Handled will kill the timer is what ddhoward is saying.
No. Returning Plugin_Stop will kill the Timer.
KyleS is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 12-12-2016 , 00:44   Re: IsClientTimingOut(client) usage
Reply With Quote #15

Quote:
Originally Posted by KyleS View Post
No. Returning Plugin_Stop will kill the Timer.
I was under the impression that they both did.
Maybe that was for hooked events.
Mitchell is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 12-12-2016 , 00:48   Re: IsClientTimingOut(client) usage
Reply With Quote #16

Quote:
Originally Posted by Mitchell View Post
I was under the impression that they both did.
Maybe that was for hooked events.
In general:
Plugin_Continue - Proceed Onwards.
Plugin_Changed - Proceed through SP, call Game Func with new values.
Plugin_Handled - Proceed through SP, don't call Game Func.
Plugin_Stop - Stop, don't call any more SP functions or the Game Func.

Plugin_Stop won't remove the EventHook, it just stops the event from occurring.
KyleS 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 15:05.


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