10.08.2012, 14:09
Hi. I just added my new OnPlayerText, and this is what it said in the chat when i type Hi: "Hi".
This is not a problem, but how i want it is: "[Local IC]: Hi''. I know it is an easy and simple thing, but
You would do me a big favour if you would help me. I tried to edit it, but i fail in those kinds of things.
Here's the code.
This is not a problem, but how i want it is: "[Local IC]: Hi''. I know it is an easy and simple thing, but
You would do me a big favour if you would help me. I tried to edit it, but i fail in those kinds of things.
Here's the code.
Код:
public OnPlayerText(playerid, text[])
{
new name[20];
GetPlayerName(playerid,name,20);
format(text,sizeof(text),"%s[ID:%d] : %s",name,playerid,text);
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
for(new i = 0;i<MAX_PLAYERS;++i)
{
if(IsPlayerInRangeOfPoint(i,5,X,Y,Z)) SendClientMessage(i,-1,text);
return 0;
}
return 1;
}

