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

save position before drop


Post New Thread Reply   
 
Thread Tools Display Modes
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
Old 03-26-2014, 13:49
WildCard65
This message has been deleted by WildCard65. Reason: Black rose says that OP is not violating rules.
elantra86
Member
Join Date: Feb 2014
Old 03-26-2014 , 14:54   Re: save position before drop
Reply With Quote #2

Running non-steam server
i think is not important how runned server (non-steam or steam)
because i comment this code & if i save position handle i can continue after reconnect(my pos saved)

// if(
equal(authid, "VALVE_ID_LAN") || equal(authid, "STEAM_ID_LAN") || strlen(authid) > 18)
// {
//
ColorChat (id, GREEN, "%s^x01 %L", prefix, id, "KZ_NO_STEAM")
//
// return
PLUGIN_HANDLED
//
}

Last edited by elantra86; 03-26-2014 at 14:55.
elantra86 is offline
Old 03-26-2014, 15:26
WildCard65
This message has been deleted by WildCard65. Reason: See below
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 03-26-2014 , 16:36   Re: save position before drop
Reply With Quote #3

The code posted just prints an error message and returns once it hits VALVE_ID_LAN or STEAM_ID_LAN.
It is to prevent non-steam. So the code is completely legit.
The thread author answered that without any valid suspicion.
Hilarious.
__________________
Black Rose is offline
elantra86
Member
Join Date: Feb 2014
Old 03-27-2014 , 00:04   Re: save position before drop
Reply With Quote #4

Quote:
Originally Posted by Black Rose View Post
The code posted just prints an error message and returns once it hits VALVE_ID_LAN or STEAM_ID_LAN.
It is to prevent non-steam. So the code is completely legit.
The thread author answered that without any valid suspicion.
Hilarious.
i know )
but it works for me.
It's possible or not?
(save pos before quiting or drop)
elantra86 is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 03-27-2014 , 14:08   Re: save position before drop
Reply With Quote #5

It's too late now that you have admitted to using non-steam.

@WildCard65 He is violating the rules, there was just no evidence in his first post.
__________________

Last edited by Black Rose; 03-27-2014 at 14:11.
Black Rose is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 03-27-2014 , 14:13   Re: save position before drop
Reply With Quote #6

So we can have a moderator trash this thread?
WildCard65 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 05:01.


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