20.02.2015, 18:21
Hi I need a cmd for irc !checkban
if I type !checkban [playername]
it tells whether the player is banned or not and if he is banned so it tells at which time and date he was banned..
I am still using the samp.ban file for banning
and this cmd for banning player..
if I type !checkban [playername]
it tells whether the player is banned or not and if he is banned so it tells at which time and date he was banned..
I am still using the samp.ban file for banning
and this cmd for banning player..
pawn Код:
IRCCMD:ban(botid, channel[], user[], host[], params[])
{
if (IRC_IsOp(botid, channel, user))
{
new playerid, reason[64];
if (sscanf(params, "dS(No reason)[64]", playerid, reason))
{
return 1;
}
if (IsPlayerConnected(playerid))
{
new msg[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(msg, sizeof(msg), "02*** %s has been banned by %s on IRC. (%s)", name, user, reason);
IRC_GroupSay(groupID, channel, msg);
format(msg, sizeof(msg), "*** %s has been banned by %s on IRC. (%s)", name, user, reason);
SendClientMessageToAll(0x0000FFFF, msg);
// Ban the player
BanEx(playerid, reason);
}
}
return 1;
}