18.06.2014, 16:26
(
Последний раз редактировалось diego200052; 18.06.2014 в 17:43.
Причина: Title wrong
)
Hello, I have a problem. I have several objects and what I want is to detect if the player is close to any of these, so if you want to delete it detects about writing given command. But do not know what function to use.
These are the objects:
This is a idea for this but itґs wrong:
These are the objects:
pawn Код:
CreateObject(658, -1961.13904, -2321.01660, 35.81062, 0.00000, 0.00000, 0.00000);
CreateObject(658, -1983.18164, -2306.64307, 34.90852, 0.00000, 0.00000, 0.00000);
CreateObject(658, -2016.14282, -2264.51514, 37.59226, 0.00000, 0.00000, 7.86905);
CreateObject(658, -2048.39502, -2279.55054, 29.44491, 0.00000, 0.00000, 0.00000);
CreateObject(658, -2010.24060, -2343.55347, 29.67017, 0.00000, 0.00000, 0.00000);
CreateObject(658, -2004.06079, -2353.01538, 29.79223, 0.00000, 0.00000, 0.00000);
CreateObject(658, -2018.38208, -2329.69385, 29.27478, 0.00000, 0.00000, 0.00000);
CreateObject(658, -2029.36194, -2291.35181, 31.52319, 0.00000, 0.00000, 0.00000);
CreateObject(658, -2010.10254, -2297.05176, 35.42641, 0.00000, 0.00000, 0.00000);
CreateObject(658, -2030.45569, -2316.16797, 29.67047, 0.00000, 0.00000, 0.00000);
CreateObject(658, -1972.97534, -2354.68018, 30.07845, 0.00000, 0.00000, 0.00000);
CreateObject(658, -1970.45227, -2319.30591, 36.75357, 0.00000, 0.00000, 0.00000);
CreateObject(658, -2000.63892, -2310.16870, 34.11950, 0.00000, 0.00000, 0.00000);
CreateObject(658, -1990.44080, -2348.10059, 28.77349, 0.00000, 0.00000, 355.67593);
CreateObject(658, -1952.77271, -2400.87695, 29.12618, 0.00000, 0.00000, 0.00000);
CreateObject(658, -1956.66724, -2379.96997, 29.67839, 0.00000, 0.00000, 342.11761);
CreateObject(658, -1981.88892, -2367.93970, 29.17725, 0.00000, 0.00000, 0.00000);
CreateObject(658, -1977.55750, -2341.85132, 32.61460, 0.00000, 0.00000, 0.00000);
CreateObject(658, -1966.56409, -2341.48047, 33.16028, 0.00000, 0.00000, 359.12994);
CreateObject(658, -2014.80310, -2273.52222, 36.46095, 0.00000, 0.00000, 0.00000);
CreateObject(658, -2015.66284, -2244.74072, 42.63517, 0.00000, 0.00000, 6.45304);
CreateObject(658, -2023.14612, -2311.52051, 30.44014, 0.00000, 0.00000, 0.00000);
CreateObject(658, -1962.60889, -2298.47485, 39.00406, 0.00000, 0.00000, 0.00000);
CreateObject(658, -1987.55054, -2321.47803, 33.79900, 0.00000, 0.00000, 296.59744);
CreateObject(658, -1947.30542, -2354.70630, 31.02817, 0.00000, 0.00000, 353.11136);
CreateObject(658, -2011.85620, -2317.49365, 30.58669, 0.00000, 0.00000, 0.00000);
CreateObject(658, -2052.63354, -2296.35742, 29.33584, 0.00000, 0.00000, 0.00000);
CreateObject(658, -2001.45227, -2328.94556, 30.92533, 0.00000, 0.00000, 0.27184);
CreateObject(658, -1951.45557, -2336.34741, 34.34032, 0.00000, 0.00000, 0.93685);
CreateObject(658, -1947.21790, -2389.20483, 28.84699, 0.00000, 0.00000, 3.86749);
CreateObject(658, -1986.71814, -2275.15576, 40.01451, 0.00000, 0.00000, 1.38093);
CreateObject(658, -1942.01318, -2380.26050, 29.53990, 0.00000, 0.00000, 0.00000);
CreateObject(658, -1950.86914, -2307.78613, 39.93758, 0.00000, 0.00000, 0.00000);
CreateObject(658, -1933.43591, -2367.24683, 30.39913, 0.00000, 0.00000, 0.00000);
CreateObject(658, -2040.30103, -2260.92065, 31.16879, 0.00000, 0.00000, 2.20797);
CreateObject(658, -1988.83240, -2288.22144, 36.72249, 0.00000, 0.00000, 359.48987);
CreateObject(658, -1958.64819, -2361.60986, 29.93515, 0.00000, 0.00000, 0.00000);
CreateObject(658, -1951.81140, -2372.82495, 30.10171, 0.00000, 0.00000, 354.98141);
CreateObject(658, -2013.98291, -2254.87061, 40.94287, 0.00000, 0.00000, 356.74564);
CreateObject(658, -1978.14734, -2380.29199, 29.60982, 0.00000, 0.00000, 359.27863);
CreateObject(658, -1936.52637, -2338.55688, 33.01614, 0.00000, 0.00000, 0.00000);
CreateObject(658, -1965.27087, -2327.74609, 34.86839, 0.00000, 0.00000, 0.00000);
CreateObject(658, -1920.58337, -2266.72681, 59.31048, 0.00000, 0.00000, 0.00000);
pawn Код:
new Float:x,Float:y,Float:z;
GetObjectPos(objectid,x,y,z);
if(IsPlayerInRangeOfPoint(playerid, 5.0,x,y,z))