Raised This Month: $ Target: $400
 0% 

check <client> crash(not server!!)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
biscuit628
Senior Member
Join Date: Jun 2007
Location: 香港HongKong
Old 06-20-2009 , 11:15   check <client> crash(not server!!)
Reply With Quote #1

is this a good way to check is client get crash?
PHP Code:
#include <amxmodx>

new oldping[33],oldloss[33]
new 
ping[33],loss[33]
new 
iscrash[33]

public 
checkping1(id)
{
    
get_user_ping(id,oldping[id],oldloss[id])
    if(
oldping[id] > 2000)
        
server_cmd("kick #%d over2000",get_user_userid(id))
    
set_task(2.0,"checkping2",id)
}

public 
checkping2(id)
{
    
get_user_ping(id,ping[id],loss[id])
    if(
ping[id] == oldping[id])
    {
        if(
iscrash[id] > 2)
            
server_cmd("kick #%d oldping",get_user_userid(id))
        else
            
set_task(2.0,"checkping1",id)
            
iscrash[id]++
    }

__________________
My Plugins

C4man with fun

Sniper Skill bonus
-------------------------
Sorry for my poor English!

Last edited by biscuit628; 06-20-2009 at 22:22.
biscuit628 is offline
 



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:28.


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