Pickups functioning together! Help please
#1

Hey there.
So I used this MB filterscript >> https://sampforum.blast.hk/showthread.php?tid=273981
and the property system made by Sandra.
When both of these FSs are in my server.cfg and i start playing and go to buy any of the property, it suddenly says that i found the moneybag with.....
Sometimes it happens with royal casino's or four dragons casino's pickup. So i tried remove OnPlayerPickUpPickUp from property fs. It was only to give the information of property so i made it a 3DText above the pickup.
I still get that problem. Please help me to fix this out. Tell me what all I should post here to make you understand
Regards, Rohit
Reply
#2

Either or both of the scripts are handling OnPlayerPickUpPickup wrong.

I see in the Moneybag Filterscript, that the variable MoneyBagPickup is initialized with 0, which is a potentially a valid Pickup ID of another script.
So, while the Moneybag isn't created, it is possible to "collect" it by entering Pickup ID 0.

To fix this, initialize it with -1 or any other invalid value (at the very start of the script where the variable is declared, but also when the MoneyBag gets destroyed - whenever DestroyPickup is called, set MoneyBagPickup to -1 below it).

That should do it.
Reply
#3

Well thanks bro It worked.
I changed the MoneybagPickup to MoneybagPickup=-1
I didn't change anything in DestoyPickup.. if i should change something there then please tell that too
Currently I tried with 5 props which usually gave me the message you have found the Mb....no errors.

Thank you
Reply
#4

Wait, It didnt work fully!
Now once I find the MB and wait for the next one....it says "the moneybag has not been found yet....it is still hidden in ....."
Please tell me correctly where all i have to make changes.
Script is here :-
Quote:

#include <a_samp>

enum mbinfo
{
Float:XPOS,
Float:YPOS,
Float:ZPOS,
Position[50]
};

