21.06.2011, 12:26
you mean something like this?
This code can be used in a roleplay... "Name says: text he says"
pawn Код:
public OnPlayerText(playerid, text[])
{
#define COLOR_MESSAGE 0xFFFF00AA
new pname[MAX_PLAYER_NAME]; GetPlayerName(playerid,pname,MAX_PLAYER_NAME);
new id;
new string[128];
new params[128];
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x, y, z);
if(IsPlayerInRangeOfPoint(id,10/*range around the player*/,x,y,z)) {
format(string,sizeof(string),"%s(%d) said: %s",pname,playerid,params);
SendClientMessage(id,COLOR_MESSAGE,string);
}
return 1;
}