|
Veteran Member
Join Date: Apr 2017
Location: Brazil
|
11-09-2018
, 20:44
Re: catch on client_disconnect
|
#5
|
Quote:
Originally Posted by Bugsy
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_disconnect( id )
{
new Float:fOrigin[ 3 ];
if ( !is_user_bot( id ) )
{
pev( id , pev_origin , fOrigin );
server_print( "%d = %f %f %f" , id , fOrigin[ 0 ] , fOrigin[ 1 ] , fOrigin[ 2 ] )
}
}
public Test( id )
{
//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_pev( id , 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
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/
|
|
|
|