catch on client_disconnect
hey guys..where (or how) can i check what can we get from player when he disconnect's ?
im particulary interested in his last origin (which is impossible, its too late for that command ?) but we can get his nick, steamid, ip...something more? |
Re: catch on client_disconnect
Try it and see. What are you trying to do?
|
Re: catch on client_disconnect
API says the player entity is still valid, this means you can try to get his origin.
|
Re: catch on client_disconnect
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:
|
Re: catch on client_disconnect
Quote:
|
Re: catch on client_disconnect
@fysiks, if tr leaves, replace ct with his origin, simple as that haha
@bugsy, interesting..i did this test: EDIT: thought fakemeta/engine will change anything PHP Code:
edit: oh how now i see you did test with timed out maybe to add check: if player timed out -> make normal spawn? |
Re: catch on client_disconnect
Can you provide a use-case for what you want to do with this origin? If it was me I would log it on some other game event, not disconnect.
|
Re: catch on client_disconnect
deathrun mode...if TR player leaves server -> replace one CT with his last origin...the alternative is set_task with flag b on terror player untill he leaves haha
|
Re: catch on client_disconnect
Yeah, there really is no game event for what you're trying to do. I would create a thinking entity and set the interval to maybe every 3-5 seconds to get all players origins.
You should add an additional condition to make sure the disconnecting player was actually in game prior to him leaving. Something like this: PHP Code:
|
Re: catch on client_disconnect
interesting, thanks..
but because its deathrun (1TR + othersCT) we can shorten it to not loop all players, but only to check TR ? |
All times are GMT -4. The time now is 22:40. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.