- 0
AFk
-
Similar Content
-
- 0 replies
- 134 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
adytza
am si eu un fs dupa ce stai 30 min afk sa primesti kick merge bine doar ca nu apare numele lu ala care primeste kick
[pawn]
#include <a_samp>
#define FILTERSCRIPT
#define AFKTime 30 //Cate minute poate fi AFK
#define ShowTime 1 //Activeaza / Dezactiveaza un mesaj trimis jucatorului care a primit kick (0 = nu / 1 = da)
#define Public 1 //Activeaza / Dezactiveaza mesajul care este trimis tuturor (0 = nu / 1 = da)
/*--------------------------NOTHING BELOW THIS POINT NEEDS TO BE CHANGED--------------------------*/
public OnFilterScriptInit()
{
SetTimer("AFKKicker", 60000, 1);
return 1;
}
forward AFKKicker();
new Float:PPos[MAX_PLAYERS][3];
new AFKMins[MAX_PLAYERS];
new show = ShowTime;
new pub = Public;
public OnPlayerConnect(playerid)
{
PPos[playerid][0] = 0;
PPos[playerid][1] = 0;
PPos[playerid][2] = 0;
AFKMins[playerid] = 0;
}
public AFKKicker()
{
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(PPos[1] == 0)
{
GetPlayerPos(i,PPos[0],PPos[1],PPos[2]);
return 1;
}
new Float:x,Float:y,Float:z;
GetPlayerPos(i,x,y,z);
if(x == PPos[0] && y == PPos[1] && z == PPos[2])
{
AFKMins++;
if(AFKMins >= AFKTime)
{
if(show == 1)
{
new string[128];
SendClientMessage(i, 0xAA3333AA," You was kick by AdmBot, reason: AFK longer than 30 minutes");
SendClientMessage(i,0xAA3333AA,string);
}
else
{
SendClientMessage(i, 0xAA3333AA," You was Away From Keyboard(AFK) for too long");
}
Kick(i);
if(pub == 1)
{
new string[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(i, name, sizeof(name));
format(string, sizeof(string), " %s was kicked by AdmBot, reason: AFK longer than 30 minutes",name);
SendClientMessageToAll(0xAA3333AA,string);
}
}
}
}
return 1;
}
[/pawn]
apare doar asta was kicked by AdmBot, reason: AFK longer than 30 minutes vreau sa apara si cine a luat kick
www.ucp.gamesiasi.ro
Link to comment
Share on other sites
0 answers to this question
Recommended Posts