Using @ to chat
#1

I've searched around for this but to no avail.

I want to create a feature that allows you to send a message using a symbol (for example @ or #), like this:

Typing
Код:
@Hello!
would appear as
Код:
-CHAT- Hello!
in the chat.

Basically the @ or # would be used as a command, as if it were /chat. How would I go about this?
Reply
#2

I think this will help you
https://sampforum.blast.hk/showthread.php?tid=134865
Reply
#3

pawn Код:
if(text[0] == '#')
    {
        GetPlayerName(playerid,sendername,sizeof(sendername));

        format(string, sizeof(string), "CHAT:%s (%d): %s", sendername, playerid, text[1]);
        SendClientMessage(COLOR_WHITE, string);
       
        printf("%s: %s",sendername, text[1]);
        return 0;
    }
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)