new Float:MBSPAWN[][mbinfo] =
{
// Positions, (X, Y, Z, Location)
{713.073852, 912.842224, -19.096578, "The Quarry"},
{688.145507, 844.974914, -28.631895, "The Quarry"},
{586.370788, 913.020202, -34.194843, "The Quarry"},
{503.419708, 970.914550, -24.997589, "The Quarry"},
{499.296356, 971.732788, -25.047336, "The Quarry"},
{458.502136, 891.120666, -27.374114, "The Quarry"},
{628.248901, 735.500732, -0.903092, "The Quarry"},
{627.924438, 1046.961303, 25.122577, "The Quarry"},
{792.460510, 915.044189, 20.112213, "The Quarry"},
{320.508636, 848.626281, 19.967500, "The Quarry"},
{623.156188, 892.809875, -41.102825, "The Quarry"},
{229.331573, 1478.390502, 10.151371, "Green Palms"},
{152.056015, 1447.338256, 10.156622, "Green Palms"},
{133.937881, 1377.117065, 10.158605, "Green Palms"},
{205.768768, 1352.408081, 10.151306, "Green Palms"},
{210.495468, 1395.340332, 10.151283, "Green Palms"},
{215.108322, 1467.936157, 14.921875, "Green Palms"},
{222.136520, 1424.068847, 10.585937, "Green Palms"},
{95.363838, 1831.129028, 17.205287, "Area 69"},
{189.325698, 1940.272949, 17.213102, "Area 69"},
{193.302978, 1940.295654, 17.212646, "Area 69"},
{261.569244, 1807.425537, 25.498508, "Area 69"},
{201.875762, 1873.929809, 12.774854, "Area 69"},
{238.924987, 1863.955078, 11.460937, "Area 69"},
{221.148391, 1822.212890, 7.531250, "Area 69"},
{245.811523, 1813.676025, 4.710937, "Area 69"},
{257.617523, 1819.045043, 1.007812, "Area 69"},
{280.195648, 1840.170532, 11.534780, "Area 69"},
{282.369171, 1874.492065, 8.757812, "Area 69"},
{266.978424, 1858.773071, 8.757812, "Area 69"},
{262.194854, 1886.633789, -30.390625, "Area 69"},
{268.940002, 1883.556152, -30.093750, "Area 69"},
{268.277374, 1891.600708, -12.862023, "Area 69"},
{268.972656, 1876.503906, -3.470956, "Area 69"},
{275.735778, 1892.228881, 8.437500, "Area 69"},
{246.438491, 1830.403930, 12.210659, "Area 69"},
{134.512237, 1952.987426, 18.978763, "Area 69"},
{-41.510822, 1178.722290, 18.961349, "Fort Carson"},
{2.213922, 1119.721435, 19.450517, "Fort Carson"},
{17.874195, 1076.159057, 19.804994, "Fort Carson"},
{-95.816307, 1164.927001, 19.312730, "Fort Carson"},
{-100.357772, 1127.539672, 19.323959, "Fort Carson"},
{-117.773254, 1132.638061, 19.326152, "Fort Carson"},
{-190.864791, 1218.766357, 19.306653, "Fort Carson"},
{-218.729446, 1147.502807, 19.328531, "Fort Carson"},
{-378.680541, 1103.303466, 19.314443, "Fort Carson"},
{-312.767395, 1175.458740, 19.307266, "Fort Carson"},
{-209.111099, 1216.520629, 23.436161, "Fort Carson"},
{-170.258102, 1176.971801, 24.155366, "Fort Carson"},
{-172.726379, 1182.572753, 26.504249, "Fort Carson"},
{-824.523559, 1444.919677, 13.547593, "Las Barrancas"},
{-811.227539, 1479.601074, 26.136028, "Las Barrancas"},
{-733.456970, 1553.795654, 39.189163, "Las Barrancas"},
{-737.410278, 1593.716186, 26.656929, "Las Barrancas"},
{-287.109222, 2687.127441, 65.852340, "Las Payasadas"},
{-268.482818, 2667.310546, 62.670055, "Las Payasadas"},
{-282.033843, 2651.087402, 67.323928, "Las Payasadas"},
{-235.506256, 2826.033935, 61.760990, "Las Payasadas"},
{123.295402, 2427.276123, 16.638261, "Verdant Meadows"},
{152.007369, 2417.473388, 19.140531, "Verdant Meadows"},
{209.578689, 2415.689697, 16.322700, "Verdant Meadows"},
{237.976455, 2432.690185, 16.626625, "Verdant Meadows"},
{276.434844, 2430.887695, 16.041940, "Verdant Meadows"},
{313.228027, 2415.748046, 19.511663, "Verdant Meadows"},
{154.106018, 2630.396240, 16.041749, "Verdant Meadows"},
{115.394462, 2631.614501, 15.986257, "Verdant Meadows"},
{104.371681, 2582.203613, 16.044742, "Verdant Meadows"},
{14.670138, 2560.055419, 15.932084, "Verdant Meadows"},
{9.903661, 2435.500732, 16.019382, "Verdant Meadows"},
{-2452.078125, 2438.356933, 14.555831, "Bayside"},
{-2417.809570, 2456.555908, 25.779113, "Bayside"},
{-2406.699462, 2469.222656, 12.183320, "Bayside"},
{-2415.591552, 2386.210205, 7.998282, "Bayside"},
{-2386.701904, 2398.892578, 8.845354, "Bayside"},
{-2407.274902, 2477.111816, 11.345425, "Bayside"},
{-2403.085449, 2553.951904, 23.601562, "Bayside"},
{-2286.216552, 2572.171142, 23.416145, "Bayside"},
{-2624.168212, 2245.396972, 6.268455, "Bayside"},
{-2551.672851, 2432.413330, 18.866594, "Bayside"},
{-2293.487060, 2225.002685, 4.982191, "Bayside"},
{-2578.585693, 2520.823730, 21.721471, "Bayside"},
{-2497.177978, 2455.601562, 17.332534, "Bayside"},
{-2299.505859, 2277.234619, 4.978750, "Bayside"},
{-2353.547119, 2430.278320, 7.510148, "Bayside"},
{377.058685, -126.040382, 1.282783, "Blueberry"},
{331.945190, -21.335258, 8.999382, "Blueberry"},
{270.666198, 25.962350, 7.423792, "Blueberry"},
{269.469726, -39.207118, 2.076274, "Blueberry"},
{249.126205, -55.748535, 2.778613, "Blueberry"},
{200.529525, -2.403444, 1.585840, "Blueberry"},
{79.888191, -172.170288, 3.240008, "Blueberry"},
{90.263679, -196.305435, 1.484375, "Blueberry"},
{307.548217, -256.133117, 1.583575, "Blueberry"},
{130.356811, -65.668479, 1.578125, "Blueberry"},
{201.947799, -107.787826, 1.552092, "Blueberry"},
{251.443710, -59.984920, 5.882812, "Blueberry"},
{338.868713, 39.111991, 6.514575, "Blueberry"},
{233.187500, 88.724472, 3.707660, "Blueberry"},
{271.035064, -325.480102, 4.109173, "Blueberry"},
{258.287322, -91.798759, 6.548583, "Blueberry"},
{660.309570, -515.073425, 22.836296, "Dillimore"},
{681.892456, -471.186981, 24.570465, "Dillimore"},
{720.187500, -460.116394, 23.195312, "Dillimore"},
{766.745727, -565.935180, 18.013334, "Dillimore"},
{766.601135, -565.742553, 18.013334, "Dillimore"},
{795.740600, -498.457305, 18.013332, "Dillimore"},
{806.729309, -644.110595, 16.335937, "Dillimore"},
{837.977600, -618.451599, 16.427936, "Dillimore"},
{697.977600, -502.530029, 20.336296, "Dillimore"},
{2252.387695, -71.207305, 31.594974, "Palimino Creek"},
{2256.675292, -51.222541, 33.039546, "Palimino Creek"},
{2280.761474, -43.499469, 33.915302, "Palimino Creek"},
{2331.433349, -16.148464, 29.984375, "Palimino Creek"},
{2307.091796, 42.845218, 26.484375, "Palimino Creek"},
{2312.534423, 81.270088, 34.412147, "Palimino Creek"},
{2237.241210, -146.453750, 25.870410, "Palimino Creek"},
{2294.017333, -133.607147, 28.153959, "Palimino Creek"},
{2290.864501, -125.560646, 31.281974, "Palimino Creek"},
{2494.198486, 84.268798, 26.484375, "Palimino Creek"},
{2522.718505, -35.541027, 27.843750, "Palimino Creek"},
{2371.754638, 166.031631, 28.441642, "Palimino Creek"},
{2521.830566, 147.489349, 26.660923, "Palimino Creek"},
{2503.659667, 138.658645, 26.476562, "Palimino Creek"},
{2385.197021, 132.599624, 26.477228, "Palimino Creek"},
{2497.073974, 73.162178, 26.484375, "Palimino Creek"},
{1113.000366, -298.941436, 79.273048, "Hilltop Farms"},
{1145.276123, -319.449951, 68.736564, "Hilltop Farms"},
{1139.270874, -279.303375, 68.293548, "Hilltop Farms"},
{1109.191650, -254.074951, 73.178703, "Hilltop Farms"},
{1074.967651, -290.027832, 76.994865, "Hilltop Farms"},
{1045.733276, -292.704284, 77.359375, "Hilltop Farms"},
{1017.502319, -291.644531, 77.359375, "Hilltop Farms"},
{1025.220092, -286.122772, 73.993080, "Hilltop Farms"},
{1008.152404, -361.344543, 73.992187, "Hilltop Farms"},
{1031.137329, -286.081237, 73.992187, "Hilltop Farms"},
{-91.739074, 47.309322, 3.117187, "Blueberry Acres"},
{-59.916896, 110.778358, 3.117187, "Blueberry Acres"},
{-21.062276, 101.820167, 3.117187, "Blueberry Acres"},
{-39.467891, 54.310203, 3.117187, "Blueberry Acres"},
{-57.822875, 58.630420, 12.634796, "Blueberry Acres"},
{6.610152, -116.727790, 0.827577, "Blueberry Acres"},
{-234.935729, -49.896484, 3.117187, "Blueberry Acres"},
{-396.805908, -1426.215209, 38.644241, "Flint Range"},
{-365.578216, -1413.950805, 29.640625, "Flint Range"},
{-364.751220, -1434.614501, 25.726562, "Flint Range"},
{-584.598876, -1482.920043, 11.257370, "Flint Range"},
{-558.555603, -1289.688232, 24.061843, "Flint Range"},
{-257.378387, -1502.086059, 6.142509, "Flint Range"},
{-329.254211, -1537.986083, 14.820620, "Flint Range"},
{-370.188598, -1416.738281, 25.726562, "Flint Range"},
{-468.467102, -1423.658813, 17.497291, "Flint Range"},
{-366.230377, -1425.508422, 36.910018, "Flint Range"},
{-438.425720, -1307.287841, 34.957294, "Flint Range"},
{-326.334747, -1312.265869, 9.666571, "Flint Range"},
{-2508.313232, -675.049499, 139.320312, "Missionary Hill"},
{-2528.568359, -700.439453, 141.788848, "Missionary Hill"},
{-2438.275146, -464.318084, 91.305053, "Missionary Hill"},
{-2543.994384, -783.435424, 69.258705, "Missionary Hill"},
{-2600.115478, -547.044921, 86.723999, "Missionary Hill"},
{-2322.930664, -655.598815, 107.419876, "Missionary Hill"},
{-2324.206054, -683.263916, 104.464118, "Missionary Hill"},
{-2394.915283, -468.217041, 87.153312, "Missionary Hill"},
{-2631.078613, -596.495971, 90.808830, "Missionary Hill"},
{-2432.825439, -391.364898, 69.389305, "Missionary Hill"},
{-2617.927001, -749.242065, 74.848922, "Missionary Hill"},
{-2175.949951, -2417.699218, 34.296875, "Angel Pine"},
{-2161.742919, -2453.351562, 37.592113, "Angel Pine"},
{-2147.736572, -2461.206787, 30.851562, "Angel Pine"},
{-2090.979492, -2469.472900, 33.924186, "Angel Pine"},
{-2053.039306, -2544.468261, 31.066806, "Angel Pine"},
{-2132.012939, -2433.635986, 39.040298, "Angel Pine"},
{-2182.593994, -2428.734375, 35.523437, "Angel Pine"},
{-2224.829833, -2396.499511, 35.533672, "Angel Pine"},
{-2243.295654, -2359.313720, 30.750513, "Angel Pine"},
{-1064.526367, -1202.956298, 136.825164, "The Farm"},
{-1073.703247, -1236.239135, 129.218750, "The Farm"},
{-960.019836, -969.289123, 136.249679, "The Farm"},
{-1178.073120, -1139.615356, 129.218750, "The Farm"},
{-1086.143554, -1304.293945, 129.218750, "The Farm"},
{-1099.003295, -971.934814, 129.218750, "The Farm"},
{-1062.486328, -913.190063, 129.211929, "The Farm"},
{-1004.356140, -1013.866821, 129.218750, "The Farm"},
{-1033.648925, -1068.210327, 129.218750, "The Farm"},
{-1019.635437, -1153.692138, 129.218750, "The Farm"},
{-1026.010375, -1183.257690, 129.218750, "The Farm"},
{-1007.072387, -1296.862426, 132.661285, "The Farm"},
{-1124.512817, -1222.314208, 129.218750, "The Farm"},
{-1087.444824, -1677.984130, 76.373939, "Leafy Hallows"},
{-1087.494018, -1678.885498, 76.373939, "Leafy Hallows"},
{-1091.211059, -1663.834472, 76.367187, "Leafy Hallows"},
{-1108.562622, -1634.623657, 80.057617, "Leafy Hallows"},
{-1078.178222, -1607.183349, 76.367187, "Leafy Hallows"},
{-1130.027343, -1606.987304, 76.367187, "Leafy Hallows"},
{-1112.752685, -1621.049194, 86.261589, "Leafy Hallows"},
{-1097.599121, -1627.398681, 76.367187, "Leafy Hallows"},
{-946.533935, -1746.916137, 76.381385, "Leafy Hallows"},
{-927.683105, -1701.916503, 77.025894, "Leafy Hallows"},
{-923.776733, -1757.801513, 75.444259, "Leafy Hallows"},
{-905.625366, -1730.898193, 78.139099, "Leafy Hallows"},
{-907.789489, -1669.016723, 92.697944, "Leafy Hallows"},
{2556.437744, -644.786804, 137.252746, "North Rock"},
{2514.413818, -716.559753, 101.872634, "North Rock"},
{2443.473388, -657.824401, 121.906684, "North Rock"},
{2612.934814, -497.000335, 78.922164, "North Rock"},
{2657.899414, -602.413452, 84.188896, "North Rock"},
{2683.218017, -516.679077, 65.786819, "North Rock"},
{2627.179199, -666.909179, 128.962661, "North Rock"},
{2759.122314, -633.098876, 60.327945, "North Rock"},
{2356.232910, -558.502868, 120.259140, "North Rock"},
{2558.949218, -523.134826, 86.272521, "North Rock"},
{-1012.700317, -754.431518, 32.007812, "Easter Bay Chemicals"},
{-1095.468139, -629.071044, 34.089599, "Easter Bay Chemicals"},
{-1109.042358, -601.289489, 34.089599, "Easter Bay Chemicals"},
{-1074.046508, -600.883239, 34.089599, "Easter Bay Chemicals"},
{-1112.463256, -748.833557, 32.007812, "Easter Bay Chemicals"},
{-996.942810, -720.715209, 35.937500, "Easter Bay Chemicals"},
{-987.252502, -716.223449, 35.901714, "Easter Bay Chemicals"},
{-1057.215332, -758.628417, 37.171875, "Easter Bay Chemicals"},
{-1127.549194, -701.471435, 32.007812, "Easter Bay Chemicals"},
{-973.345092, -635.038330, 32.007812, "Easter Bay Chemicals"},
{-1099.870605, -696.740661, 32.351562, "Easter Bay Chemicals"},
{-1057.206665, -634.323059, 35.493179, "Easter Bay Chemicals"},
{-1017.676330, -704.239746, 32.007812, "Easter Bay Chemicals"},
{-1525.973999, 2652.515136, 59.711399, "El Quebrados"},
{-1507.893920, 2626.360107, 59.233432, "El Quebrados"},
{-1470.498413, 2554.702636, 55.835937, "El Quebrados"},
{-1579.125488, 2641.298095, 55.835937, "El Quebrados"},
{-1521.946166, 2709.298339, 55.835937, "El Quebrados"},
{-828.082336, 2661.674560, 104.945419, "Valle Ocultado"},
{-835.934020, 2659.769775, 96.975189, "Valle Ocultado"},
{-831.431640, 2695.995361, 53.576766, "Valle Ocultado"},
{-803.072448, 2695.158203, 67.962074, "Valle Ocultado"},
{-799.726013, 2704.947265, 47.416099, "Valle Ocultado"},
{-788.210693, 2694.006103, 48.357761, "Valle Ocultado"},
{-384.209350, 2206.028564, 45.671134, "Ghost Town"},
{-417.697753, 2246.862548, 42.429687, "Ghost Town"},
{-384.358673, 2206.287841, 45.671134, "Ghost Town"},
{-375.438262, 2241.879882, 47.126880, "Ghost Town"},
{-371.937103, 2266.688964, 42.484375, "Ghost Town"},
{-395.177276, 2246.250000, 50.119434, "Ghost Town"},
{-324.652770, 2216.008789, 44.212184, "Ghost Town"},
{-439.359222, 2219.759033, 47.228851, "Ghost Town"},
{2057.4861, 1584.6555, 11.3860, "Las Venturas Strip"},
{1978.9744, 1341.9728, 12.1679, "The High Roller"},
{1952.7090, 1342.7772, 15.3672, "The High Roller"},
{1955.8152, 1343.6718, 10.8203, "The High Roller"},
{2000.8960, 1526.6355, 14.6172, "Pirate Ship LV"},
{2019.2856, 1933.6051, 12.3413, "The Visage"},
{1990.0363, 1804.0670, 11.9658, "The Visage"},
{1884.6063, 1916.0862, 121.3125, "The Visage"},
{1964.7000, 1918.6570, 130.9375, "The Visage"},
{2004.7155, 1985.7189, 121.3125, "The Visage"},
{2001.4707, 1854.2504, 122.0156, "The Visage"},
{2001.9431, 1913.6509, 40.3516, "The Visage"},
{2118.4597, 2403.6187, 23.6016, "Emerald Isle"},
{2195.2678, 2400.8367, 29.1528, "Emerald Isle"},
{2093.5798, 2416.2209, 74.5786, "Emerald Isle"},
{2059.2659, 2423.4236, 150.4766, "Emerald Isle"},
{2119.2192, 2379.5447, 10.8203, "Emerald Isle"},
{2070.9280, 2365.0264, 23.6016, "Emerald Isle"},
{2064.6958, 2424.1499, 41.1690, "Emerald Isle"},
{2117.9751, 2416.6057, 45.2188, "Emerald Isle"},
{2139.9512, 2291.1326, 11.7422, "Emerald Isle"},
{1902.9260, 2232.2266, 11.1250, "Mental Clinic LV"},
{1897.6128, 2197.0178, 18.4844, "Mental Clinic LV"},
{1874.5250, 2213.0166, 18.4844, "Mental Clinic LV"},
{1849.5913, 2232.1895, 11.1250, "Mental Clinic LV"},
{1863.6892, 2189.9202, 11.1250, "Mental Clinic LV"},
{1486.6572, 2229.5481, 11.8984, "Baseball Stadium LV"},
{1483.3932, 2238.3386, 11.8984, "Baseball Stadium LV"},
{1382.5701, 2184.2664, 11.0234, "Baseball Stadium LV"},
{1394.4053, 2166.0701, 9.7578, "Baseball Stadium LV"},
{1298.6896, 2112.0710, 11.0234, "Baseball Stadium LV"},
{1679.7852, 1745.1682, 10.8248, "LV Airport"},
{1638.6257, 1627.9901, 14.8222, "LV Airport"},
{1645.9849, 1633.1378, 14.8222, "LV Airport"},
{1604.2371, 1458.0471, 10.8278, "LV Airport"},
{1605.2430, 1164.9768, 10.8125, "LV Airport"},
{1318.7423, 1250.7267, 10.8203, "LV Airport"},
{1267.1241, 1350.0719, 10.8130, "LV Airport"},
{1042.4901, 1542.7211, 5.8203, "Dirt Ring"},
{1113.4955, 1596.2367, 12.5469, "Dirt Ring"},
{1072.3939, 1594.8151, 5.8203, "Dirt Ring"},
{1028.9910, 1676.6599, 5.8203, "Dirt Ring"},

{2100.4465, 1158.6725, 11.6484, "Come-A-Lot"},
{2188.3101, 1122.2263, 12.6538, "Come-A-Lot"},
{2152.0249, 1138.5919, 7.0128, "Come-A-Lot"},
{2098.6216, 1159.8179, 24.5625, "Come-A-Lot"},
{2246.0403, 1042.1655, 48.2188, "Come-A-Lot"},
{2237.6792, 1133.2946, 49.0947, "Come-A-Lot"},
{2311.0420, 1139.2097, 79.5546, "Come-A-Lot"},
{2177.1208, 1064.9799, 79.5547, "Come-A-Lot"},
{2197.7322, 1106.0377, 26.7065, "Come-A-Lot"},
{2270.7727, 1047.3269, 10.8203, "Come-A-Lot"},
{2219.7366, 1048.7021, 10.8203, "Come-A-Lot"},
{2226.0862, 1843.0712, 10.8203, "Clowns Pocket"},
{2135.7227, 1841.8491, 10.6797, "Clowns Pocket"},
{2300.6162, 1870.7238, 10.8203, "Clowns Pocket"},
{2329.3118, 1872.4010, 16.4524, "Clowns Pocket"},
{2203.7151, 1832.4640, 19.0567, "Clowns Pocket"},
{2238.2092, 1837.3932, 17.8902, "Clowns Pocket"},
{2329.2593, 1817.7518, 16.4524, "Clowns Pocket"},
{2196.0115, 1665.4771, 12.3672, "Caligulas's Casino"},
{2266.5854, 1678.5103, 94.9219, "Caligulas's Casino"},
{2265.7593, 1617.2131, 94.9219, "Caligulas's Casino"},
{2243.3774, 1628.7339, 49.5938, "Caligulas's Casino"},
{2230.4663, 1629.7500, 20.3906, "Caligulas's Casino"},
{2227.7048, 1606.6213, 20.3906, "Caligulas's Casino"},
{2143.6028, 1728.0526, 20.3906, "Caligulas's Casino"},
{2134.9475, 1722.2670, 11.0533, "Caligulas's Casino"},
{2115.4839, 1691.0475, 10.8203, "Caligulas's Casino"},
{2116.8125, 1683.0906, 13.0060, "Caligulas's Casino"},
{2172.4221, 1514.9611, 10.8203, "Royal Casino"},
{2092.7207, 1454.8622, 35.4844, "Royal Casino"},
{2148.4133, 1501.0938, 26.7913, "Royal Casino"},
{2178.3040, 1456.7284, 30.3955, "Royal Casino"},
{2327.6521, 1521.1895, 44.7217, "Car Parking LV"},
{2333.8774, 1384.5132, 42.8203, "Car Parking LV"},
{2320.7083, 1385.8893, 44.5375, "Car Parking LV"},
{2257.9063, 1395.9688, 43.9128, "Car Parking LV"},
{2625.9011, 1724.9092, 11.0234, "ChinaTown LV"},
{2622.9746, 1716.6317, 11.0234, "ChinaTown LV"},
{2624.9678, 1823.4618, 11.0161, "ChinaTown LV"},
{2591.3633, 1899.5321, 11.0312, "ChinaTown LV"},
{2606.5210, 1891.7266, 11.0234, "ChinaTown LV"},
{2547.4053, 1855.4878, 30.6641, "ChinaTown LV"},
{2521.4175, 1827.4315, 22.4558, "ChinaTown LV"},
{2631.0769, 1830.1805, 25.1286, "ChinaTown LV"},
{2675.5471, 1663.3021, 10.8203, "ChinaTown LV"},
{2675.5288, 1625.5670, 11.0234, "ChinaTown LV"},
{2663.8096, 1942.1663, 11.0234, "ChinaTown LV"},
{2556.9653, 2101.8018, 10.8153, "Ammunation LV"},
{2577.2847, 2081.2444, 10.8130, "Ammunation LV"},
{2548.7295, 2080.5671, 15.6720, "Ammunation LV"},
{2196.8867, 940.2357, 10.8203, "Ammunation LV"},
{2165.6108, 946.2772, 15.6720, "Ammunation LV"},
{2212.1873, 946.2212, 15.6720, "Ammunation LV"},
{2636.4355, 2328.5186, 10.9219, "V-Rock Hotel"},
{2580.9785, 2356.8162, 17.8203, "V-Rock Hotel"},
{2559.3376, 2288.4656, 11.0625, "V-Rock Hotel"},
{1457.0092, 2773.9827, 10.8203, "Golf Club LV"},
{1487.5740, 2773.8330, 10.8203, "Golf Club LV"},
{1492.9858, 2773.4377, 10.8203, "Golf Club LV"},
{1365.9622, 2752.9841, 10.8053, "Golf Club LV"},
{1249.6998, 2790.4336, 10.8203, "Golf Club LV"},
{1202.2843, 2799.1538, 10.8203, "Golf Club LV"},
{2020.5714, 1015.5516, 10.8203, "Four Dragons Casino"},
{1911.7770, 920.9877, 10.8203, "Four Dragons Casino"},
{1855.9120, 1058.2712, 10.8130, "Four Dragons Casino"},
{1984.4238, 1028.4452, 10.8203, "Four Dragons Casino"},
{-2153.603271, -793.245605, 31.976562, "Foster Valley"},
{-2065.419677, -811.472534, 32.171875, "Foster Valley"},
{-1964.095703, -726.187255, 37.390625, "Foster Valley"},
{-1970.476440, -729.316772, 37.682456, "Foster Valley"},
{-1971.316284, -729.375305, 38.024555, "Foster Valley"},
{-1975.518432, -881.348754, 35.289417, "Foster Valley"},
{-1949.256469, -866.676269, 32.226562, "Foster Valley"},
{-1893.254760, -884.175720, 31.968750, "Foster Valley"},
{-1939.472412, -792.035339, 32.226562, "Foster Valley"},
{-1944.139770, -744.467956, 32.226562, "Foster Valley"},
{-1938.702148, -702.345642, 32.171875, "Foster Valley"},
{-1912.550048, -715.325622, 32.158123, "Foster Valley"},
{-1890.561767, -715.974426, 32.171875, "Foster Valley"},
{-1314.880126, 2523.205566, 93.098388, "Aldea Malvada"},
{-1340.013183, 2566.662841, 92.453392, "Aldea Malvada"},
{-1342.981445, 2577.075195, 77.273002, "Aldea Malvada"},
{-1316.729370, 2595.577880, 73.072959, "Aldea Malvada"},
{-1300.144653, 2546.430664, 87.742187, "Aldea Malvada"},
{-1314.141967, 2528.084716, 87.613708, "Aldea Malvada"},
{-1369.994506, 2530.447753, 77.454376, "Aldea Malvada"},
{-1325.340332, 2516.338378, 87.046875, "Aldea Malvada"},
{-1324.558593, 2532.424560, 87.561912, "Aldea Malvada"},
{-1346.553466, 2565.318115, 80.643333, "Aldea Malvada"},
{-541.176086, -561.201354, 26.798007, "The Fallen Tree"},
{-504.101501, -539.727050, 25.523437, "The Fallen Tree"},
{-503.481170, -527.582458, 25.523437, "The Fallen Tree"},
{-475.996154, -552.346740, 33.121536, "The Fallen Tree"},
{-470.645874, -538.255004, 29.121538, "The Fallen Tree"},
{-466.353302, -468.697967, 25.523437, "The Fallen Tree"},
{-517.881530, -496.789825, 25.523437, "The Fallen Tree"},
{-620.473388, -472.812927, 25.523437, "The Fallen Tree"},
{-644.839599, -445.775238, 27.982749, "The Fallen Tree"},
{-586.403198, -398.734558, 24.491775, "The Fallen Tree"},
{-554.032104, -423.535186, 29.328639, "The Fallen Tree"},
{-488.099975, -449.957580, 42.387664, "The Fallen Tree"},
{-507.062316, -434.387115, 37.013797, "The Fallen Tree"},
{-615.139038, -531.275512, 37.525276, "The Fallen Tree"},
{-624.562072, -509.588043, 33.459438, "The Fallen Tree"},
{-531.809875, -467.091979, 26.224544, "The Fallen Tree"}
};

