Problem with my OnPlayerText
#1

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.

Код:
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;
}
Reply


Messages In This Thread
Problem with my OnPlayerText - by CrazyManiac - 10.08.2012, 14:09
Re: Problem with my OnPlayerText - by shitbird - 10.08.2012, 14:13
Re: Problem with my OnPlayerText - by CrazyManiac - 10.08.2012, 14:15
Re: Problem with my OnPlayerText - by shitbird - 10.08.2012, 14:17
Re: Problem with my OnPlayerText - by JaKe Elite - 10.08.2012, 14:21
Re: Problem with my OnPlayerText - by shitbird - 10.08.2012, 14:23

Forum Jump:


Users browsing this thread: 1 Guest(s)