little help +1 rep
#8

Use this:
And like the man said above me, include de foreach function that you can find somewhere on the forum.
Код:
stock ProxDetector(Float:radi, playerid, string[],color)
{
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    foreach(Player,i)
    {
        if(!IsPlayerConnected(i))continue;
        if(IsPlayerInRangeOfPoint(i,radi,x,y,z)) SendClientMessage(i,color,string);
    }
}
stock GetName(playerid)
{
	new string[MAX_PLAYER_NAME];
	GetPlayerName(playerid,string,sizeof(string));
	strreplace(string,'_',' ');
	return string;
}
public OnPlayerText(playerid, text[])
{
	new str[128];
	format(string,sizeof(string),"%s says: %s",GetName(playerid),text;
	ProxDetector(30.0, playerid, str, COLOR_WHITE);
	return 0;
}
Reply


Messages In This Thread
little help +1 rep - by Alexy_Dramon - 19.03.2012, 07:58
Re: little help +1 rep - by ReneG - 19.03.2012, 08:05
Re: little help +1 rep - by Alexy_Dramon - 19.03.2012, 08:07
Re: little help +1 rep - by Alexy_Dramon - 19.03.2012, 11:00
Re: little help +1 rep - by Roel - 19.03.2012, 11:04
Re: little help +1 rep - by Alexy_Dramon - 19.03.2012, 11:31
Re: little help +1 rep - by .:Kaos:. - 19.03.2012, 11:33
Re: little help +1 rep - by Roel - 19.03.2012, 12:00

Forum Jump:


Users browsing this thread: 2 Guest(s)