how chack distance - 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: how chack distance (
/showthread.php?tid=570978)
how chack distance -
Karolukas123 - 15.04.2015
Hi. if i use
}
stock SukuriameKioskelius(Float
, Float:y, Float:z, Float:rx, Float:ry, Float:rz)
{
CreateDynamicObject(1340, x, y, z, rx, ry, rz);
}
how to get distance for what object ?? I need press alt and script start. I try use: if(IsPlayerInRangeOfPoint(2.0, SukuriameKioskelius))
Re: how chack distance -
SickAttack - 15.04.2015
Assign an ID to the object and get the position of such object, then compare the player's position with the object's position within a defined range.
pawn Код:
new object = CreateDynamicObject(...);
https://sampwiki.blast.hk/wiki/GetObjectPos
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint