If you don't type .rdy in 2 minutes, you get kicked.
Hey guys.
I'm trying to make a pug mode that when a player connects it reads from a file if the pug is running, if its not running it tells him to type .rdy, if he's not typing it after 2 minutes he's getting kicked. The wierd problem is that 2 minutes after plugin precache the 'server' is getting kicked o.0 for example, if the server was name Allied Modders Pug, you'd see 2 minutes after plugin precache in chat Allied Modders Pug was kicked for not typing .rdy within 2 minutes (i did a client_print that when someone gets kicked it types it). Why is this...? How do I prevent it? I did an array of timeleft for everyone that when a player connects it reads his STEAM_ID into a cell in the array and then gives him his own timeleft, cuz if there would be 1 variable of timeleft then any player that will connect will have the remaining time the first player who joined has left. |
Re: If you don't type .rdy in 2 minutes, you get kicked.
The ready thing is easy.
1. Detect Connect 2. Set Task (id + 841) for example 3. Detect say: .rdy 4. If he said, remove task (id + 841) 5. if he didn't say u handle it in the Handler of the task. |
Re: If you don't type .rdy in 2 minutes, you get kicked.
Show the code.
|
Re: If you don't type .rdy in 2 minutes, you get kicked.
PHP Code:
|
Re: If you don't type .rdy in 2 minutes, you get kicked.
Can I just set then the first client that connects (which will be the server itself)'s time to unlimited?
|
Re: If you don't type .rdy in 2 minutes, you get kicked.
YOu have to provide a task id, in your case it would be the id variable.
PHP Code:
|
Re: If you don't type .rdy in 2 minutes, you get kicked.
its not unnecessary, you should understand the logic behind my code, thats why you should come on steam more often so i can bug you with questions, fysiks :D
|
Re: If you don't type .rdy in 2 minutes, you get kicked.
And I'll ask again, can I just set the first client that connects's timeleft to unlimited? or something that won't let him continue to any 'kicking' action? Because I make a guess now using my sense that the first client that will log in the server is the server itself (that was getting kicked after 2 minutes)
|
Re: If you don't type .rdy in 2 minutes, you get kicked.
just add id to set_task, since the default id is 0
and id 0 = server |
Re: If you don't type .rdy in 2 minutes, you get kicked.
Quote:
Quote:
|
| All times are GMT -4. The time now is 01:09. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.