View Single Post
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 11-09-2018 , 20:44   Re: catch on client_disconnect
Reply With Quote #5

Quote:
Originally Posted by Bugsy View Post
It may work but I would avoid it if possible. Can you maybe log it on his most recent kill/death, health change, money change, shot/damage, or any other game event?

FYI I just did this test and the origin was not accurate:
1. Spawn at T spawn in dust2.
2. Kill HL process, which resulted in my origin output when I timed out.
3. Recompiled the plugin to spawn myself at this origin and it was at bomb site B.

PHP Code:
#include <amxmodx>
#include <fakemeta>

public plugin_init() 
{
    
register_clcmd"say test" "Test" );
}

public 
client_disconnectid )
{
    new 
Float:fOrigin];
    
    if ( !
is_user_botid ) )
    {
        
pevid pev_origin fOrigin );
        
server_print"%d = %f %f %f" id fOrigin] , fOrigin] , fOrigin] )
    }
}

public 
Testid )
{
    
//Test 1 which is at bombsite B
    //set_pev( id , pev_origin , { -2080.000000 , 1824.000000 , 208.000000 } );
    
    //Test 2 was successful at CT spawn
    
set_pevid pev_origin , { 352.000000 2368.000000 , -87.000000 } );

It may be a stupid question, but have you also tested it with the public client_disconnected?
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr