What's wrong with my script
#3

Код:
forward ProxDetectorV(Float:radi, playerid, vehicleid);
public ProxDetectorV(Float:radi, playerid, vehicleid)
{
    if(IsPlayerConnected(playerid))
	{
		new Float:posx, Float:posy, Float:posz;
		new Float:oldposx, Float:oldposy, Float:oldposz;
		new Float:tempposx, Float:tempposy, Float:tempposz;
		GetPlayerPos(playerid, oldposx, oldposy, oldposz);
		//radi = 2.0; //Trigger Radius
		GetVehiclePos(vehicleid, posx, posy, posz);
		tempposx = (oldposx -posx);
		tempposy = (oldposy -posy);
		tempposz = (oldposz -posz);
		//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
		if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
		{
			return 1;
		}
	}
	return 0;
}
Reply


Messages In This Thread
What's wrong with my script - by sekol - 20.08.2010, 14:24
Re: What's wrong with my script - by Carlton - 20.08.2010, 15:23
Re: What's wrong with my script - by sekol - 20.08.2010, 15:29

Forum Jump:


Users browsing this thread: 1 Guest(s)