Posts: 98
Threads: 27
Joined: Jan 2017
Reputation:
0
Hello, is there a good kick timer system?
In order to when a player join in a server, he is kicked after 10 seconds if he does not log in in time.
Posts: 1,042
Threads: 46
Joined: Jun 2013
Add to Variables:
Код:
new LoginTimer[MAX_PLAYERS];
Start login:
Код:
LoginTimer[playerid] = SetTimerEx("KickPlayer", 10000, false, "i", playerid);
Good login:
Код:
KillTimer(LoginTimer[playerid]);
LoginTimer[playerid] = 0;
At the very bottom of your mode:
Код:
forward KickPlayer(playerid);
public KickPlayer(playerid) {
Kick(playerid);
LoginTimer[playerid] = 0;
return 1;
}
Posts: 1,794
Threads: 104
Joined: Feb 2012
Reputation:
0
Try to understand what you're doing before compiling it otherwise there's no way you're going to learn. It's simple, set a timer when someone connects to the server of ten seconds -- if the player logs on, then kill the said timer. If the player doesn't log in then the ten seconds will pass therefore they will be kicked.