Checking if object is in a specific area?
#2

pawn Код:
stock IsObjectInArea(objectid, Float: minx, Float: maxx, Float: miny, Float: maxy) {
    new Float: X, Float: Y, Float: Z;
    GetObjectPos(objectid, X, Y, Z);
    return (X >= minx && X <= maxx && Y >= miny && Y <= maxy);
}
untested.
Reply


Messages In This Thread
Checking if object is in a specific area? - by davve95 - 02.03.2014, 16:43
Re: Checking if object is in a specific area? - by fordawinzz - 02.03.2014, 16:45
Re: Checking if object is in a specific area? - by davve95 - 02.03.2014, 21:53
Re: Checking if object is in a specific area? - by Threshold - 03.03.2014, 06:00
Re: Checking if object is in a specific area? - by Threshold - 03.03.2014, 09:55
Re: Checking if object is in a specific area? - by davve95 - 03.03.2014, 17:48
Re: Checking if object is in a specific area? - by Threshold - 04.03.2014, 11:37
Re: Checking if object is in a specific area? - by davve95 - 04.03.2014, 15:02

Forum Jump:


Users browsing this thread: 1 Guest(s)