little help REP+
#1

Can somone give me /me /do like this

* JakeHunter1 some action and if there isn't anyuff space for the words it continue in other line as /do ..

https://www.youtube.com/watch?v=JpdTNVp7b24 Like this ..
Reply
#2

Use strlen to get length of string, if string length is higher than 144 you need to cut it in smaller peaces, and at the end send message to client...


https://sampwiki.blast.hk/wiki/Strlen
https://sampwiki.blast.hk/wiki/Strmid
https://sampwiki.blast.hk/wiki/SendClientMessage
Reply
#3

For /do Command:

pawn Код:
CMD:do(playerid, params[]) {
    if(!isnull(params)) {
        new
            sString[128],
            pUser[MAX_PLAYER_NAME];

            GetPlayerName(playerid, pUser, MAX_PLAYER_NAME);

            format(sString, sizeof(sString), "* %s (( %s )) ", params, pUser);
            SendClientMessageToAll(COLOR_RED, sString);
        }
        else {
            return SendClientMessage(playerid, COLOR_WHITE, "Usage: /do <text>");
        }
    }
    return 1;
}
For /me command:

pawn Код:
COMMAND:me(playerid, params[])
{
    if(isnull(params)) return SendClientMessage(playerid, 0xFFFFFFFF, "/me [text]");
    new
        string[128],
        pNamer[MAX_PLAYER_NAME]
    ;
    GetPlayerName(playerid, pNamer, MAX_PLAYER_NAME);
    format(string, sizeof(string), "* %s (%d) %s *", pNamer, playerid, params);
    return SendClientMessageToAll(0xFFFFFFFF, string);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)