new Float:MoneyBagPos[3], MoneyBagFound=1, MoneyBagLocation[50], MoneyBagPickup, Timer[2];

//Hours, Minutes, Seconds, Milliseconds
#define MoneyBagDelay(%1,%2,%3,%4) (%1*3600000)+(%2*60000)+(%3*1000)+%4
//20 = 200,00 minimum 30 = 200,00 -> 500,00
#define MoneyBagCash ((random(40)+20)*1000)
//10 mins!
#define MB_DELAY MoneyBagDelay(0, 10, 0, 0)

public OnFilterScriptInit()
{
Timer[1] = SetTimer("MoneyBag", MB_DELAY, true);
return 1;
}

forward MoneyBag();
public MoneyBag()
{
new string[175];
if(!MoneyBagFound)
{
format(string, sizeof(string), "{FF9900}SERVER: The Money bag has not been found, it is still hidden in %s", MoneyBagLocation);
SendClientMessageToAll(-1, string);
}
else if(MoneyBagFound)
{
MoneyBagFound = -1;
new randombag = random(sizeof(MBSPAWN));
MoneyBagPos[0] = MBSPAWN[randombag][XPOS];
MoneyBagPos[1] = MBSPAWN[randombag][YPOS];
MoneyBagPos[2] = MBSPAWN[randombag][ZPOS];
format(MoneyBagLocation, sizeof(MoneyBagLocation), "%s", MBSPAWN[randombag][Position]);
format(string, sizeof(string), "{FF9900}SERVER: The Money Bag has been hidden somewhere near/in %s!", MoneyBagLocation);
SendClientMessageToAll(-1, string);
MoneyBagPickup = CreatePickup(1550, 2, MoneyBagPos[0], MoneyBagPos[1], MoneyBagPos[2], -1);
}
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if(IsPlayerAdmin(playerid))
{
if(!strcmp("/gotomb", cmdtext, true))
{
SetPlayerPos(playerid, MoneyBagPos[0], MoneyBagPos[1] +3, MoneyBagPos[2]);
return SendClientMessage(playerid, -1, "You have been {FF0000}teleported {FFFFFF}to the {33FF66}money bag");
}
if(!strcmp("/startmb", cmdtext, true)) return MoneyBag();
if(!strcmp("/togglemb", cmdtext, true))
{
if(Timer[0] == 0)
{
KillTimer(Timer[1]);
Timer[0] = 1;
SendClientMessage(playerid, -1, "Money bag turned {FF0000} off!");
return 1;
}
if(Timer[0] == 1)
{
Timer[1] = SetTimer("MoneyBag", MB_DELAY, true);
Timer[0] = 0;
SendClientMessage(playerid, -1, "Money bag turned {33FF66} on!");
return 1;
}
return 1;
}

}
if(!strcmp("/moneybag", cmdtext, true))
{
new string[150];
if(!MoneyBagFound) format(string, sizeof(string), "{FF9900}SERVER: The Money Bag has been hidden somewhere near/in %s!", MoneyBagLocation);
if(MoneyBagFound) format(string, sizeof(string), "**The {33FF66}Money Bag is {FF0000} not running!");
return SendClientMessage(playerid, -1, string);
}
return 0;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == MoneyBagPickup)
{
new string[180], pname[24], money = MoneyBagCash;
GetPlayerName(playerid, pname, 24);
format(string, sizeof(string), "{FF9900}SERVER: %s has found the money bag that had $%d inside, located near/in %s", pname, money, MoneyBagLocation);
MoneyBagFound = 0;
SendClientMessageToAll(-1, string);
DestroyPickup(MoneyBagPickup);
SendClientMessage(playerid, -1, "{FF9900}You have found the Money Bag!");
GivePlayerMoney(playerid, money);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
}
return 1;
}

