Raised This Month: $ Target: $400
 0% 

[SOLVED]client_disconnect & mysql


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 05-06-2011 , 10:50   Re: [SOLVED]client_disconnect & mysql
Reply With Quote #8

ok, ill try to catch with orpheu.
i made a page to see it.
http://www.jva-multigaming.at/catchmod/ << if you check it now you will see im on server but in real im disconnected and this thing is still updating.
its realy a bad idea to update the tables in think :-D i wanted to have it in real time.


anyways it will now be updated in think ( i have to recode it and upload it on server but you can now test it if you like :-)) ) server deatails in my sign. server pw : test

EDIT :

here is my speed think
PHP Code:
public SpeedTask()
{
    static 
itarget
    
static Float:velocity[3]
    static 
Float:speed
    
for(i=1i<=E_MaxPlayersi++)
    {
        if(
is_user_alive(i))
        {
            
target pev(ipev_iuser1) == pev(ipev_iuser2) : i
            pev
(targetpev_velocityvelocity)
            
            
speed vector_length(velocity)
            
set_hudmessage(CV_Speedo_RCV_Speedo_GCV_Speedo_B0.410.7600.0FREQ0.010.0)
            if(
speed users_maxspeed_round[i])
            {
                
users_maxspeed_round[i] = speed            
            
}
            if(
speed users_maxspeed_map[i])
            {
                
users_maxspeed_map[i] = speed
            
}
            if(
speed best_speed)
            {
                
best_speed speed
                get_user_name
(i,top_speed_name,32)
            }
            new 
steam_id[33],Temp[512],loss,ping
            
/*team :
                0 = connecting
                1 = spectating
                2 = Catcher
                3 = Fleer
            */
    
            
get_user_ping(i,ping,loss)
            
get_user_authid(isteam_idcharsmax(steam_id))
    
            if(!
corrent_AG[i])
            {
                
format(Temp,charsmax(Temp),"UPDATE `catch_live` SET `speed`='%f' , `Maxspeed`='%f' , `fps`='%d' ,`Ping`='%d' , `ag`='0' WHERE `authid`='%s'",speed,users_maxspeed_round[i],users_fps,ping,steam_id)
                
ShowSyncHudMsg(i,SyncHud,"%L",LANG_PLAYER,"HUD_SPEED_NOAG",users_maxspeed_round[i],users_maxspeed_map[i],best_speed,top_speed_name)
            }
            else
            {
                
format(Temp,charsmax(Temp),"UPDATE `catch_live` SET `speed`='%f' , `Maxspeed`='%f' , `fps`='%d' ,`Ping`='%d' , `ag`='%d' WHERE `authid`='%s'",speed,users_maxspeed_round[i],users_fps,ping,corrent_AG[i],steam_id)
                
ShowSyncHudMsg(i,SyncHud,"%L",LANG_PLAYER,"HUD_SPEED_AGS",corrent_AG[i],users_maxspeed_round[i],users_maxspeed_map[i],best_speed,top_speed_name)
            }
            
//client_print(i,print_chat,"%s",Temp)
            
SQL_ThreadQuery(sqldb,"IgnoreHandle",Temp)
            if(
speed <= 1000)
            {
                
cs_set_user_armor(i,floatround(speed),CS_ARMOR_NONE)
                if(!
under_tausend[i])
                {
                    
message_begin(MSG_ONE,iconstatus,{0,0,0},i)
                    
write_byte(0
                    
write_string("item_longjump")
                    
write_byte(0)
                    
write_byte(255)
                    
write_byte(0)
                    
message_end()
                    
under_tausend[i] = 1
                    over_tausend
[i] = 0
                    over_twotausend
[i] = 0
                    dead_fixed_icon
[i] = 0
                    
if(!user_is_catcher[i])
                    {
                        
set_user_rendering(i,kRenderFxGlowShell,CV_FLEER_Color_R,CV_FLEER_Color_G,CV_FLEER_Color_B,kRenderNormal,CV_render_amount_U)
                    }
                    else
                    {
                        
set_user_rendering(i,kRenderFxGlowShell,CV_Catcher_Color_R,CV_Catcher_Color_G,CV_Catcher_Color_B,kRenderNormal,CV_render_amount_U)
                    }
                }
            }
            else if(
speed 1000 && speed 2000)
            {
                
cs_set_user_armor(i,floatround(speed) - 1000,CS_ARMOR_NONE)
                if(!
over_tausend[i])
                {
                    
message_begin(MSG_ONE,iconstatus,{0,0,0},i)
                    
write_byte(2)
                    
write_string("item_longjump")
                    
write_byte(0)
                    
write_byte(255
                    
write_byte(0)
                    
message_end()
                    
over_tausend[i] = 1
                    under_tausend
[i] = 0
                    over_twotausend
[i] = 0
                    dead_fixed_icon
[i] = 0
                    
if(user_is_catcher[i])
                    {
                        
set_user_rendering(i,kRenderFxGlowShell,CV_Catcher_Color_R,CV_Catcher_Color_G,CV_Catcher_Color_B,kRenderNormal,CV_render_amount_O)
                    }
                    else
                    {
                        
set_user_rendering(i,kRenderFxGlowShell,CV_FLEER_Color_R,CV_FLEER_Color_G,CV_FLEER_Color_B,kRenderNormal,CV_render_amount_O)
                    }
                }
                if(
speed 1200 && !AG_anzahl[i][1])
                {
                    
AG_anzahl[i][1] = 1
                    corrent_AG
[i] = 1
                    
                
}
                else if(
speed 1200 && !AG_anzahl[i][2])
                {
                    
AG_anzahl[i][2] = 1
                    corrent_AG
[i] = 2
                
}
                else if(
speed 1400 && !AG_anzahl[i][3])
                {
                    
AG_anzahl[i][3] = 1
                    corrent_AG
[i] = 3
                
}
                else if(
speed 1600 && !AG_anzahl[i][4])
                {
                    
AG_anzahl[i][4] = 1
                    corrent_AG
[i] = 4
                
}
                else if(
speed 1800 && !AG_anzahl[i][5])
                {
                    
AG_anzahl[i][5] = 1
                    corrent_AG
[i] = 5
                
}
            }
            else if(
speed 2000 && speed 3000)
            {
                
cs_set_user_armor(i,floatround(speed) - 2000,CS_ARMOR_NONE)
                if(!
over_twotausend[i])
                {
                    
message_begin(MSG_ONE,iconstatus,{0,0,0},i)
                    
write_byte(2)
                    
write_string("item_longjump")
                    
write_byte(255)
                    
write_byte(255)
                    
write_byte(0)
                    
message_end()
                    
over_tausend[i] = 0
                    under_tausend
[i] = 0
                    over_twotausend
[i] = 1
                    dead_fixed_icon
[i] = 0
                    
if(!user_is_catcher[i])
                    {
                        
set_user_rendering(i,kRenderFxGlowShell,CV_FLEER_Color_R,CV_FLEER_Color_G,CV_FLEER_Color_B,kRenderNormal,CV_render_amount_OO)
                    }
                    else
                    {
                        
set_user_rendering(i,kRenderFxGlowShell,CV_Catcher_Color_R,CV_Catcher_Color_G,CV_Catcher_Color_B,kRenderNormal,CV_render_amount_OO)
                    }
                }
                if(
speed 2100 && !AG_anzahl[i][6])
                {
                    
AG_anzahl[i][6] = 1
                    corrent_AG
[i] = 6
                
}
                else if(
speed 2400 && !AG_anzahl[i][7])
                {
                    
AG_anzahl[i][7] = 1
                    corrent_AG
[i] = 8
                
}
            }
        }
        else
        {
            if(
is_user_connected(i) && !dead_fixed_icon[i])
            {
                
message_begin(MSG_ONE,iconstatus,{0,0,0},i)
                
write_byte(2)
                
write_string("item_longjump")
                
write_byte(255)
                
write_byte(255)
                
write_byte(0)
                
message_end()
                
dead_fixed_icon[i] = 1
            
}
            
ShowSyncHudMsg(i,SyncHud,"%L",LANG_PLAYER,"HUD_SPEED_SPEC",speed,best_speed,top_speed_name)
        }
        
users_AG[i] = corrent_AG[i]
        
g_points[i] = users_AG[i]
        
g_speed[i] = floatround(users_maxspeed_round[i])
    }

__________________

Last edited by One; 05-06-2011 at 11:00.
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
 



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 04:22.


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