09.08.2011, 02:03
(
Последний раз редактировалось Amel_PAtomAXx; 26.08.2011 в 16:31.
)
Hi
This is my first tutorial
This is my first tutorial
Make New chat:
This is really easy
First put this at the top of your script:This is really easy
pawn Код:
#include <a_samp>
pawn Код:
new NewChat;
pawn Код:
public OnGameModeInit()
{
NewChat = 1; // this will active new chat
return 1;
}
pawn Код:
public OnPlayerText(playerid,text[])
{
if(NewChat == 1) // if chat is actived
{
new pName[MAX_PLAYER_NAME],str[128];
GetPlayerName(playerid,pName,sizeof(pName)); // getting player name
format(str,sizeof(str),"** %s (%d) :(( %s ))",pName,playerid,text); // i hope you know how to use this 'format'
SendClientMessageToAll(0xFFFFFFFF,str); // sends message to all players , you can change colors
return 0;
}
return 1;
}
you can make a chat versions like this :
pawn Код:
format(str,sizeof(str),"%s says : %s ",pName,text); // in this format chat will be like this example '' Patomaxx says : Whats up''
pawn Код:
format(str,sizeof(str),"%s (( %s )) ",text,pName); // example ''Whats up (( Patomaxx ))''
pawn Код:
format(str,sizeof(str),"** (%d) Says: %s ",playerid,text); // example ''(16) Says: Whats up''
pawn Код:
format(str,sizeof(str),"{ffffff} %s Says : {ff0000}%s",pName,text); // Player name will be white color and his text will be red color