/me Long
#1

Hello
I do not understand what the problem and after a few stops writing characters can someone please change me the command to do that if I run out of line it will open another line thanks to helpers


PHP код:
command(meplayeridparams[]) {
    new
        
string[128];
    if(
isnull(params))
    {
        return 
SendClientMessage(playeridWHITE"SYNTAX: /me [action]");
    }
    if(
Player[playerid][pMask] == 1)
    {
        
format(stringsizeof(string), "*[Mask_%d] %s"Player[playerid][MaskRandom], params);
    }
    else
    {
        
format(stringsizeof(string), "* %s %s"RemoveUnderScore(playerid), params);
    }
    
NearByMessage(playeridCOLOR_PURPLEstring);
    
Player[playerid][MeActions]++;
    return 
1;

Reply
#2

pawn Код:
command(me, playerid, params[]) {
    new
        string[200];

    if(isnull(params))
    {
        return SendClientMessage(playerid, WHITE, "SYNTAX: /me [action]");
    }
    if(Player[playerid][pMask] == 1)
    {
        format(string, sizeof(string), "*[Mask_%d] %s", Player[playerid][MaskRandom], params);
    }
    else
    {
        format(string, sizeof(string), "* %s %s", RemoveUnderScore(playerid), params);
    }
    NearByMessage(playerid, COLOR_PURPLE, string);
    Player[playerid][MeActions]++;
    return 1;
}
Reply
#3

but I mean, if you write 150 words this example will open another line you could write another 150 words
Reply
#4

Add this on the line after NearByMessage:

pawn Код:
if(strlen(params) > 128)
{
    format(string, sizeof(string), "%s", params[128]);
    NearByMessage...
}
Reply
#5

can you re write the commands please
Reply
#6

bump
Reply
#7

All he's saying is this:

Код:
NearByMessage(playerid, COLOR_PURPLE, string); 
if(strlen(params) > 128)
{
    format(string, sizeof(string), "%s", params[128]);
    NearByMessage...
}
Player[playerid][MeActions]++;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)