Raised This Month: $ Target: $400
 0% 

Client Disconnect (ID)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Tonda
Senior Member
Join Date: Aug 2009
Old 11-22-2010 , 07:31   Client Disconnect (ID)
Reply With Quote #1

Hi, i have server and if you are join, you will have 5 points. You can buy items for this points. But if you reconnect, you will have 5 points again and this is bad.

So i try edited and script do this:

Code:
public client_disconnect( id ) {
	check_disconnect[ id ] = 1;
and

Code:
public client_putinserver( id )
{	
	if (check_disconnect[id])
	{
	points[id] = get_pcvar_num(points_disconnect);	
	}
	return PLUGIN_CONTINUE;
}
So after this if client disconnect and he come again, he have 0 points (points_disconnect). All works fine but ... If do reconnect one player on the server, all players on the server have 0 points for reconnect. Why ? I defined ID and only this player ID obtained points_disconnect. Help me ...
Tonda is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-22-2010 , 07:35   Re: Client Disconnect (ID)
Reply With Quote #2

You have to work with steamid, players indexes are shared.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Tonda
Senior Member
Join Date: Aug 2009
Old 11-22-2010 , 08:09   Re: Client Disconnect (ID)
Reply With Quote #3

Quote:
Originally Posted by ConnorMcLeod View Post
You have to work with steamid, players indexes are shared.
Thx for you reply and what you mean, what is the better way for this problem?
Tonda is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 11-22-2010 , 11:58   Re: Client Disconnect (ID)
Reply With Quote #4

Quote:
Originally Posted by Tonda View Post
Thx for you reply and what you mean, what is the better way for this problem?
Saving the points with nvault/fvault, sqlite.
bibu is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 11-22-2010 , 13:40   Re: Client Disconnect (ID)
Reply With Quote #5

Working with a Trie would be better.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-22-2010 , 13:41   Re: Client Disconnect (ID)
Reply With Quote #6

I wish TrisSetArray have been fixed :'(
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 11-22-2010 , 14:03   Re: Client Disconnect (ID)
Reply With Quote #7

Quote:
Originally Posted by ConnorMcLeod View Post
I wish TrisSetArray have been fixed :'(
I thought it was in developer builds?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-22-2010 , 15:15   Re: Client Disconnect (ID)
Reply With Quote #8

No, though diff has been posted for a long time now.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-22-2010 , 23:31   Re: Client Disconnect (ID)
Reply With Quote #9

Quote:
Originally Posted by Exolent[jNr] View Post
I thought it was in developer builds?
I posted the diff but nobody has pushed it. I posted a documentation diff but hasn't been pushed. I asked Bail about pushing some (mainly my doc diff) but was interupted at home and he wasn't on when I got back .

EDIT: They have a review+ from Bail though
__________________

Last edited by fysiks; 11-22-2010 at 23:35.
fysiks is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 11-23-2010 , 05:31   Re: Client Disconnect (ID)
Reply With Quote #10

What are tries btw ??
Are they like CellArrays ??
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
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 11:17.


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