SA-MP Forums Archive
IRC Commands In-Game - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: IRC Commands In-Game (/showthread.php?tid=242222)



IRC Commands In-Game - PCheriyan007 - 19.03.2011

Hello people of SA-MP and beyond. I was wondering how to use IRC Commands In-Game. For example, if I typed !cookie [id] the IRC bot would give a "cookie" to the player who's ID is mentioned. This is what I have so far but I wanted to know how to make it so it would also work In-Game.
I am using Incognito's IRC Plugin v1.4.1
Код:
IRCCMD:cookie(botid, channel[], user[], host[], params[])
{
	new playerid;
	// Check if the player is connected
	if (IsPlayerConnected(playerid))
	{
		// Echo the formatted message
		new cookiemsg[128], name[MAX_PLAYER_NAME];
		GetPlayerName(playerid, name, sizeof(name));
		format(cookiemsg, sizeof(cookiemsg), "%s has received a cookie from %s(IRC).", name, user);
		IRC_GroupSay(gGroupID, channel, cookiemsg);
		format(cookiemsg, sizeof(cookiemsg), "%s has received a cookie from %s(IRC).", name, user);
		SendClientMessageToAll(COLOR_ORANGE, cookiemsg);
		SetPlayerHealth(playerid,100);
		format(cookiemsg, sizeof(cookiemsg), "You have received a cookie from %s(IRC).", name, user);
		SendClientMessage(playerid,0x00A765AA,cookiemsg);
	}
	return 1;
}
Any comments will be greatly appreciated


Re: IRC Commands In-Game - JaTochNietDan - 19.03.2011

Okay, I'm confused as to what you are asking for. Are you asking for the ability to type !cookie in-game, and the IRC bot will give the cookie to someone in-game? It's probably also worth mentioning that your code won't work properly, it will only work on ID 0. Is that what you want to fix?


Re: IRC Commands In-Game - PCheriyan007 - 19.03.2011

What I am asking for is to make !cookie an In-Game command in which the IRC Bot gives the player, who's ID you put, a cookie and if you didn't put an ID then it gives you a cookie.


Respuesta: IRC Commands In-Game - Alex_Obando - 19.03.2011

Download an IRC Filterscript then you edit it.


Re: IRC Commands In-Game - PCheriyan007 - 19.03.2011

Link me an IRC Filterscript, I have searched everywhere. And that little bit of code I posted is actually from the default script that comes with the IRC Plugin.


Re: IRC Commands In-Game - =WoR=Bruno - 19.03.2011

Search for Porche IRC FS,althougt youll need to edit couse its not giving the permissions correctly(IrcOperator,/administrator and stuff..)some players are able to use the admin commands.

And use the IRC plugin of incognito.

You must have a IRC Channel thougth.You can go here: http://www.mibbit.com

It explains pretty clearly on how to register the channel.
After registering the channel add the info to the FS.IRC Server IP and channel.Also you can change Bots names if you want.

Not a good tutorial but i hope it helps ya and sorry for lame english,im portuguese xD


Re: IRC Commands In-Game - PCheriyan007 - 19.03.2011

Quote:
Originally Posted by DonBruno
Посмотреть сообщение
Search for Porche IRC FS,althougt youll need to edit couse its not giving the permissions correctly(IrcOperator,/administrator and stuff..)some players are able to use the admin commands.

And use the IRC plugin of incognito.

You must have a IRC Channel thougth.You can go here: http://www.mibbit.com

It explains pretty clearly on how to register the channel.
After registering the channel add the info to the FS.IRC Server IP and channel.Also you can change Bots names if you want.

Not a good tutorial but i hope it helps ya and sorry for lame english,im portuguese xD
I know that script and everything but that only shows commands from the IRC Channel not commands In-Game. I also have an IRC Channel and everything set up