Is this efficient or not?
#1

My first piece of code i did without looking anything up, is this efficient?


Код:
forward SendLocalMessage(playerid, color, message[]);
public SendLocalMessage(playerid, color, message[])
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
	    new Float:x, Float:y, Float:z;
	    GetPlayerPos(playerid, x, y, z);
	    
	    if(IsPlayerInRangeOfPoint(i, 10.0, x, y, z))
	    {
	        SendClientMessage(i, color, message);
	    }
	}
	return 1;
}
Reply


Messages In This Thread
Is this efficient or not? - by Sellize - 11.07.2013, 10:32
Re: Is this efficient or not? - by ikey07 - 11.07.2013, 10:34
Re: Is this efficient or not? - by DobbysGamertag - 11.07.2013, 10:34
Re: Is this efficient or not? - by Macluawn - 11.07.2013, 10:42

Forum Jump:


Users browsing this thread: 1 Guest(s)