25.05.2013, 01:37
(
Последний раз редактировалось Matt; 25.05.2013 в 04:11.
)
thats really easy. Just define another chan like this:
and then find IRC_NnConnect and add it so the bots can join it:
For !ban look at the example filterscript that Incognito has.
For respawn, you could do something like this:
and replace IRC_CHANNEL2 with whatever channel that you defined, that you want it to show on.
Код:
#define IRC_MINE "#mychan"
Код:
public IRC_OnConnect(botid, ip[], port) { // Join the channel mine IRC_JoinChannel(botid, IRC_MINE); return 1; }
For respawn, you could do something like this:
Код:
IRCCMD:spawn(botid, channel[], user[], host[], params[]) { // Check if the user is at least an op in the channel if (IRC_IsOp(botid, channel, user)) { new playerid, reason[64]; // If the user did not enter a player ID, then the command will not be processed if (sscanf(params, "dz", playerid, reason)) { return 1; } // If the player is not connected, then nothing will be done if (IsPlayerConnected(playerid)) { new msg[128], name[MAX_PLAYER_NAME]; // Echo the formatted message GetPlayerName(playerid, name, sizeof(name)); format(msg, sizeof(msg), "02*** %s has been respawned by %s on IRC.", name, user); IRC_GroupSay(gGroupID,IRC_CHANNEL2, msg); format(msg, sizeof(msg), "* Admin %s on IRC has respawned %s ",user, name); SendClientMessageToAll(0x9D000096, msg); TogglePlayerControllable(playerid, 1); } } return 1; }