26.04.2012, 08:37
pawn Код:
IRCCMD:banname(botid, channel[], user[], host[], params[])
{
// Check if the user is at least an op in the channel
if(IRC_IsOp(botid, channel, user) || IRC_IsAdmin(botid, channel, user))
{
// If the user did not enter a player ID, then the command will not be processed
if(isnull(params))
return IRC_Say(gGroupID, channel, "02USAGE: !banname <PlayerName>");
// If the player is not connected, then nothing will be done
if(!udb_Exists(params))
return IRC_Say(gGroupID,channel,"4*** Error: This PlayerName Is Not In Our Database");
new
msg[128];
if(udb_Exists(params))
{
format(msg, sizeof(msg), "02*** %s has been banned by %s on IRC. (Cheater)", params, user);
IRC_GroupSay(gGroupID, channel, msg);
format(msg, sizeof(msg), "BAN: %s has been banned by IRC. (Cheater)", params);
SendClientMessageToAll(0x0000FFFF, msg);
new playerip;
new banmsg[128];
dUserSetINT(params).("nameban",1);
playerip = dUserINT(params).("playerIP");
format(banmsg,sizeof(banmsg),"banip %s",playerip);
SendRconCommand(banmsg);
}
}
return 1;
}
but the line to set nameban=1 works good but why the RconCommand Doesnt ?