Hi!
I already tried to do it by myself ( I am a c++ programmer ) but I can't do it

->
I want the plugin ad_manager.sma to support advertisements with more than 1 line f.e. by using \n to start a new line.
Problem: Some people already asked the coder of the plugin but he doesn't add this function. He said he will rewrite the plugin but nothing happens.
This is the code of the output function. I think the only thing to do is a query to look up if the message contains a \n and if there is one in it to break the line at this point by splitting it in more messages (max 5).
Here is a C++ example. I hope its now not so much work for you.
PS: I have no idea if something like this.. ..I coded.. is possible!
Code:
//Here is the String with the complete Message
AnsiString Message="TEXT \n TEXT \n TEXT"
//Now there is a loop going as long as the message contains '\n'
while (Message.Pos("\n")==true){
//The Text from Letter 1 up to the '\n' is written in the Chat but you have to sort the '\n' out with -2!
SEND_TEXT_TO_PLAYERS(Message.SubString(1,Message.Pos("\n")-2));
//Delete the string from position 1 up to the '\n' with the '\n' so you dont need -2!
Message.delete(1,Message.Pos("\n"));
};
//The last line is not sent because there is no more '\n' is in the message!
SEND_TEXT_TO_PLAYERS(Message);
};
THX for help!
Code:
public displayAd(params[])
{
//Get the string that is going to be displayed
new message[128];
getString(STORE, params[1], message, 127, params[0], params[1]);
//If its enabled by cvar and id is set, display to person who triggered message only
if(get_cvar_num("ad_react_all") == 0 && params[2] != 0)
{
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, params[2]);
write_byte(params[2]);
write_string(message);
message_end();
} else
{
//Display the message to everyone
new plist[32], playernum, player;
get_players(plist, playernum, "c");
for(new i = 0; i < playernum; i++)
{
player = plist[i];
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, player);
write_byte(player);
write_string(message);
message_end();
}
}
return PLUGIN_HANDLED;
}
__________________