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


Messages In This Thread
IRC Commands In-Game - by PCheriyan007 - 19.03.2011, 17:57
Re: IRC Commands In-Game - by JaTochNietDan - 19.03.2011, 17:59
Re: IRC Commands In-Game - by PCheriyan007 - 19.03.2011, 18:10
Respuesta: IRC Commands In-Game - by Alex_Obando - 19.03.2011, 18:13
Re: IRC Commands In-Game - by PCheriyan007 - 19.03.2011, 18:51
Re: IRC Commands In-Game - by =WoR=Bruno - 19.03.2011, 18:57
Re: IRC Commands In-Game - by PCheriyan007 - 19.03.2011, 21:09

Forum Jump:


Users browsing this thread: 2 Guest(s)