Reply
#5

Guyss please help im not running MB script just bcoz of this error
PLease help :/
Reply
#6

PLEASE GUYS I WILL REP who gives me the correct solution :/
Reply
#7

The reason it's conflicting with your gamemode script is that you're combining streamer pickups with static pickups. Don't do that.

Let me explain this. The user either finds the Money Bag or does not, so that gives us two options. MoneyBagFound true (1) and false (0). Sounds fair. OK, now converting this to an if-statement would be similar to:
pawn Код:
if(MoneyBagFound) {
       format(string, sizeof(string), "**The {33FF66}Money Bag is {FF0000} not running!");
       // do something...
} else {
       format(string, sizeof(string), "{FF9900}SERVER: The Money Bag has been hidden somewhere near/in %s!", MoneyBagLocation);
       // do something...
}
Reply
#8

Quote:
Originally Posted by Dirki
Посмотреть сообщение
The reason it's conflicting with your gamemode script is that you're combining streamer pickups with static pickups. Don't do that.

Let me explain this. The user either finds the Money Bag or does not, so that gives us two options. MoneyBagFound true (1) and false (0). Sounds fair. OK, now converting this to an if-statement would be similar to:
pawn Код:
if(MoneyBagFound) {
       format(string, sizeof(string), "**The {33FF66}Money Bag is {FF0000} not running!");
       // do something...
} else {
       format(string, sizeof(string), "{FF9900}SERVER: The Money Bag has been hidden somewhere near/in %s!", MoneyBagLocation);
       // do something...
}
I've fixed the error once found the moneybag server kept saying money bag has not been found yet...and it didn't change the location.However i fixed it.
Only error remaining is if i type /Moneybag it says moneybag is not running even if it is actually running ! :/
I tried copy pasting the above code but still in vein.

