Raised This Month: $ Target: $400
 0% 

Solved Get team of disconnected player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 06-08-2018 , 09:46   Get team of disconnected player
Reply With Quote #1

Hello, how are you? I hope it is..
Is there any way to get the team of the player that just left on the client_disconnect?
I'm using amx 1.8.3

Last edited by iceeedr; 06-09-2018 at 12:44.
iceeedr is offline
Send a message via Skype™ to iceeedr
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 06-08-2018 , 11:11   Re: Get team of disconnected player
Reply With Quote #2

Code:
public client_disconnected(id)     client_print(0, 3, "%i", cs_get_user_team(id));
__________________
Relaxing is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 06-08-2018 , 11:15   Re: Get team of disconnected player
Reply With Quote #3

Quote:
Originally Posted by Relaxing View Post
Code:
public client_disconnected(id)     client_print(0, 3, "%i", cs_get_user_team(id));
Wow, I never thought of that? Please relaxing, just come post something if in fact it is for help, if you do not go, dispense.

L 06/08/2018 - 00:16:42: [AMXX] [0] disconnect.sma::client_disconnected (line 2132)
L 06/08/2018 - 00:20:51: [CSTRIKE] Invalid player 3
L 06/08/2018 - 00:20:51: [AMXX] Displaying debug trace (plugin "disconnect.amxx", version "13.0")
L 06/08/2018 - 00:20:51: [AMXX] Run time error 10: native error (native "cs_get_user_team")
iceeedr is offline
Send a message via Skype™ to iceeedr
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 06-08-2018 , 12:00   Re: Get team of disconnected player
Reply With Quote #4

Quote:
Originally Posted by Relaxing View Post
Code:
public client_disconnected(id)     client_print(0, 3, "%i", cs_get_user_team(id));
PHP Code:
public client_disconnected(id)
    
client_print(03"%i"get_user_team(id)); 
Corrected * ( Just a lil )
instinctpt1 is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 06-08-2018 , 11:41   Re: Get team of disconnected player
Reply With Quote #5

Code:
#include <amxmodx> #include <cstrike> #include <fakemeta> public plugin_init() {     register_plugin("Get team on disconnect", "1.0", "Unknown");     register_forward(FM_ClientDisconnect, "fw_ClientDisconnect_Pre"); } public fw_ClientDisconnect_Pre(pPlayer) {     new CsTeams:iTeam = cs_get_user_team(pPlayer);     client_print(0, print_chat, "Team: %s", iTeam == CS_TEAM_T ? "TERRORIST" : "CT"); }

Or just use client_disconnected forward in AMx Mod X 1.8.3.
__________________








CrazY. is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 06-08-2018 , 11:53   Re: Get team of disconnected player
Reply With Quote #6

Quote:
Originally Posted by CrazY. View Post
Code:
#include <amxmodx> #include <cstrike> #include <fakemeta> public plugin_init() {     register_plugin("Get team on disconnect", "1.0", "Unknown");     register_forward(FM_ClientDisconnect, "fw_ClientDisconnect_Pre"); } public fw_ClientDisconnect_Pre(pPlayer) {     new CsTeams:iTeam = cs_get_user_team(pPlayer);     client_print(0, print_chat, "Team: %s", iTeam == CS_TEAM_T ? "TERRORIST" : "CT"); }

Or just use client_disconnected forward in AMx Mod X 1.8.3.
With the disconnected forward I'm getting invalid player..Will test with fakemeta thanks
iceeedr is offline
Send a message via Skype™ to iceeedr
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 06-08-2018 , 22:04   Re: Get team of disconnected player
Reply With Quote #7

Quote:
Originally Posted by CrazY. View Post
Code:
#include <amxmodx> #include <cstrike> #include <fakemeta> public plugin_init() {     register_plugin("Get team on disconnect", "1.0", "Unknown");     register_forward(FM_ClientDisconnect, "fw_ClientDisconnect_Pre"); } public fw_ClientDisconnect_Pre(pPlayer) {     new CsTeams:iTeam = cs_get_user_team(pPlayer);     client_print(0, print_chat, "Team: %s", iTeam == CS_TEAM_T ? "TERRORIST" : "CT"); }

Or just use client_disconnected forward in AMx Mod X 1.8.3.
I have tried client_disconnect, client_disconnected (id), client_disconnected (id, bool: drop, message [], len), and now the method with fakemeta, and the result is always this log.

L 06/08/2018 - 21:59:16: [CSTRIKE] Invalid player 4
L 06/08/2018 - 21:59:16: [AMXX] Displaying debug trace (plugin "disconnect.amxx", version "13.0")
L 06/08/2018 - 21:59:16: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 06/08/2018 - 21:59:16: [AMXX] [0] disconnect.amxx::fw_ClientDisconnect_Pre (line 2105)
iceeedr is offline
Send a message via Skype™ to iceeedr
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 06-08-2018 , 12:00   Re: Get team of disconnected player
Reply With Quote #8

I still wonder what's wrong with that.
__________________
Relaxing is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 06-08-2018 , 12:19   Re: Get team of disconnected player
Reply With Quote #9

it shoud be client_disconnectex since entity it alread removed on client_disconnected

@iceeedr


KKKK
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 06-09-2018 , 00:33   Re: Get team of disconnected player
Reply With Quote #10

Have u tried one which i corrected above ?
The one by relaxing... Try that with 183
instinctpt1 is offline
Reply


Thread Tools
Display Modes

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 04:39.


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