[Help] Foreach
#5

Код:
ProxDetectorS(Float:radi, playerid, targetid)
{
    if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
	{
	    if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(targetid))
		{
			new Float:posx,
			    Float:posy,
				Float:posz,
			    Float:oldposx,
				Float:oldposy,
				Float:oldposz,
			    Float:tempposx,
				Float:tempposy,
				Float:tempposz;

			GetPlayerPos(playerid, oldposx, oldposy, oldposz);

			GetPlayerPos(targetid, posx, posy, posz);
			tempposx = (oldposx -posx);
			tempposy = (oldposy -posy);
			tempposz = (oldposz -posz);

			if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
			{
				return 1;
			}
		}
	}
	return 0;
}
Reply


Messages In This Thread
[Help] Foreach - by RooK1e - 28.11.2013, 20:31
Re: [Help] Foreach - by Lynet - 28.11.2013, 20:35
Re: [Help] Foreach - by RooK1e - 28.11.2013, 20:38
Re: [Help] Foreach - by Jstylezzz - 28.11.2013, 20:42
Re: [Help] Foreach - by RooK1e - 28.11.2013, 21:26
Re: [Help] Foreach - by Joe_Goro - 28.11.2013, 21:30

Forum Jump:


Users browsing this thread: 1 Guest(s)