CMD:b(playerid, params[])
{
if (PlayerData[playerid][LoggedIn] == 1 && PlayerData[playerid][Tutorial] == 20)
{
new SayString[128]; if (sscanf(params,"s",SayString)) return SendClientMessage(playerid, 0xFF0000AA,"USAGE: /b [Testo]");
new PlayerName[256]; GetPlayerName(playerid,PlayerName,MAX_PLAYER_NAME);
PlayerName = str_replace("_"," ",PlayerName);
if (PlayerData[playerid][Sex] == 0) format(SayString,sizeof(SayString),"{00FFFF}(( {0080FF}%s{00FFFF}: %s ))",PlayerName,SayString);
else if (PlayerData[playerid][Sex] == 1) format(SayString,sizeof(SayString),"{00FFFF}(( {FF00FF}%s{00FFFF}: %s ))",PlayerName,SayString);
SendClientMessageToAll(0xFFFFFFFF,SayString);
}
return 1;
}
Increase the 'SayString' array. (put it for example 256 characters)
|
#define MAX_CHARS_PER_LINE (80)
// Max characters per line.
#define FINAL_DOTS
// Remove it if you don't want dots for new lines.
stock BigMessage(playerid, colr, message[])
{
new len = strlen(message),
_iL = len / MAX_CHARS_PER_LINE;
if( ( len % MAX_CHARS_PER_LINE ) ) _iL++;
new _Line[MAX_CHARS_PER_LINE + 5];
new _:_i@Index;
while( _i@Index < _iL )
{
if( _i@Index == 0 )
strmid( _Line, message, ( _i@Index * MAX_CHARS_PER_LINE ), ( _i@Index * MAX_CHARS_PER_LINE ) + MAX_CHARS_PER_LINE );
else
strmid( _Line, message, ( _i@Index * MAX_CHARS_PER_LINE ), ( _i@Index * MAX_CHARS_PER_LINE ) + MAX_CHARS_PER_LINE );
#if defined FINAL_DOTS
if( _iL > 1 )
{
if( _i@Index == 0 )
{
format( _Line, sizeof _Line, "%s ...", _Line );
}
else if( _i@Index > 0 && ( _i@Index + 1 ) < _iL )
{
format( _Line, sizeof _Line, "... %s ...", _Line );
}
else
{
format( _Line, sizeof _Line, "... %s", _Line );
}
}
#endif
////////////
SendClientMessage(playerid, colr, _Line );
///////////
_i@Index++;
}
}
CMD:b(playerid, params[]) { if (PlayerData[playerid][LoggedIn] == 1 && PlayerData[playerid][Tutorial] == 20) { new SayString[128]; if (sscanf(params,"s[128]",SayString)) return SendClientMessage(playerid, 0xFF0000AA,"USAGE: /b [Testo]"); new PlayerName[MAX_PLAYER_NAME]; GetPlayerName(playerid,PlayerName,MAX_PLAYER_NAME); PlayerName = str_replace("_"," ",PlayerName); if (PlayerData[playerid][Sex] == 0) format(SayString,sizeof(SayString),"{00FFFF}(( {0080FF}%s{00FFFF}: %s ))",PlayerName,SayString); else if (PlayerData[playerid][Sex] == 1) format(SayString,sizeof(SayString),"{00FFFF}(( {FF00FF}%s{00FFFF}: %s ))",PlayerName,SayString); SendClientMessageToAll(0xFFFFFFFF,SayString); } return 1; }