All pastes #959575 Raw Edit

Unbenannt

public text v1 · immutable
#959575 ·published 2008-03-27 15:21 UTC
rendered paste body
/* SOMEWHERE IN TOP OF SCRIPT */
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);

/* SOMEWHERE IN SCRIPT (NOT IN A FUNCTION!!!!!!!!!!!!!!!!!!!!!) */
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
	{
	new Float:oldposx, Float:oldposy, Float:oldposz;
	new Float:tempposx, Float:tempposy, Float:tempposz;
	GetPlayerPos(playerid, oldposx, oldposy, oldposz);
	tempposx = (oldposx -x);
	tempposy = (oldposy -y);
	tempposz = (oldposz -z);
	if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
	{
		return 1;
	}
	return 0;
}