Help 2 things
#10

pawn Код:
#include <a_samp>

// some color defines, all the colors have to be like this
#define C_RED           "{AA3333}"
#define C_GREEN         "{33AA33}"
#define C_YELLOW        "{FFFF00}"
#define C_BLUE          "{0000BB}"

public OnPlayerText(playerid, text[])
{
    new
        pName[24],
        pText[128]; // creating some variables which we will need

    GetPlayerName( playerid, pName, sizeof pName ); // getting the player name and storing it in pName
   
    format( pText, sizeof pText, ""C_BLUE"%s"C_YELLOW"(%i): "C_RED"%s", pName, playerid, text[0] ); // formatting the pText, to change the colors just change the "C_BLUE", "C_YELLOW" etc
   
    SendClientMessage( playerid, GetPlayerColor( playerid ), pText ); // sending the message
    return 0; // so it wont send the standart message
}
Reply


Messages In This Thread
Help 2 things - by Dan_Barocu - 03.01.2012, 15:13
Re: Help 2 things - by #Pwn. - 03.01.2012, 15:14
Re: Help 2 things - by Dan_Barocu - 03.01.2012, 15:16
Re: Help 2 things - by Casper001 - 03.01.2012, 15:18
Re: Help 2 things - by #Pwn. - 03.01.2012, 15:18
Re: Help 2 things - by Dan_Barocu - 03.01.2012, 15:20
Re: Help 2 things - by #Pwn. - 03.01.2012, 15:22
Re: Help 2 things - by Dan_Barocu - 03.01.2012, 15:23
Re: Help 2 things - by #Pwn. - 03.01.2012, 15:29
Re: Help 2 things - by Wesley221 - 03.01.2012, 15:39

Forum Jump:


Users browsing this thread: 2 Guest(s)