Problems login in 60 seconds
#1

I added this in gamemod
Код:
onplayerconnect

	if(gPlayerLogged[playerid] == 0)
	{
		KickLogged(playerid);
	}

public OnFilterScriptInit()
{
  	SetTimer("KickLogged",600000,2);
  	return 1;
}

forward KickLogged(playerid);
public KickLogged(playerid)
{
	SendClientMessage(playerid, COLOR_RED, "Ai primit kick , Ai stat mai mult de 30 secunde afk.");
	Kick(playerid);
 	return 1;
}
does not work, get on the server and automatically kick me, just read the public, timer sucks!
How do I?

If you are not logged in, and stay mad for 60 seconds, you should automatically get kicked!
But I do not read timeru just automatically kick the public and entering )

Can you help me achieve this?
Reply
#2

pawn Код:
public OnpPayerConnect(playerid)
{
     if(gPlayerLogged[playerid] == 0)
     {
        SetTimerEx("KickLogged",60000,0,"d",playerid);
     }
     return 1;
}

forward KickLogged(playerid);
public KickLogged(playerid)
{
     SendClientMessage(playerid, COLOR_RED, "Ai primit kick , Ai stat mai mult de 60 secunde afk.");
     Kick(playerid);
     return 1;
}
Reply
#3

Well, for one the timer is set at "600000", "60000".
Reply
#4

thx
rezolved
tc
Reply
#5

I have a problem
Now we have seen
So go if you log in, after I gave loghinu after 60 seconds I was logged even kicked! Why? : (
Reply
#6

Define the timer

something like

pawn Код:
new Timer[MAX_PLAYERS]; //top of script

Timer[playerid] = SetTimerEx(//blahblahblah);
then use

pawn Код:
KillTimer(Timer[playerid]); //should stop the kicking
Reply
#7

KillTimer(Timer[playerid]);

setplayerspawn?
onplayerspawn?

where?
and for register , stop kick ! ?
Reply
#8

put this after the player login function
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)