My code :-
Код:
#include <a_samp>

enum mbinfo
{
Float:XPOS,
Float:YPOS,
Float:ZPOS,
Position[50]
};

new Float:MBSPAWN[][mbinfo] =
{
// Positions, (X, Y, Z, Location)
{713.073852, 912.842224, -19.096578, "The Quarry"},
{688.145507, 844.974914, -28.631895, "The Quarry"},
{586.370788, 913.020202, -34.194843, "The Quarry"},
{503.419708, 970.914550, -24.997589, "The Quarry"},
{499.296356, 971.732788, -25.047336, "The Quarry"},
{458.502136, 891.120666, -27.374114, "The Quarry"},
{628.248901, 735.500732, -0.903092, "The Quarry"},
{627.924438, 1046.961303, 25.122577, "The Quarry"},
{792.460510, 915.044189, 20.112213, "The Quarry"},
{320.508636, 848.626281, 19.967500, "The Quarry"},
{623.156188, 892.809875, -41.102825, "The Quarry"},
{229.331573, 1478.390502, 10.151371, "Green Palms"},
{152.056015, 1447.338256, 10.156622, "Green Palms"},
{133.937881, 1377.117065, 10.158605, "Green Palms"},
{205.768768, 1352.408081, 10.151306, "Green Palms"},
{210.495468, 1395.340332, 10.151283, "Green Palms"},
{215.108322, 1467.936157, 14.921875, "Green Palms"},
{222.136520, 1424.068847, 10.585937, "Green Palms"},
{95.363838, 1831.129028, 17.205287, "Area 69"},
{189.325698, 1940.272949, 17.213102, "Area 69"},
{193.302978, 1940.295654, 17.212646, "Area 69"},
{261.569244, 1807.425537, 25.498508, "Area 69"},
{201.875762, 1873.929809, 12.774854, "Area 69"},
{238.924987, 1863.955078, 11.460937, "Area 69"},
{221.148391, 1822.212890, 7.531250, "Area 69"},
{245.811523, 1813.676025, 4.710937, "Area 69"},
{257.617523, 1819.045043, 1.007812, "Area 69"},
{280.195648, 1840.170532, 11.534780, "Area 69"},
{282.369171, 1874.492065, 8.757812, "Area 69"},
{266.978424, 1858.773071, 8.757812, "Area 69"},
{262.194854, 1886.633789, -30.390625, "Area 69"},
{268.940002, 1883.556152, -30.093750, "Area 69"},
{268.277374, 1891.600708, -12.862023, "Area 69"},
{268.972656, 1876.503906, -3.470956, "Area 69"},
{275.735778, 1892.228881, 8.437500, "Area 69"},
{246.438491, 1830.403930, 12.210659, "Area 69"},
{134.512237, 1952.987426, 18.978763, "Area 69"},
{-41.510822, 1178.722290, 18.961349, "Fort Carson"},
{2.213922, 1119.721435, 19.450517, "Fort Carson"},
{17.874195, 1076.159057, 19.804994, "Fort Carson"},
{-95.816307, 1164.927001, 19.312730, "Fort Carson"},
{-100.357772, 1127.539672, 19.323959, "Fort Carson"},
{-117.773254, 1132.638061, 19.326152, "Fort Carson"},
{-190.864791, 1218.766357, 19.306653, "Fort Carson"},
{-218.729446, 1147.502807, 19.328531, "Fort Carson"},
{-378.680541, 1103.303466, 19.314443, "Fort Carson"},
{-312.767395, 1175.458740, 19.307266, "Fort Carson"},
{-209.111099, 1216.520629, 23.436161, "Fort Carson"},
{-170.258102, 1176.971801, 24.155366, "Fort Carson"},
{-172.726379, 1182.572753, 26.504249, "Fort Carson"},
{-824.523559, 1444.919677, 13.547593, "Las Barrancas"},
{-811.227539, 1479.601074, 26.136028, "Las Barrancas"},
{-733.456970, 1553.795654, 39.189163, "Las Barrancas"},
{-737.410278, 1593.716186, 26.656929, "Las Barrancas"},
{-287.109222, 2687.127441, 65.852340, "Las Payasadas"},
{-268.482818, 2667.310546, 62.670055, "Las Payasadas"},
{-282.033843, 2651.087402, 67.323928, "Las Payasadas"},
{-235.506256, 2826.033935, 61.760990, "Las Payasadas"},
{123.295402, 2427.276123, 16.638261, "Verdant Meadows"},
{152.007369, 2417.473388, 19.140531, "Verdant Meadows"},
{209.578689, 2415.689697, 16.322700, "Verdant Meadows"},
{237.976455, 2432.690185, 16.626625, "Verdant Meadows"},
{276.434844, 2430.887695, 16.041940, "Verdant Meadows"},
{313.228027, 2415.748046, 19.511663, "Verdant Meadows"},
{154.106018, 2630.396240, 16.041749, "Verdant Meadows"},
{115.394462, 2631.614501, 15.986257, "Verdant Meadows"},
{104.371681, 2582.203613, 16.044742, "Verdant Meadows"},
{14.670138, 2560.055419, 15.932084, "Verdant Meadows"},
{9.903661, 2435.500732, 16.019382, "Verdant Meadows"},
{-2452.078125, 2438.356933, 14.555831, "Bayside"},
{-2417.809570, 2456.555908, 25.779113, "Bayside"},
{-2406.699462, 2469.222656, 12.183320, "Bayside"},
{-2415.591552, 2386.210205, 7.998282, "Bayside"},
{-2386.701904, 2398.892578, 8.845354, "Bayside"},
{-2407.274902, 2477.111816, 11.345425, "Bayside"},
{-2403.085449, 2553.951904, 23.601562, "Bayside"},
{-2286.216552, 2572.171142, 23.416145, "Bayside"},
{-2624.168212, 2245.396972, 6.268455, "Bayside"},
{-2551.672851, 2432.413330, 18.866594, "Bayside"},
{-2293.487060, 2225.002685, 4.982191, "Bayside"},
{-2578.585693, 2520.823730, 21.721471, "Bayside"},
{-2497.177978, 2455.601562, 17.332534, "Bayside"},
{-2299.505859, 2277.234619, 4.978750, "Bayside"},
{-2353.547119, 2430.278320, 7.510148, "Bayside"},
{377.058685, -126.040382, 1.282783, "Blueberry"},
{331.945190, -21.335258, 8.999382, "Blueberry"},
{270.666198, 25.962350, 7.423792, "Blueberry"},
{269.469726, -39.207118, 2.076274, "Blueberry"},
{249.126205, -55.748535, 2.778613, "Blueberry"},
{200.529525, -2.403444, 1.585840, "Blueberry"},
{79.888191, -172.170288, 3.240008, "Blueberry"},
{90.263679, -196.305435, 1.484375, "Blueberry"},
{307.548217, -256.133117, 1.583575, "Blueberry"},
{130.356811, -65.668479, 1.578125, "Blueberry"},
{201.947799, -107.787826, 1.552092, "Blueberry"},
{251.443710, -59.984920, 5.882812, "Blueberry"},
{338.868713, 39.111991, 6.514575, "Blueberry"},
{233.187500, 88.724472, 3.707660, "Blueberry"},
{271.035064, -325.480102, 4.109173, "Blueberry"},
{258.287322, -91.798759, 6.548583, "Blueberry"},
{660.309570, -515.073425, 22.836296, "Dillimore"},
{681.892456, -471.186981, 24.570465, "Dillimore"},
{720.187500, -460.116394, 23.195312, "Dillimore"},
{766.745727, -565.935180, 18.013334, "Dillimore"},
{766.601135, -565.742553, 18.013334, "Dillimore"},
{795.740600, -498.457305, 18.013332, "Dillimore"},
{806.729309, -644.110595, 16.335937, "Dillimore"},
{837.977600, -618.451599, 16.427936, "Dillimore"},
{697.977600, -502.530029, 20.336296, "Dillimore"},
{2252.387695, -71.207305, 31.594974, "Palimino Creek"},
{2256.675292, -51.222541, 33.039546, "Palimino Creek"},
{2280.761474, -43.499469, 33.915302, "Palimino Creek"},
{2331.433349, -16.148464, 29.984375, "Palimino Creek"},
{2307.091796, 42.845218, 26.484375, "Palimino Creek"},
{2312.534423, 81.270088, 34.412147, "Palimino Creek"},
{2237.241210, -146.453750, 25.870410, "Palimino Creek"},
{2294.017333, -133.607147, 28.153959, "Palimino Creek"},
{2290.864501, -125.560646, 31.281974, "Palimino Creek"},
{2494.198486, 84.268798, 26.484375, "Palimino Creek"},
{2522.718505, -35.541027, 27.843750, "Palimino Creek"},
{2371.754638, 166.031631, 28.441642, "Palimino Creek"},
{2521.830566, 147.489349, 26.660923, "Palimino Creek"},
{2503.659667, 138.658645, 26.476562, "Palimino Creek"},
{2385.197021, 132.599624, 26.477228, "Palimino Creek"},
{2497.073974, 73.162178, 26.484375, "Palimino Creek"},
{1113.000366, -298.941436, 79.273048, "Hilltop Farms"},
{1145.276123, -319.449951, 68.736564, "Hilltop Farms"},
{1139.270874, -279.303375, 68.293548, "Hilltop Farms"},
{1109.191650, -254.074951, 73.178703, "Hilltop Farms"},
{1074.967651, -290.027832, 76.994865, "Hilltop Farms"},
{1045.733276, -292.704284, 77.359375, "Hilltop Farms"},
{1017.502319, -291.644531, 77.359375, "Hilltop Farms"},
{1025.220092, -286.122772, 73.993080, "Hilltop Farms"},
{1008.152404, -361.344543, 73.992187, "Hilltop Farms"},
{1031.137329, -286.081237, 73.992187, "Hilltop Farms"},
{-91.739074, 47.309322, 3.117187, "Blueberry Acres"},
{-59.916896, 110.778358, 3.117187, "Blueberry Acres"},
{-21.062276, 101.820167, 3.117187, "Blueberry Acres"},
{-39.467891, 54.310203, 3.117187, "Blueberry Acres"},
{-57.822875, 58.630420, 12.634796, "Blueberry Acres"},
{6.610152, -116.727790, 0.827577, "Blueberry Acres"},
{-234.935729, -49.896484, 3.117187, "Blueberry Acres"},
{-396.805908, -1426.215209, 38.644241, "Flint Range"},
{-365.578216, -1413.950805, 29.640625, "Flint Range"},
{-364.751220, -1434.614501, 25.726562, "Flint Range"},
{-584.598876, -1482.920043, 11.257370, "Flint Range"},
{-558.555603, -1289.688232, 24.061843, "Flint Range"},
{-257.378387, -1502.086059, 6.142509, "Flint Range"},
{-329.254211, -1537.986083, 14.820620, "Flint Range"},
{-370.188598, -1416.738281, 25.726562, "Flint Range"},
{-468.467102, -1423.658813, 17.497291, "Flint Range"},
{-366.230377, -1425.508422, 36.910018, "Flint Range"},
{-438.425720, -1307.287841, 34.957294, "Flint Range"},
{-326.334747, -1312.265869, 9.666571, "Flint Range"},
{-2508.313232, -675.049499, 139.320312, "Missionary Hill"},
{-2528.568359, -700.439453, 141.788848, "Missionary Hill"},
{-2438.275146, -464.318084, 91.305053, "Missionary Hill"},
{-2543.994384, -783.435424, 69.258705, "Missionary Hill"},
{-2600.115478, -547.044921, 86.723999, "Missionary Hill"},
{-2322.930664, -655.598815, 107.419876, "Missionary Hill"},
{-2324.206054, -683.263916, 104.464118, "Missionary Hill"},
{-2394.915283, -468.217041, 87.153312, "Missionary Hill"},
{-2631.078613, -596.495971, 90.808830, "Missionary Hill"},
{-2432.825439, -391.364898, 69.389305, "Missionary Hill"},
{-2617.927001, -749.242065, 74.848922, "Missionary Hill"},
{-2175.949951, -2417.699218, 34.296875, "Angel Pine"},
{-2161.742919, -2453.351562, 37.592113, "Angel Pine"},
{-2147.736572, -2461.206787, 30.851562, "Angel Pine"},
{-2090.979492, -2469.472900, 33.924186, "Angel Pine"},
{-2053.039306, -2544.468261, 31.066806, "Angel Pine"},
{-2132.012939, -2433.635986, 39.040298, "Angel Pine"},
{-2182.593994, -2428.734375, 35.523437, "Angel Pine"},
{-2224.829833, -2396.499511, 35.533672, "Angel Pine"},
{-2243.295654, -2359.313720, 30.750513, "Angel Pine"},
{-1064.526367, -1202.956298, 136.825164, "The Farm"},
{-1073.703247, -1236.239135, 129.218750, "The Farm"},
{-960.019836, -969.289123, 136.249679, "The Farm"},
{-1178.073120, -1139.615356, 129.218750, "The Farm"},
{-1086.143554, -1304.293945, 129.218750, "The Farm"},
{-1099.003295, -971.934814, 129.218750, "The Farm"},
{-1062.486328, -913.190063, 129.211929, "The Farm"},
{-1004.356140, -1013.866821, 129.218750, "The Farm"},
{-1033.648925, -1068.210327, 129.218750, "The Farm"},
{-1019.635437, -1153.692138, 129.218750, "The Farm"},
{-1026.010375, -1183.257690, 129.218750, "The Farm"},
{-1007.072387, -1296.862426, 132.661285, "The Farm"},
{-1124.512817, -1222.314208, 129.218750, "The Farm"},
{-1087.444824, -1677.984130, 76.373939, "Leafy Hallows"},
{-1087.494018, -1678.885498, 76.373939, "Leafy Hallows"},
{-1091.211059, -1663.834472, 76.367187, "Leafy Hallows"},
{-1108.562622, -1634.623657, 80.057617, "Leafy Hallows"},
{-1078.178222, -1607.183349, 76.367187, "Leafy Hallows"},
{-1130.027343, -1606.987304, 76.367187, "Leafy Hallows"},
{-1112.752685, -1621.049194, 86.261589, "Leafy Hallows"},
{-1097.599121, -1627.398681, 76.367187, "Leafy Hallows"},
{-946.533935, -1746.916137, 76.381385, "Leafy Hallows"},
{-927.683105, -1701.916503, 77.025894, "Leafy Hallows"},
{-923.776733, -1757.801513, 75.444259, "Leafy Hallows"},
{-905.625366, -1730.898193, 78.139099, "Leafy Hallows"},
{-907.789489, -1669.016723, 92.697944, "Leafy Hallows"},
{2556.437744, -644.786804, 137.252746, "North Rock"},
{2514.413818, -716.559753, 101.872634, "North Rock"},
{2443.473388, -657.824401, 121.906684, "North Rock"},
{2612.934814, -497.000335, 78.922164, "North Rock"},
{2657.899414, -602.413452, 84.188896, "North Rock"},
{2683.218017, -516.679077, 65.786819, "North Rock"},
{2627.179199, -666.909179, 128.962661, "North Rock"},
{2759.122314, -633.098876, 60.327945, "North Rock"},
{2356.232910, -558.502868, 120.259140, "North Rock"},
{2558.949218, -523.134826, 86.272521, "North Rock"},
{-1012.700317, -754.431518, 32.007812, "Easter Bay Chemicals"},
{-1095.468139, -629.071044, 34.089599, "Easter Bay Chemicals"},
{-1109.042358, -601.289489, 34.089599, "Easter Bay Chemicals"},
{-1074.046508, -600.883239, 34.089599, "Easter Bay Chemicals"},
{-1112.463256, -748.833557, 32.007812, "Easter Bay Chemicals"},
{-996.942810, -720.715209, 35.937500, "Easter Bay Chemicals"},
{-987.252502, -716.223449, 35.901714, "Easter Bay Chemicals"},
{-1057.215332, -758.628417, 37.171875, "Easter Bay Chemicals"},
{-1127.549194, -701.471435, 32.007812, "Easter Bay Chemicals"},
{-973.345092, -635.038330, 32.007812, "Easter Bay Chemicals"},
{-1099.870605, -696.740661, 32.351562, "Easter Bay Chemicals"},
{-1057.206665, -634.323059, 35.493179, "Easter Bay Chemicals"},
{-1017.676330, -704.239746, 32.007812, "Easter Bay Chemicals"},
{-1525.973999, 2652.515136, 59.711399, "El Quebrados"},
{-1507.893920, 2626.360107, 59.233432, "El Quebrados"},
{-1470.498413, 2554.702636, 55.835937, "El Quebrados"},
{-1579.125488, 2641.298095, 55.835937, "El Quebrados"},
{-1521.946166, 2709.298339, 55.835937, "El Quebrados"},
{-828.082336, 2661.674560, 104.945419, "Valle Ocultado"},
{-835.934020, 2659.769775, 96.975189, "Valle Ocultado"},
{-831.431640, 2695.995361, 53.576766, "Valle Ocultado"},
{-803.072448, 2695.158203, 67.962074, "Valle Ocultado"},
{-799.726013, 2704.947265, 47.416099, "Valle Ocultado"},
{-788.210693, 2694.006103, 48.357761, "Valle Ocultado"},
{-384.209350, 2206.028564, 45.671134, "Ghost Town"},
{-417.697753, 2246.862548, 42.429687, "Ghost Town"},
{-384.358673, 2206.287841, 45.671134, "Ghost Town"},
{-375.438262, 2241.879882, 47.126880, "Ghost Town"},
{-371.937103, 2266.688964, 42.484375, "Ghost Town"},
{-395.177276, 2246.250000, 50.119434, "Ghost Town"},
{-324.652770, 2216.008789, 44.212184, "Ghost Town"},
{-439.359222, 2219.759033, 47.228851, "Ghost Town"},
{2057.4861, 1584.6555, 11.3860, "Las Venturas Strip"},
{1978.9744, 1341.9728, 12.1679, "The High Roller"},
{1952.7090, 1342.7772, 15.3672, "The High Roller"},
{1955.8152, 1343.6718, 10.8203, "The High Roller"},
{2000.8960, 1526.6355, 14.6172, "Pirate Ship LV"},
{2019.2856, 1933.6051, 12.3413, "The Visage"},
{1990.0363, 1804.0670, 11.9658, "The Visage"},
{1884.6063, 1916.0862, 121.3125, "The Visage"},
{1964.7000, 1918.6570, 130.9375, "The Visage"},
{2004.7155, 1985.7189, 121.3125, "The Visage"},
{2001.4707, 1854.2504, 122.0156, "The Visage"},
{2001.9431, 1913.6509, 40.3516, "The Visage"},
{2118.4597, 2403.6187, 23.6016, "Emerald Isle"},
{2195.2678, 2400.8367, 29.1528, "Emerald Isle"},
{2093.5798, 2416.2209, 74.5786, "Emerald Isle"},
{2059.2659, 2423.4236, 150.4766, "Emerald Isle"},
{2119.2192, 2379.5447, 10.8203, "Emerald Isle"},
{2070.9280, 2365.0264, 23.6016, "Emerald Isle"},
{2064.6958, 2424.1499, 41.1690, "Emerald Isle"},
{2117.9751, 2416.6057, 45.2188, "Emerald Isle"},
{2139.9512, 2291.1326, 11.7422, "Emerald Isle"},
{1902.9260, 2232.2266, 11.1250, "Mental Clinic LV"},
{1897.6128, 2197.0178, 18.4844, "Mental Clinic LV"},
{1874.5250, 2213.0166, 18.4844, "Mental Clinic LV"},
{1849.5913, 2232.1895, 11.1250, "Mental Clinic LV"},
{1863.6892, 2189.9202, 11.1250, "Mental Clinic LV"},
{1486.6572, 2229.5481, 11.8984, "Baseball Stadium LV"},
{1483.3932, 2238.3386, 11.8984, "Baseball Stadium LV"},
{1382.5701, 2184.2664, 11.0234, "Baseball Stadium LV"},
{1394.4053, 2166.0701, 9.7578, "Baseball Stadium LV"},
{1298.6896, 2112.0710, 11.0234, "Baseball Stadium LV"},
{1679.7852, 1745.1682, 10.8248, "LV Airport"},
{1638.6257, 1627.9901, 14.8222, "LV Airport"},
{1645.9849, 1633.1378, 14.8222, "LV Airport"},
{1604.2371, 1458.0471, 10.8278, "LV Airport"},
{1605.2430, 1164.9768, 10.8125, "LV Airport"},
{1318.7423, 1250.7267, 10.8203, "LV Airport"},
{1267.1241, 1350.0719, 10.8130, "LV Airport"},
{1042.4901, 1542.7211, 5.8203, "Dirt Ring"},
{1113.4955, 1596.2367, 12.5469, "Dirt Ring"},
{1072.3939, 1594.8151, 5.8203, "Dirt Ring"},
{1028.9910, 1676.6599, 5.8203, "Dirt Ring"},

{2100.4465, 1158.6725, 11.6484, "Come-A-Lot"},
{2188.3101, 1122.2263, 12.6538, "Come-A-Lot"},
{2152.0249, 1138.5919, 7.0128, "Come-A-Lot"},
{2098.6216, 1159.8179, 24.5625, "Come-A-Lot"},
{2246.0403, 1042.1655, 48.2188, "Come-A-Lot"},
{2237.6792, 1133.2946, 49.0947, "Come-A-Lot"},
{2311.0420, 1139.2097, 79.5546, "Come-A-Lot"},
{2177.1208, 1064.9799, 79.5547, "Come-A-Lot"},
{2197.7322, 1106.0377, 26.7065, "Come-A-Lot"},
{2270.7727, 1047.3269, 10.8203, "Come-A-Lot"},
{2219.7366, 1048.7021, 10.8203, "Come-A-Lot"},
{2226.0862, 1843.0712, 10.8203, "Clowns Pocket"},
{2135.7227, 1841.8491, 10.6797, "Clowns Pocket"},
{2300.6162, 1870.7238, 10.8203, "Clowns Pocket"},
{2329.3118, 1872.4010, 16.4524, "Clowns Pocket"},
{2203.7151, 1832.4640, 19.0567, "Clowns Pocket"},
{2238.2092, 1837.3932, 17.8902, "Clowns Pocket"},
{2329.2593, 1817.7518, 16.4524, "Clowns Pocket"},
{2196.0115, 1665.4771, 12.3672, "Caligulas's Casino"},
{2266.5854, 1678.5103, 94.9219, "Caligulas's Casino"},
{2265.7593, 1617.2131, 94.9219, "Caligulas's Casino"},
{2243.3774, 1628.7339, 49.5938, "Caligulas's Casino"},
{2230.4663, 1629.7500, 20.3906, "Caligulas's Casino"},
{2227.7048, 1606.6213, 20.3906, "Caligulas's Casino"},
{2143.6028, 1728.0526, 20.3906, "Caligulas's Casino"},
{2134.9475, 1722.2670, 11.0533, "Caligulas's Casino"},
{2115.4839, 1691.0475, 10.8203, "Caligulas's Casino"},
{2116.8125, 1683.0906, 13.0060, "Caligulas's Casino"},
{2172.4221, 1514.9611, 10.8203, "Royal Casino"},
{2092.7207, 1454.8622, 35.4844, "Royal Casino"},
{2148.4133, 1501.0938, 26.7913, "Royal Casino"},
{2178.3040, 1456.7284, 30.3955, "Royal Casino"},
{2327.6521, 1521.1895, 44.7217, "Car Parking LV"},
{2333.8774, 1384.5132, 42.8203, "Car Parking LV"},
{2320.7083, 1385.8893, 44.5375, "Car Parking LV"},
{2257.9063, 1395.9688, 43.9128, "Car Parking LV"},
{2625.9011, 1724.9092, 11.0234, "ChinaTown LV"},
{2622.9746, 1716.6317, 11.0234, "ChinaTown LV"},
{2624.9678, 1823.4618, 11.0161, "ChinaTown LV"},
{2591.3633, 1899.5321, 11.0312, "ChinaTown LV"},
{2606.5210, 1891.7266, 11.0234, "ChinaTown LV"},
{2547.4053, 1855.4878, 30.6641, "ChinaTown LV"},
{2521.4175, 1827.4315, 22.4558, "ChinaTown LV"},
{2631.0769, 1830.1805, 25.1286, "ChinaTown LV"},
{2675.5471, 1663.3021, 10.8203, "ChinaTown LV"},
{2675.5288, 1625.5670, 11.0234, "ChinaTown LV"},
{2663.8096, 1942.1663, 11.0234, "ChinaTown LV"},
{2556.9653, 2101.8018, 10.8153, "Ammunation LV"},
{2577.2847, 2081.2444, 10.8130, "Ammunation LV"},
{2548.7295, 2080.5671, 15.6720, "Ammunation LV"},
{2196.8867, 940.2357, 10.8203, "Ammunation LV"},
{2165.6108, 946.2772, 15.6720, "Ammunation LV"},
{2212.1873, 946.2212, 15.6720, "Ammunation LV"},
{2636.4355, 2328.5186, 10.9219, "V-Rock Hotel"},
{2580.9785, 2356.8162, 17.8203, "V-Rock Hotel"},
{2559.3376, 2288.4656, 11.0625, "V-Rock Hotel"},
{1457.0092, 2773.9827, 10.8203, "Golf Club LV"},
{1487.5740, 2773.8330, 10.8203, "Golf Club LV"},
{1492.9858, 2773.4377, 10.8203, "Golf Club LV"},
{1365.9622, 2752.9841, 10.8053, "Golf Club LV"},
{1249.6998, 2790.4336, 10.8203, "Golf Club LV"},
{1202.2843, 2799.1538, 10.8203, "Golf Club LV"},
{2020.5714, 1015.5516, 10.8203, "Four Dragons Casino"},
{1911.7770, 920.9877, 10.8203, "Four Dragons Casino"},
{1855.9120, 1058.2712, 10.8130, "Four Dragons Casino"},
{1984.4238, 1028.4452, 10.8203, "Four Dragons Casino"},
{-2153.603271, -793.245605, 31.976562, "Foster Valley"},
{-2065.419677, -811.472534, 32.171875, "Foster Valley"},
{-1964.095703, -726.187255, 37.390625, "Foster Valley"},
{-1970.476440, -729.316772, 37.682456, "Foster Valley"},
{-1971.316284, -729.375305, 38.024555, "Foster Valley"},
{-1975.518432, -881.348754, 35.289417, "Foster Valley"},
{-1949.256469, -866.676269, 32.226562, "Foster Valley"},
{-1893.254760, -884.175720, 31.968750, "Foster Valley"},
{-1939.472412, -792.035339, 32.226562, "Foster Valley"},
{-1944.139770, -744.467956, 32.226562, "Foster Valley"},
{-1938.702148, -702.345642, 32.171875, "Foster Valley"},
{-1912.550048, -715.325622, 32.158123, "Foster Valley"},
{-1890.561767, -715.974426, 32.171875, "Foster Valley"},
{-1314.880126, 2523.205566, 93.098388, "Aldea Malvada"},
{-1340.013183, 2566.662841, 92.453392, "Aldea Malvada"},
{-1342.981445, 2577.075195, 77.273002, "Aldea Malvada"},
{-1316.729370, 2595.577880, 73.072959, "Aldea Malvada"},
{-1300.144653, 2546.430664, 87.742187, "Aldea Malvada"},
{-1314.141967, 2528.084716, 87.613708, "Aldea Malvada"},
{-1369.994506, 2530.447753, 77.454376, "Aldea Malvada"},
{-1325.340332, 2516.338378, 87.046875, "Aldea Malvada"},
{-1324.558593, 2532.424560, 87.561912, "Aldea Malvada"},
{-1346.553466, 2565.318115, 80.643333, "Aldea Malvada"},
{-541.176086, -561.201354, 26.798007, "The Fallen Tree"},
{-504.101501, -539.727050, 25.523437, "The Fallen Tree"},
{-503.481170, -527.582458, 25.523437, "The Fallen Tree"},
{-475.996154, -552.346740, 33.121536, "The Fallen Tree"},
{-470.645874, -538.255004, 29.121538, "The Fallen Tree"},
{-466.353302, -468.697967, 25.523437, "The Fallen Tree"},
{-517.881530, -496.789825, 25.523437, "The Fallen Tree"},
{-620.473388, -472.812927, 25.523437, "The Fallen Tree"},
{-644.839599, -445.775238, 27.982749, "The Fallen Tree"},
{-586.403198, -398.734558, 24.491775, "The Fallen Tree"},
{-554.032104, -423.535186, 29.328639, "The Fallen Tree"},
{-488.099975, -449.957580, 42.387664, "The Fallen Tree"},
{-507.062316, -434.387115, 37.013797, "The Fallen Tree"},
{-615.139038, -531.275512, 37.525276, "The Fallen Tree"},
{-624.562072, -509.588043, 33.459438, "The Fallen Tree"},
{-531.809875, -467.091979, 26.224544, "The Fallen Tree"}
};

