Word Wrapping (Chat Extension)
#5

Quote:
Originally Posted by Troydere
Посмотреть сообщение
Hook the SendClientMessage function to (or make) a new function, check for the lenght of the string, if its more than the limit, cut it and send the rest in a separate SendClientMessage function

*insert links here*

Have fun.
I'm only commenting here because coding doesn't need to be overly complicated, a function like the one below which is pretty simple to understand will work just fine without much issue.

I'm not going to spoonfeed you code though, look up how to incorporate this into your script yourself.

pawn Код:
SendSplitMessage ( playerid, color, text [] ) {

    new string [ 144 ] ;

    if ( strlen ( text ) > 100 ) {

        format ( string, sizeof ( string ), "%.100s ...", text ) ;
        SendClientMessage(playerid, color, string ) ;
       
        format ( string, sizeof ( string ), "... %s", text [ 100 ] ) ;
        SendClientMessage(playerid, color, string ) ;
    }

    else return SendClientMessage(playerid, color, text ) ;

    return true ;
}
Quote:
Originally Posted by sampEv0
Посмотреть сообщение
I included it, doesn't seem to be doing anything. Is there anything else I need to do?
You should probably learn the basics of scripting first. If you don't know how, scripting probably isn't for you. As a scripter you should be able to look up things, figure out yourself where to get started and start reading things literally.

Good luck, but don't expect to be helped much if you're not gonna work for it yourself.
Reply


Messages In This Thread
Text Wrapping (solved) - by sampEv0 - 28.03.2017, 22:44
Re: Word Wrapping (Chat Extension) - by Toroi - 28.03.2017, 23:06
Re: Word Wrapping (Chat Extension) - by Spmn - 28.03.2017, 23:36
Re: Word Wrapping (Chat Extension) - by sampEv0 - 28.03.2017, 23:41
Re: Word Wrapping (Chat Extension) - by Dignity - 29.03.2017, 00:11
Re: Word Wrapping (Chat Extension) - by sampEv0 - 29.03.2017, 00:23

Forum Jump:


Users browsing this thread: 1 Guest(s)