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

player_connect gain userid


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Teamkiller324
Senior Member
Join Date: Feb 2014
Location: Earth
Old 07-09-2020 , 14:49   player_connect gain userid
Reply With Quote #1

Hey, i'm having issues gaining userid from player_connect_client event.

Am wondering how to properly get the userid from the player_connect_client event.
__________________
Teamkiller324 is offline
Cruze
Veteran Member
Join Date: May 2017
Old 07-09-2020 , 14:53   Re: player_connect gain userid
Reply With Quote #2

what sort of issues? and which game?
__________________
Taking paid private requests! Contact me
Cruze is offline
Teamkiller324
Senior Member
Join Date: Feb 2014
Location: Earth
Old 07-09-2020 , 15:12   Re: player_connect gain userid
Reply With Quote #3

It is spewing out client index 0 is invalid, but somehow it is doing absolutely fine with no errors on disconnect.
Game i'm testing on is TF2
__________________

Last edited by Teamkiller324; 07-09-2020 at 18:01.
Teamkiller324 is offline
Cruze
Veteran Member
Join Date: May 2017
Old 07-09-2020 , 15:19   Re: player_connect gain userid
Reply With Quote #4

Why not use OnClientPostAdminCheck OR OnClientPutInServer
__________________
Taking paid private requests! Contact me
Cruze is offline
Teamkiller324
Senior Member
Join Date: Feb 2014
Location: Earth
Old 07-09-2020 , 15:30   Re: player_connect gain userid
Reply With Quote #5

i want the connect message to show as soon player joins. since userid is used the same way on player_disconnect and player_connect_client
__________________
Teamkiller324 is offline
Teamkiller324
Senior Member
Join Date: Feb 2014
Location: Earth
Old 07-09-2020 , 15:31   Re: player_connect gain userid
Reply With Quote #6

OnClientAuthorized works but doesn't check if the user is admin in the connect message, it goes directly to the default user has connected message
__________________

Last edited by Teamkiller324; 07-09-2020 at 18:00.
Teamkiller324 is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 07-09-2020 , 16:32   Re: player_connect gain userid
Reply With Quote #7

Use OnClientPostAdminCheck instead.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
Teamkiller324
Senior Member
Join Date: Feb 2014
Location: Earth
Old 07-09-2020 , 16:37   Re: player_connect gain userid
Reply With Quote #8

Doesn't player_connect work? just asking. am using OnClientPostAdminCheck now
__________________

Last edited by Teamkiller324; 07-10-2020 at 11:23.
Teamkiller324 is offline
DeadSwim
Junior Member
Join Date: Mar 2019
Location: On PC
Old 07-10-2020 , 10:44   Re: player_connect gain userid
Reply With Quote #9

You can use player_connect but you would have to use bool to check if the player is admin
__________________
DeadSwim is offline
Teamkiller324
Senior Member
Join Date: Feb 2014
Location: Earth
Old 07-10-2020 , 11:23   Re: player_connect gain userid
Reply With Quote #10

it fails to get the userid from the player_connect_client event, i already know it requires a bool to check if the user is admin
__________________

Last edited by Teamkiller324; 07-10-2020 at 11:24.
Teamkiller324 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 11:23.


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