IRC scripting help!
#1

Hi I need to know how to add multiple channels on Icognitio's plugin and how to add !ban,!respawn etc to one channel that will actually ban people inside my samp server...
Please respond quickly the quickest person who actually helps me will get a neat prize...
Reply
#2

thats really easy. Just define another chan like this:
Код:
#define IRC_MINE "#mychan"
and then find IRC_NnConnect and add it so the bots can join it:
Код:
public IRC_OnConnect(botid, ip[], port)
{
    // Join the channel mine
	IRC_JoinChannel(botid, IRC_MINE);
	return 1;
}
For !ban look at the example filterscript that Incognito has.

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;
}
and replace IRC_CHANNEL2 with whatever channel that you defined, that you want it to show on.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)