get distance from object created ?
#1

Player can get distance from object created ? if yes how to

thank you for all answer
Reply
#2

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)
Reply
#3

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
Reply
#4

Thankyou Xabi & Battlezone i will test it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)