new Float:MoneyBagPos[3], MoneyBagFound=1, MoneyBagLocation[50], MoneyBagPickup=-1, Timer[2];

//Hours, Minutes, Seconds, Milliseconds
#define MoneyBagDelay(%1,%2,%3,%4) (%1*3600000)+(%2*60000)+(%3*1000)+%4
//20 = 200,00 minimum 30 = 200,00 -> 500,00
#define MoneyBagCash ((random(40)+20)*1000)
//10 mins!
#define MB_DELAY MoneyBagDelay(0, 10, 0, 0)

public OnFilterScriptInit()
{
Timer[1] = SetTimer("MoneyBag", MB_DELAY, true);
return 1;
}

forward MoneyBag();
public MoneyBag()
{
new string[175];
if(!MoneyBagFound)
{
format(string, sizeof(string), "{FF9900}SERVER: The Money bag has not been found, it is still hidden in %s", MoneyBagLocation);
SendClientMessageToAll(-1, string);
}
else if(MoneyBagFound)
{
MoneyBagFound = -1;
new randombag = random(sizeof(MBSPAWN));
MoneyBagPos[0] = MBSPAWN[randombag][XPOS];
MoneyBagPos[1] = MBSPAWN[randombag][YPOS];
MoneyBagPos[2] = MBSPAWN[randombag][ZPOS];
format(MoneyBagLocation, sizeof(MoneyBagLocation), "%s", MBSPAWN[randombag][Position]);
format(string, sizeof(string), "{FF9900}SERVER: The Money Bag has been hidden somewhere near/in %s!", MoneyBagLocation);
SendClientMessageToAll(-1, string);
MoneyBagPickup = CreatePickup(1550, 2, MoneyBagPos[0], MoneyBagPos[1], MoneyBagPos[2], -1);
}
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if(IsPlayerAdmin(playerid))
{
if(!strcmp("/gotomb", cmdtext, true))
{
SetPlayerPos(playerid, MoneyBagPos[0], MoneyBagPos[1] +3, MoneyBagPos[2]);
return SendClientMessage(playerid, -1, "You have been {FF0000}teleported {FFFFFF}to the {33FF66}money bag");
}
if(!strcmp("/startmb", cmdtext, true)) return MoneyBag();
if(!strcmp("/togglemb", cmdtext, true))
{
if(Timer[0] == 0)
{
KillTimer(Timer[1]);
Timer[0] = 1;
SendClientMessage(playerid, -1, "Money bag turned {FF0000} off!");
return 1;
}
if(Timer[0] == 1)
{
Timer[1] = SetTimer("MoneyBag", MB_DELAY, true);
Timer[0] = 0;
SendClientMessage(playerid, -1, "Money bag turned {33FF66} on!");
return 1;
}
return 1;
}

}
if(!strcmp("/moneybag", cmdtext, true))
{
new string[150];
if(MoneyBagFound) {
       format(string, sizeof(string), "{FF9900}The Money Bag is not running!");
       // do something...
} else {
       format(string, sizeof(string), "{FF9900}SERVER: The Money Bag has been hidden somewhere near/in %s!", MoneyBagLocation);
       // do something...
}
return SendClientMessage(playerid, -1, string);
}
return 0;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == MoneyBagPickup)
{
new string[180], pname[24], money = MoneyBagCash;
GetPlayerName(playerid, pname, 24);
format(string, sizeof(string), "{FF9900}SERVER: %s has found the money bag that had $%d inside, located near/in %s", pname, money, MoneyBagLocation);
MoneyBagFound = -1;
SendClientMessageToAll(-1, string);
DestroyPickup(MoneyBagPickup);
SendClientMessage(playerid, -1, "{FF9900}You have found the Money Bag!");
GivePlayerMoney(playerid, money);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
}
return 1;
}
REP+ if i get the solution!
Reply
#9

On top, replace:
pawn Код:
new Float:MoneyBagPos[3], MoneyBagFound=1, MoneyBagLocation[50], MoneyBagPickup=-1, Timer[2];
with:
pawn Код:
new Float:MoneyBagPos[3], MoneyBagFound=-1, MoneyBagLocation[50], MoneyBagPickup=-1, Timer[2];
Reply
#10

Sorry to say it did'nt work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)