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

Solved Client Disconnect ID


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 02-26-2017 , 13:21   Client Disconnect ID
Reply With Quote #1

I was wondering, what happens if you set a bool true on a specific id, then after that person disconnects, does the next person who will connect get access to that bool?

What I'm trying to say
Code:
new bool:g_IsPlayerVIP[33]; public fw_HamSpawnPost(id) { if(get_user_flags(id) & ADMIN_LEVEL_H) g_IsPlayerVIP[id] = true // we set the bool on this player true } public client_disconnect(id) { // we don't set bool to false } public client_putinserver(id) { // does this new player get the other player's id (is the g_IsPlayerVIP bool true on his id) ?
__________________

Last edited by edon1337; 03-01-2017 at 08:42.
edon1337 is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 02-26-2017 , 13:26   Re: Client Disconnect ID
Reply With Quote #2

Yes
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 02-26-2017 , 13:39   Re: Client Disconnect ID
Reply With Quote #3

Quote:
Originally Posted by wickedd View Post
Yes
Thanks.

Off: Could I ask, where are you from?
__________________
edon1337 is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 02-26-2017 , 13:49   Re: Client Disconnect ID
Reply With Quote #4

The U.S.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-26-2017 , 15:26   Re: Client Disconnect ID
Reply With Quote #5

You can simply do this and you won't have to worry about it being transfered on another player:

Code:
g_IsPlayerVIP[id] = bool:(get_user_flags(id) & ADMIN_LEVEL_H)
__________________

Last edited by OciXCrom; 02-26-2017 at 15:27.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-26-2017 , 15:46   Re: Client Disconnect ID
Reply With Quote #6

Quote:
Originally Posted by OciXCrom View Post
You can simply do this and you won't have to worry about it being transfered on another player:

Code:
g_IsPlayerVIP[id] = bool:(get_user_flags(id) & ADMIN_LEVEL_H)
The point of caching in a variable is to not have to call a native every time you need to check the value. But yes, this is a solution and the native is not expensive to call when needed.
__________________

Last edited by Bugsy; 02-26-2017 at 15:48.
Bugsy is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-26-2017 , 15:59   Re: Client Disconnect ID
Reply With Quote #7

Well, if he wants to check the flags on each spawn, there's nothing that can be cached. Or if you mean the flags - they can change during gameplay, so I wouldn't cache then.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 02-27-2017 , 06:45   Re: Client Disconnect ID
Reply With Quote #8

Quote:
Originally Posted by OciXCrom View Post
You can simply do this and you won't have to worry about it being transfered on another player:

Code:
g_IsPlayerVIP[id] = bool:(get_user_flags(id) & ADMIN_LEVEL_H)
Your point to mine is as close as this arrow

-->



to this



-->


Wickedd already answered my question.
__________________

Last edited by edon1337; 02-27-2017 at 06:46.
edon1337 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-27-2017 , 09:05   Re: Client Disconnect ID
Reply With Quote #9

What? I'm telling you that if you do that, it won't get "transfered", so you don't even need to use client_putinserver/client_disconnected.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 02-27-2017 , 09:17   Re: Client Disconnect ID
Reply With Quote #10

Quote:
Originally Posted by OciXCrom View Post
What? I'm telling you that if you do that, it won't get "transfered", so you don't even need to use client_putinserver/client_disconnected.
I know what you meant but, I just wanted to know if the player who connects receives the id that the disconnected player had.
__________________
edon1337 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 19:05.


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