SendClientMessage in seperate lines...
#1

Hey,
Firstly, SendFMessage:
pawn Код:
#define SendFMessage(%1,%2,%3,%4) do{new sendfstring[128];format(sendfstring,128,(%3),%4);SendClientMessage((%1), (%2) ,sendfstring);}while(false)
Ok, I have this:
pawn Код:
new ServerMSG[][] =
{
  "\n Found a bug? Or maybe grammar error?\n /report us now!\n You will get BiG ReWaRD!\n And.. Don't forget our website: %s ! \n",
  "\n Have a suggestion? \n Use /suggest to tell us, and get rewarded!\n And.. Don't forget our website: %s ! \n",
    "\n Stuck somewhere? Can't find something?\n Check for a /help or ask one of our friendly admins :) \n And.. Don't forget our website: %s ! \n"
};
and this timer:
pawn Код:
public ServerMSGS(playerid)
{
    new randMSG = random(sizeof(ServerMSG));
    SendFMessage(playerid,COLOR_SYSTEM, ServerMSG[randMSG],SITE_URL);
}
But it doesn't add new lines there \n character is.. i even tried \r\n but they works only if i'm printing it to console..
How can I add new lines, there \n in the array is?
P.S. On SendClientMessage it makes double space in the place there \n is
Reply
#2

You would have to format the line over the limit (12 then send another and by the way it's "false" not "flase", typo in your define.
Reply
#3

Quote:
Originally Posted by Donny
You would have to format the line over the limit (12 then send another and by the way it's "false" not "flase", typo in your define.
Oops.. "false" is ok in my gm.. just a typo in my post...
Can u explain me more about what you wrote... (my bad English... )
Reply
#4

If your message is greater than 128 characters long then split it up into two messages and send them both using the string functions such as strmid and format.
Reply
#5

Quote:
Originally Posted by Donny
If your message is greater than 128 characters long then split it up into two messages and send them both using the string functions such as strmid and format.
But I don't want to split it because it is longer than 128 characters... I want to split it into each line because it is nicer.. Isn't it possible to do that easier..? \n won't work in any way?
Reply
#6

Ok well split it then dude, I put 128 as an example as this is the output limit but if you want to split it at 17 or 36 or 84 then do so.

Look up 'strmid' on the wiki.
Reply
#7

Quote:
Originally Posted by Donny
Ok well split it then dude, I put 128 as an example as this is the output limit but if you want to split it at 17 or 36 or 84 then do so.

Look up 'strmid' on the wiki.
Going to look at that now... Hope it's easy..

P.S. http://forum.sa-mp.com/index.php?topic=107009.0
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)