[Help] With IdleKick -
Sid_Alexander - 10.05.2011
Need Some help here guys, I got this stuff in my Gm That kicks a player if he is afk/idle for a longtime
But i want to make it only for non-admins, i mean the admins won't get kicked, The non-admins will get kicked, here is the code
pawn Код:
public IdleKick()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] < 1)
{
GetPlayerPos(i, PlayerPos[i][0], PlayerPos[i][1], PlayerPos[i][2]);
if(PlayerPos[i][0] == PlayerPos[i][3] && PlayerPos[i][1] == PlayerPos[i][4] && PlayerPos[i][2] == PlayerPos[i][5])
{
new plname[64];
new string[128];
GetPlayerName(i, plname, sizeof(plname));
format(string, sizeof(string), "AdmCmd: %s was kicked, reason: AFK", plname);
SendClientMessageToAll(COLOR_LIGHTRED, string);
Kick(i);
}
PlayerPos[i][3] = PlayerPos[i][0];
PlayerPos[i][4] = PlayerPos[i][1];
PlayerPos[i][5] = PlayerPos[i][2];
}
}
}
}
Re: [Help] With IdleKick -
Jeffry - 10.05.2011
What's wrong with the code?
Re: [Help] With IdleKick -
Sid_Alexander - 10.05.2011
Nuthing, everyone gets kicked, I Want to make it so only non-admins can get kicked
Re: [Help] With IdleKick -
Jeffry - 10.05.2011
RCON Admins, or what?
Then change
pawn Код:
if(PlayerInfo[i][pAdmin] < 1)
to
Else, what is your IsAdmin Variable called?
Re: [Help] With IdleKick -
Sid_Alexander - 10.05.2011
it's this And should i add it up of the Public Idle kick?
pawn Код:
if (PlayerInfo[playerid][pAdmin] >= 1
if that your real pic?
Re: [Help] With IdleKick -
Jeffry - 10.05.2011
This:
pawn Код:
if(PlayerInfo[i][pAdmin] < 1)
says that if the Level is
smaller than 1, then it checks the position, else it won't. I don't see any problem in the code. Maybe you are not logged it.
Check if you have logged in.
@ No that's not me. ^^
Re: [Help] With IdleKick -
Zh3r0 - 10.05.2011
Quote:
Originally Posted by Jeffry
This:
pawn Код:
if(PlayerInfo[i][pAdmin] < 1)
says that if the Level is smaller than 1, then it checks the position, else it won't. I don't see any problem in the code. Maybe you are not logged it.
Check if you have logged in.
@ No that's not me. ^^
|
Since i "met" him on these forums, he always carried with him a pack of sweet-ass girls with nice spheric stuff.
@EDIT: Post below, yeah, Jeffrey.
Re: [Help] With IdleKick -
Sid_Alexander - 10.05.2011
Quote:
Originally Posted by Zh3r0
Since i "met" him on these forums, he always carried with him a pack of sweet-ass girls with nice spheric stuff.
|
![Tongue](images/smilies/razz.gif)
You mean Jeffery?
Re: [Help] With IdleKick -
Jeffry - 10.05.2011
Quote:
Originally Posted by Sid_Alexander
![Tongue](images/smilies/razz.gif) You mean Jeffery?
|
Quote:
Originally Posted by Zh3r0
@EDIT: Post below, yeah, Jeffrey.
|
Jeffery Jeffrey -_- My name is
Jeffry
Quote:
Originally Posted by Zh3r0
Since i "met" him on these forums, he always carried with him a pack of sweet-ass girls with nice spheric stuff.
|
![Cheesy](images/smilies/biggrin.png)
One for each time of the year. Winter Spring Summer Fall ^^ And two or three others.
Is it working now?
Re: [Help] With IdleKick -
o_O - 10.05.2011
Quote:
Originally Posted by Jeffry
This:
pawn Код:
if(PlayerInfo[i][pAdmin] < 1)
says that if the Level is smaller than 1, then it checks the position, else it won't. I don't see any problem in the code. Maybe you are not logged it.
Check if you have logged in.
@ No that's not me. ^^
|
This.
Make sure pAdmin is correctly set.