29.05.2011, 13:16
Not Working Patrik ....
Originally Posted by [KSF
Mike]
how to chat ingame with this plugin?? |
#undef COMMAND_PREFIX
#define COMMAND_PREFIX '!'
format(string, sizeof(string), "02[%d] 03*** %s has joined the server.", playerid, name);
//-----------------------------------[Ask]-----------------------------------------------
CMD:ask(playerid, params[])
{
{
new string[128], reason[64], msg[64];
if(sscanf(params, "z", reason)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_DGREY"[CMD] / "#COL_SGREY"[Question]");
else
{
SendClientMessage(playerid, COLOR_WHITE, ""#COL_ORANGE"[SERVER]"#COL_LRED" Your message has been send to all online administrators.");
new pName[24];
GetPlayerRame(playerid, pName, 128);
for (new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
format(string, sizeof(string), ""#COL_BROWN"[ASK]"#COL_EASY" %s: %s ", pName, reason);
IRC_GroupSay(gGroupID, msg, string);
format(string, sizeof(string), ""#COL_BROWN"[ASK]"#COL_EASY" %s: %s ", pName, reason);
SendMessageToAdmins(COLOR_RED, string);
}
}
}
}
return 1;
}
format(msg2, 144, "{F2AF11}%s {FFFFFF}Changed Nick To {F2AF11}%s.", oldnick, newnick);
SendClientMessageToAll(0xFF000DFF, msg2);
pawno\include\irc.inc(38) : error 010: invalid function or declaration pawno\include\irc.inc(38) : error 001: expected token: ";", but found "[" pawno\include\irc.inc(40) : error 010: invalid function or declaration pawno\include\irc.inc(40) : error 001: expected token: ";", but found "[" pawno\include\irc.inc(43) : error 010: invalid function or declaration pawno\include\irc.inc(43) : error 001: expected token: ";", but found "[" pawno\include\irc.inc(44) : error 010: invalid function or declaration pawno\include\irc.inc(44) : error 001: expected token: ";", but found "[" pawno\include\irc.inc(47) : error 010: invalid function or declaration pawno\include\irc.inc(47) : error 001: expected token: ";", but found "[" pawno\include\irc.inc(51) : error 010: invalid function or declaration pawno\include\irc.inc(51) : error 001: expected token: ";", but found "[" pawno\include\irc.inc(52) : error 010: invalid function or declaration pawno\include\irc.inc(52) : error 001: expected token: ";", but found "[" pawno\include\irc.inc(53) : error 010: invalid function or declaration pawno\include\irc.inc(53) : error 001: expected token: ";", but found "[" pawno\include\irc.inc(58) : error 010: invalid function or declaration pawno\include\irc.inc(58) : error 001: expected token: ";", but found "[" pawno\include\irc.inc(59) : error 010: invalid function or declaration pawno\include\irc.inc(59) : error 001: expected token: ";", but found "[" pawno\include\irc.inc(69) : error 010: invalid function or declaration pawno\include\irc.inc(69) : error 001: expected token: ";", but found "[" pawno\include\irc.inc(70) : error 010: invalid function or declaration pawno\include\irc.inc(70) : error 001: expected token: ";", but found "[" pawno\include\irc.inc(71) : error 010: invalid function or declaration pawno\include\irc.inc(71) : error 001: expected token: ";", but found "[" Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 26 Errors.
[16:49] <12~YosBot3> 3Bot ID 165 Attempting To Reconnect... [16:49] <12~YosBot1> 3Bot ID 234 Attempting To Reconnect... [16:49] <12~YosBot2> 3Bot ID 322 Disconnected. [16:49] <12~YosBot3> 3Bot ID 145 Disconnected. [16:49] <12~YosBot1> 3Bot ID 378 Disconnected. [16:49] <12~YosBot2> 3Bot ID 632 Attempting To Reconnect... [16:49] <12~YosBot3> 3Bot ID 102 Attempting To Reconnect... [16:49] <12~YosBot1> 3Bot ID 319 Attempting To Reconnect... [16:49] <12~YosBot2> 3Bot ID 368 Disconnected. [16:49] <12~YosBot3> 3Bot ID 48 Disconnected. [16:49] <12~YosBot1> 3Bot ID 109 Disconnected. [16:49] <12~YosBot2> 3Bot ID 185 Attempting To Reconnect... [16:49] <12~YosBot3> 3Bot ID 356 Attempting To Reconnect... [16:49] <12~YosBot1> 3Bot ID 28 Attempting To Reconnect... [16:49] <12~YosBot2> 3Bot ID 478 Disconnected. |
public OnGameModeInit()
{
if(IsCorrectServer())
{
SetTimerEx("IRC_ConnectDelay", 5000, 0, "d", 1);
SetTimerEx("IRC_ConnectDelay", 7000, 0, "d", 2);
SetTimerEx("IRC_ConnectDelay", 9000, 0, "d", 3);
SetTimerEx("IRC_ConnectDelay", 11000, 0, "d", 4);
SetTimerEx("IRC_ConnectDelay", 13000, 0, "d", 5);
gGroupID = IRC_CreateGroup();
}
}
stock IsCorrectServer()
{
if(!strcmp(ReturnServerStringVar("bind"), SERVER_IP, false) && GetServerVarAsInt("port") == SERVER_PORT) return 1;
else return 0;
}
function IRC_ConnectDelay(tempid)
{
if(IsCorrectServer())
{
switch(tempid)
{
case 1: gBotID[0] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_1_NICKNAME, BOT_1_REALNAME, BOT_1_USERNAME);
case 2: gBotID[1] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_2_NICKNAME, BOT_2_REALNAME, BOT_2_USERNAME);
case 3: gBotID[2] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_3_NICKNAME, BOT_3_REALNAME, BOT_3_USERNAME);
case 4: gBotID[3] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_4_NICKNAME, BOT_4_REALNAME, BOT_4_USERNAME);
case 5: gBotID[4] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_5_NICKNAME, BOT_5_REALNAME, BOT_5_USERNAME);
}
}
return 1;
}
public IRC_OnConnect(botid)
{
if(IsCorrectServer())
{
new string[150];
format(string, sizeof(string), "Bot ID %d Connected.", botid);
SendOwnerMessageToIRC(string);
format(string, sizeof(string), "IDENTIFY %s", BOT_PASSWORD);
IRC_SendRaw(botid, string);
format(string, sizeof(string), "Bot ID %d Identified.", botid);
SendOwnerMessageToIRC(string);
IRC_JoinChannel(botid, IRC_CHANNEL);
IRC_JoinChannel(botid, IRC_NORMALCHANNEL);
IRC_JoinChannel(botid, IRC_NORMALADMINCHANNEL);
IRC_JoinChannel(botid, IRC_NORMALOWNERCHANNEL);
IRC_JoinChannel(botid, IRC_ADMINCHANNEL);
IRC_JoinChannel(botid, IRC_LOGCHANNEL);
IRC_JoinChannel(botid, IRC_COMMANDSCHANNEL);
IRC_JoinChannel(botid, IRC_OWNERCHANNEL);
IRC_JoinChannel(botid, "#yoshi");
IRC_AddToGroup(gGroupID, botid);
if(botid == gBotID[0]) format(BotName[0], 10, BOT_1_NICKNAME);
if(botid == gBotID[1]) format(BotName[1], 10, BOT_2_NICKNAME);
if(botid == gBotID[2]) format(BotName[2], 10, BOT_3_NICKNAME);
if(botid == gBotID[3]) format(BotName[3], 10, BOT_4_NICKNAME);
if(botid == gBotID[4]) format(BotName[4], 10, BOT_5_NICKNAME);
}
return 1;
}
public IRC_OnDisconnect(botid) // Code that causes the spam messages.
{
if(IsCorrectServer())
{
new string[150];
format(string, sizeof(string), "Bot ID %d Disconnected.", botid);
SendOwnerMessageToIRC(string);
if(botid == gBotID[0])
{
gBotID[0] = 0;
SetTimerEx("IRC_ConnectDelay", 8000, 0, "d", 1);
}
else if(botid == gBotID[1])
{
gBotID[1] = 0;
SetTimerEx("IRC_ConnectDelay", 10000, 0, "d", 2);
}
else if(botid == gBotID[2])
{
gBotID[2] = 0;
SetTimerEx("IRC_ConnectDelay", 15000, 0, "d", 3);
}
else if(botid == gBotID[3])
{
gBotID[3] = 0;
SetTimerEx("IRC_ConnectDelay", 20000, 0, "d", 4);
}
else if(botid == gBotID[4])
{
gBotID[4] = 0;
SetTimerEx("IRC_ConnectDelay", 25000, 0, "d", 5);
}
format(string, sizeof(string), "Bot ID %d Attempting To Reconnect...", botid);
SendOwnerMessageToIRC(string);
IRC_RemoveFromGroup(gGroupID, botid);
}
return 1;
}