19.03.2011, 17:57
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
Any comments will be greatly appreciated
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; }