IRC Commands In-Game
#1

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
Reply
#2

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?
Reply
#3

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.
Reply
#4

Download an IRC Filterscript then you edit it.
Reply
#5

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.
Reply
#6

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
Reply
#7

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)