Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- By Johurt, 2014/09/23
- */
- #define MAX_WATER_AREAS 303
- // not by default
- {-1088.00000, 2544.00000, -1040.00000, 2800.00000, -69.0, 40.5}, // not by default
- {-1040.00000, 2544.00000, -832.00000, 2760.00000, -69.0, 40.5}, // not by default
- {-1088.00000, 2416.00000, -832.00000, 2544.00000, -69.0, 40.5}, // not by default
- {-1040.00000, 2304.00000, -864.00000, 2416.00000, -69.0, 40.5}, // not by default
- {-1024.00000, 2144.00000, -864.00000, 2304.00000, -69.0, 40.5}, // not by default
- {-1072.00000, 2152.00000, -1024.00000, 2264.00000, -69.0, 40.5}, // not by default
- {-1200.00000, 2114.00000, -1072.00000, 2242.00000, -69.0, 40.5}, // not by default
- {-976.00000, 2016.00000, -848.00000, 2144.00000, -69.0, 40.5}, // not by default
- {-864.00000, 2144.00000, -448.00000, 2272.00000, -69.0, 40.5}, // not by default
- {-700.00000, 2272.00000, -484.00000, 2320.00000, -69.0, 40.5}, // not by default
- {-608.00000, 2320.00000, -528.00000, 2352.00000, -69.0, 40.5}, // not by default
- {-848.00000, 2044.00000, -816.00000, 2144.00000, -69.0, 40.5}, // not by default
- {-816.00000, 2060.00000, -496.00000, 2144.00000, -69.0, 40.5}, // not by default
- {-604.00000, 2036.00000, -484.00000, 2060.00000, -69.0, 40.5}, // not by default
- {2376.00000, -3000.00000, 3000.00000, -2688.00000, -69.0, 0.0},
- {2520.00000, -2688.00000, 3000.00000, -2560.00000, -69.0, 0.0},
- {-1328.00000, 2082.00000, -1200.00000, 2210.00000, -69.0, 40.5}, // not by default
- {-1400.00000, 2074.00000, -1328.00000, 2150.00000, -69.0, 40.5}, // not by default
- {-1248.00000, -144.00000, -992.00000, 208.00000, -69.0, 0.0},
- {-1176.00000, -432.00000, -992.00000, -144.00000, -69.0, 0.0},
- {-1792.00000, -592.00000, -1728.00000, -144.00000, -69.0, 0.0},
- {-1792.00000, 170.00000, -1600.00000, 274.00000, -69.0, 0.0},
- {-1600.00000, 168.00000, -1256.00000, 208.00000, -69.0, 0.0},
- {-1574.00000, -44.00000, -1550.00000, 108.00000, -69.0, 0.0},
- {1928.00000, -1222.00000, 2012.00000, -1178.00000, 16.0, 17.81}, // not by default
- {-464.00000, -1908.00000, -280.00000, -1832.00000, -69.0, 0.0},
- {2248.00000, -1182.00000, 2260.00000, -1170.00000, -99.0, -99.0}, // not used | interior
- {2292.00000, -1432.00000, 2328.00000, -1400.00000, 20.0, 21.97}, // not by default
- {1888.00000, 1468.00000, 2036.00000, 1700.00000, 0.0, 8.4}, // not by default
- {2090.00000, 1670.00000, 2146.00000, 1694.00000, -99.0, -99.0}, // not used
- {2110.00000, 1234.00000, 2178.00000, 1330.00000, 6.5, 7.64}, // not by default
- {2108.00000, 1084.00000, 2180.00000, 1172.00000, 6.5, 7.64}, // not by default
- {2506.00000, 1546.00000, 2554.00000, 1586.00000, 6.5, 8.77}, // not by default
- {1270.00000, -812.00000, 1290.00000, -800.00000, 85.0, 86.48}, // not by default
- {1084.00000, -684.00000, 1104.00000, -660.00000, 110.0, 111.81}, // not by default
- {502.00000, -1114.00000, 522.00000, -1098.00000, -99.0, -99.0}, // not used
- {214.00000, -1208.00000, 246.00000, -1180.00000, 72.0, 73.81}, // not by default
- {218.00000, -1180.00000, 238.00000, -1172.00000, 72.0, 73.81}, // not by default
- {178.00000, -1244.00000, 206.00000, -1216.00000, 76.0, 76.86}, // not by default
- {1744.00000, 2780.00000, 1792.00000, 2868.00000, -99.0, -99.0}, // not used
- {-2832.00000, 2888.00000, 3000.00000, 3000.00000, -69.0, 0.0},
- {-2778.00000, -522.00000, -2662.00000, -414.00000, -23.0, 2.6}, // not by default
- {1520.00000, -252.00000, 1572.00000, -208.00000, -69.0, 0.0},
- {2922.00000, 752.00000, 3000.00000, 2888.00000, -69.0, 0.0},
- {-3000.00000, -446.00000, -2910.00000, 354.00000, -69.0, 0.0},
- {-2434.00000, 2224.00000, -2294.00000, 2340.00000, -69.0, 0.0},
- {-2294.00000, 2224.00000, -2208.00000, 2312.00000, -69.0, 0.0},
- {2058.00000, 1868.00000, 2110.00000, 1964.00000, 7.4, 9.43}, // not by default
- {-3000.00000, 2942.00000, -2832.00000, 3000.00000, -69.0, 0.0},
- {-550.00000, 2004.00000, -494.00000, 2036.00000, -69.0, 40.5}, // not by default
- {-896.00000, 842.00000, -776.00000, 954.00000, -69.0, 0.0},
- {-2240.00000, 1336.00000, -2088.00000, 1432.00000, -69.0, 0.0},
- {-3000.00000, -822.00000, -2930.00000, -446.00000, -69.0, 0.0},
- {-2660.00000, 2224.00000, -2520.00000, 2264.00000, -69.0, 0.0},
- {-378.00000, -460.00000, -138.00000, -400.00000, -69.0, 0.0},
- {1836.00000, 1468.00000, 1888.00000, 1568.00000, 7.1, 8.4}, // not by default
- {890.00000, -1106.00000, 902.00000, -1098.00000, -99.0, -99.0}, // not used
- {1202.00000, -2414.00000, 1278.00000, -2334.00000, 0.0, 8.67}, // not by default
- {1072.00000, -2412.00000, 1128.00000, -2372.00000, -69.0, 0.0},
- {-848.00000, -2082.00000, -664.00000, -1866.00000, 2.2, 5.08}, // not by default
- {-664.00000, -1924.00000, -464.00000, -1864.00000, 2.2, 5.08}, // not by default
- {-1484.00000, 784.00000, -1424.00000, 840.00000, -69.0, 0.0},
- {-496.00000, 566.00000, -432.00000, 642.00000, -69.0, 0.0},
- {250.00000, 2808.00000, 818.00000, 2888.00000, -69.0, 0.0},
- {2502.00000, -2240.00000, 2670.00000, -2120.00000, -69.0, 0.0},
- {1270.00000, -780.00000, 1290.00000, -768.00000, -99.0, -99.0}, // not used | interior
- {88.00000, 544.00000, 120.00000, 572.00000, -69.0, 0.0},
- {1856.00000, -202.00000, 1888.00000, -158.00000, -69.0, 0.0},
- {-2048.00000, -962.00000, -2004.00000, -758.00000, -99.0, -99.0}, // not used
- {2564.00000, 2370.00000, 2604.00000, 2398.00000, 15.6, 16.2}, // not by default
- {-2522.00000, -310.00000, -2382.00000, -234.00000, -99.0, -99.0}, // not used
- {2872.00000, -2136.00000, 2888.00000, -2120.00000, -69.0, 0.0},
- {2760.00000, -2240.00000, 2776.00000, -2232.00000, -69.0, 0.0},
- {-912.00000, -150.02799, -717.08660, 208.00000, -69.0, 0.0},
- {-1728.00000, -222.00000, -1361.66967, 170.00000, -69.0, 0.0}
- };
- stock CoordsInWater(Float:x, Float:y, Float:z)
- {
- for(new w; w < MAX_WATER_AREAS; w++)
- {
- if(!(wAreas[w][4] == -99.0 && wAreas[w][5] == -99.0))
- {
- if((wAreas[w][0] <= x <= wAreas[w][2]) && (wAreas[w][1] <= y <= wAreas[w][3]) && (wAreas[w][4] <= z <= wAreas[w][5])) return 1;
- }
- }
- return 0;
- }
- stock ObjectInWater(type, objectid)
- {
- new Float:oPos[3];
- switch(type)
- {
- case 1: GetPlayerPos(objectid, oPos[0], oPos[1], oPos[2]);
- case 2: GetVehiclePos(objectid, oPos[0], oPos[1], oPos[2]);
- case 3: GetObjectPos(objectid, oPos[0], oPos[1], oPos[2]);
- //case 4: GetDynamicObjectPos(objectid, oPos[0], oPos[1], oPos[2]); // need Incognito streamer
- }
- for(new w; w < MAX_WATER_AREAS; w++)
- {
- if(!(wAreas[w][4] == -99.0 && wAreas[w][5] == -99.0))
- {
- if((wAreas[w][0] <= oPos[0] <= wAreas[w][2]) && (wAreas[w][1] <= oPos[1] <= wAreas[w][3]) && (wAreas[w][4] <= oPos[2] <= wAreas[w][5])) return 1;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement