30.01.2013, 17:33
I'll post an !isay command as an example hold on...
So when I do "!isay hi there!" in IRC, the server (in-game) sees "kaisersouse on IRC: hi there!"
Personally I label my IRC->SAMP commands w/ "i" in the front to denote them as irc commands. Also most IRC servers have a built-in !say so adding "i" at the beginning keeps default !say and IRC !isay from colliding
Код:
IRCCMD:isay(botid, channel[], user[], host[], params[]) { // Check if the user has at least voice in the channel if (IRC_IsVoice(botid, channel, user)) { // Check if the user entered any text if (!isnull(params)) { new msg[128]; // Echo the formatted message format(msg, sizeof(msg), "02*** %s on IRC: %s", user, params); IRC_GroupSay(groupID, channel, msg); format(msg, sizeof(msg), "{FFFFFF}***{7CFC00}[IRC] - %s:{FFFFFF} %s", user, params); SendClientMessageToAll(COLOR_BRIGHTGREEN, msg); } } return 1; }
Personally I label my IRC->SAMP commands w/ "i" in the front to denote them as irc commands. Also most IRC servers have a built-in !say so adding "i" at the beginning keeps default !say and IRC !isay from colliding