How to split a /me up into 2 lines?
#1

This is my /me and /do script:

pawn Код:
public OnPlayerCommandText( playerid, cmdtext[ ] )
{
    if ( !strcmp( cmdtext, "/me", true, 3 ) )
    {
        if ( cmdtext[ 3 ] != ' ' || !cmdtext[ 4 ] )
            return SendClientMessage( playerid, -1, "USAGE: /me (action)" );

        new
            tempString[ 128 ],
            pName[ 24 ]
        ;

        GetPlayerName( playerid, pName, sizeof pName );

        format( tempString, sizeof tempString, "*%s%s", RemoveUnderScore(playerid), cmdtext[ 3 ] );

        SendClosestMessage( playerid, COLOR_PINK, tempString );

        return 1;
    }

    if ( !strcmp( cmdtext, "/do", true, 3 ) )
    {
        if ( cmdtext[ 3 ] != ' ' || !cmdtext[ 4 ] )
            return SendClientMessage( playerid, -1, "USAGE: /do (action)" );

        new
            tempString[ 128 ],
            pName[ 24 ]
        ;

        GetPlayerName( playerid, pName, sizeof pName );
        new stringpos;
        if (((stringpos = strfind(" ", pName))) != -1)
{
    pName[stringpos] = ' ';
}
        format( tempString, sizeof tempString, "* (( %s )) %s" , RemoveUnderScore(playerid), cmdtext[ 3 ] );

        SendClosestMessage( playerid, COLOR_PINK, tempString );

        return 1;
    }

    return 0;
}
How do I split the /me's and /do's up so that when they are too long, they go onto the 2nd line?
Reply


Messages In This Thread
How to split a /me up into 2 lines? - by Gramercy Riffs - 15.07.2011, 19:09
Re: How to split a /me up into 2 lines? - by [MG]Dimi - 15.07.2011, 21:19
Re: How to split a /me up into 2 lines? - by MoroDan - 15.07.2011, 21:23
Re: How to split a /me up into 2 lines? - by [MG]Dimi - 15.07.2011, 21:26
Re: How to split a /me up into 2 lines? - by MoroDan - 15.07.2011, 21:32
Re: How to split a /me up into 2 lines? - by Steven82 - 15.07.2011, 21:35
Re: How to split a /me up into 2 lines? - by =WoR=Varth - 16.07.2011, 01:09
Re: How to split a /me up into 2 lines? - by DRIFT_HUNTER - 16.07.2011, 02:25
Re: How to split a /me up into 2 lines? - by MoroDan - 16.07.2011, 07:32
Re: How to split a /me up into 2 lines? - by Gramercy Riffs - 16.07.2011, 20:19

Forum Jump:


Users browsing this thread: 4 Guest(s)