get distance from object created ? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: get distance from object created ? (
/showthread.php?tid=526286)
get distance from object created ? -
edwardluciano - 16.07.2014
Player can get distance from object created ? if yes how to
thank you for all answer
Respuesta: get distance from object created ? -
Xabi - 16.07.2014
Yes, you can get the object's position with GetObjectPos(objectid, &Float:X, &Float:Y, &Float:Z) and the, use the GetPlayerDistanceFromPoint(playerid, Float:X, Float:Y, Float:Z)
Re: get distance from object created ? -
Battlezone - 16.07.2014
pawn Код:
new Float:objx, Float:objy, Float:objz;
GetObjectPos(myobj, objx, objy, objz);
new Float:Distance;
Distance = GetPlayerDistanceFromPoint(playerid, objx, objy, objz);
Distance is the distance, not tested
Re: get distance from object created ? -
edwardluciano - 17.07.2014
Thankyou Xabi & Battlezone i will test it