Raised This Month: $ Target: $400
 0% 

Client retry


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Killer zm
Senior Member
Join Date: Jun 2011
Old 04-18-2012 , 11:24   Client retry
Reply With Quote #1

I need to do something :
When an player select something i want after 5 second to be reconnected

i'v made something like this

public retry_player(id)
{
client_cmd(id,"reconnect");
}

if he do something then he will bee reconnected

set_task(5.0, "retry_player");


But the problem is when that player do that thing then all players are reconnected not just him , how to make to be reconnected just him.
Killer zm is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 04-18-2012 , 11:30   Re: Client retry
Reply With Quote #2

set_task(5.0, "retry_player", id);
__________________
You can do anything you set your mind to, man.

Devil259 is offline
Ortega
Junior Member
Join Date: Nov 2009
Old 04-19-2012 , 09:34   Re: Client retry
Reply With Quote #3

Quote:
Originally Posted by Devil259 View Post
set_task(5.0, "retry_player", id);
But you have to remember it isn't param of player index that it's only unique number of task to do. You can add to index your constant num and in callback decrease this value using the same num to obtain player index.
__________________
Ave duru genus.
Ortega is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 04-19-2012 , 11:21   Re: Client retry
Reply With Quote #4

No, that works fine. Just one thing to add, check if user is connected in public retry_player() before doing anything.
__________________
You can do anything you set your mind to, man.

Devil259 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 07:53.


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