CMD:kick(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] == 1)
{
new PID;
new reason[64];
new str[127];
new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME];
GetPlayerName(playerid, Adminname, sizeof(Adminname));
GetPlayerName(PID, Playername, sizeof(Playername));
if(sscanf(params, "us", PID,reason)) return SendClientMessage(playerid, ZALIA, "Naudojimas: /kick [Vardas] [Priezastis]");
if(!IsPlayerConnected(PID))
return SendClientMessage(playerid, RAUDONA, "Юaidлjas neprisijunges!");
format(str, sizeof(str), "[KICK] %s iрmetл %s uю [%s] ", Playername, Adminname, reason);
kickzinute[playerid] = SendClientMessageToAll(GELTONA, str);
SetTimer("kickzinutestimeris", 10, false);
Kick(PID);
}
else
{
SendClientMessage(playerid, RAUDONA, "Рia komanda gali naudotis tik Administratoriai");
}
return 1;
}
forward kickzinutestimeris(playerid);
public kickzinutestimeris(playerid)
{
SendClientMessageToAll(GELTONA, kickzinute[playerid]);
}
stock KickEx(playerid) return SetTimerEx("KickPublic", 1000, 0, "d", playerid);
forward KickPublic(playerid); public KickPublic(playerid) Kick(playerid);
Код:
stock KickEx(playerid) return SetTimerEx("KickPublic", 1000, 0, "d", playerid); Код:
forward KickPublic(playerid); public KickPublic(playerid) Kick(playerid); |