Raised This Month: $ Target: $400
 0% 

save position before drop


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
elantra86
Member
Join Date: Feb 2014
Old 03-26-2014 , 13:45   save position before drop
Reply With Quote #1

hi all
how to auto save position before client dropped with reason adsl fault ?

Code:
reason: reliable channel overflowed
or
Code:
reason: client sent drop
it's important for kz mode ) to continue saved game.)

here part of code:
PHP Code:
public SavePos(id)
{

    new 
authid[33];
    
get_user_authid(idauthid32)
    if(
get_pcvar_num(kz_save_pos) == 0)
    {
        
kz_chat(id"%L"id"KZ_SAVEPOS_DISABLED")
        return 
PLUGIN_HANDLED
    
}

    if(
equal(authid"VALVE_ID_LAN") || equal(authid"STEAM_ID_LAN") || strlen(authid) > 18)
    {
        
ColorChat (idGREEN"%s^x01 %L"prefixid"KZ_NO_STEAM")
        
        return 
PLUGIN_HANDLED
    
}    
        
    if( !( 
pevidpev_flags ) & FL_ONGROUND2  ) )
    {
        
kz_chat(id"%L"id"KZ_NOT_ON_GROUND")
        
        return 
PLUGIN_HANDLED
    
}
    
    if(!
timer_started[id])
    {
        
kz_chat(id"%L"id"KZ_TIMER_NOT_STARTED")
        return 
PLUGIN_HANDLED
    
}
    
    if(
Verif(id,1))
    {
        
ColorChat(idGREEN,  "%s^x01 %L"prefixid"KZ_SAVEPOS_ALREADY")
        
savepos_menu(id)
        return 
PLUGIN_HANDLED
    
}
    
    if(
get_user_noclip(id))
    {
        
ColorChat(idGREEN"%s^x01 %L"prefixid"KZ_SAVEPOS_NOCLIP")
        return 
PLUGIN_HANDLED
    
}
    
    new 
Float:origin[3], scout
    pev
(idpev_originorigin)
    new 
Float:Time,check,gocheck 
    
if(IsPaused[id])
    {
        
Time g_pausetime[id]
        
Pause(id)
    }
    else
        
Time=get_gametime() - timer_time[id]
    
check=checknumbers[id]
    
gocheck=gochecknumbers[id]
    
ColorChat(idGREEN,  "%s^x01 %L"prefixid"KZ_SAVEPOS")
    if (
user_has_scout[id])
        
scout=1
    
else
        
scout=0
    kz_savepos
(idTimecheckgocheckoriginscout)
    
reset_checkpoints(id)
    
    return 
PLUGIN_HANDLED

sorry for my eng. thx in advance

Last edited by elantra86; 03-26-2014 at 14:30.
elantra86 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 05:58.


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