Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <zcmd>
- #include <streamer>
- new Float:GPPos[3], GoldPotFound=1, GoldPotLocation[50], GOLDPOTPK, GOLDPOTCP, GOLDPOTTIMER;
- new GOLDPOTTIME[2];
- enum GoldpotInfo
- {
- Float:GPXPOS,
- Float:GPYPOS,
- Float:GPZPOS,
- GPPosition[50]
- };
- new Float:GPSPAWN[][GoldpotInfo] =
- {
- // Positions, (X, Y, Z, Location)
- {1937.4636,-2361.4460,21.1369, "Los Santos Airport"},
- {1359.9862,1505.4540,45.2797, "Las Venturas Airport"},
- {-1278.3353,49.4676,13.8755, "San Fierro Airport"},
- {-2025.9376,83.8682,28.0160, "Fire Dept"},
- {-1753.7069,885.7668,295.8750, "Big Pointy Building"},
- {1835.5208,-1682.6647,12.9617, "Alhambra"},
- {1918.9445,-1414.3654,13.1268, "Skate Park"},
- {1881.8644,-1314.9628,14.0652, "Unfinished Building Near Skate Park"},
- {2029.4133,-1404.1167,16.8243, "County General Hospital"},
- {1971.5345,-1196.0419,17.4500, "Lake In A Park"},
- {1415.4343,-810.5200,74.9087, "VINEWOOD"},
- {1298.2969,-798.1028,83.7033, "Maddog's"},
- {1285.6399,-1156.3510,23.8281, "Movie Stars"},
- {811.2444,-1098.5168,25.9063, "Graveyard"},
- {1087.9865,-922.7635,42.9619, "Los Santos Sex Shop"},
- {1058.5283,-941.3829,42.5121, "Quite Humourous Comedy Club"},
- {756.0792,-1261.4366,13.1194, "Tennis Court"},
- {542.5836,-1292.3295,16.8007, "Grotti's"},
- {475.5581,-1279.2805,16.0575, "Vinyl Countdown"},
- {461.6343,-1500.9377,30.6217, "Los Santos Victim To Die For"},
- {488.1684,-1733.6770,10.7457, "Verona Beach Pay 'n' Spray"},
- {674.3853,-1867.1614,5.0312, "Beach GYM"},
- {431.7024,-1751.3900,8.3387, "Son Of A Beach T-Shirts 'n' Shits"},
- {386.9139,-2028.4971,7.3997, "Ferris Wheel"},
- {1554.5275,-1675.6545,15.7660, "LSPD"},
- {1786.7144,-1304.6896,13.1746, "Los Santos Flats"},
- {2354.6982,-648.9710,127.6280, "Abandoned Wooden Shack"},
- {2695.6931,-1704.7502,11.8438, "Los Santos Forum"},
- {2231.4314,-2284.2407,14.3751, "Trailer Park"},
- {2195.9836,-1969.6073,13.33861, "Los Santos Junkyard"},
- {2495.3130,-1690.4086,14.2556, "CJ isn't Home!"},
- {2309.6592,-1643.4934,14.3873, "Ten Green Bottles"},
- {2071.0059,-1793.2654,13.1151, "First Barber Salon"},
- {1786.2906,-1917.4558,12.9513, "Unity Station"},
- {1842.2286,-1856.7734,12.9402, "Los Santos Bomb Shop"},
- {1691.3992,-1972.1062,8.3836, "Tunnel Under Unity Station"},
- {2421.6812,-1219.7576,25.0916, "The Pig Pen"},
- {2454.4668,-1461.2080,23.5723, "Car Wash"},
- {2409.7075,-1490.5160,23.5188, "Drive-Thru Cluckin' Bell"},
- {2290.9382,-1527.8555,26.4476, "Basketball Court"},
- {1544.4298,-1352.9421,329.4749, "Great View Over Los Santos"},
- {1172.7122,-1323.3519,15.3758, "All Saints General Hospital"},
- {1368.4368,-1279.1364,13.0646, "Los Santos Ammu-Nation"},
- {655.4813,-565.3996,15.8988, "We Have Gas!"},
- {701.6240,-520.7927,15.9082, "Mr. Grant's Bike Shed"},
- {-62.1287,-1122.0255,0.8941, "We'll Dump Your Load"},
- {-88.9836,-1565.2668,2.5977, "Camper Park"},
- {-365.8894,-1428.4794,25.2871, "Helena Wankstein's Farm"},
- {-89.1678,1378.1990,9.9968, "UFO Bar"},
- {419.8001,1415.0613,8.5656, "Extraction Of Petroleum"},
- {234.6878,1857.9501,16.9258, "Area 69"},
- {219.9395,1822.8466,7.5225, "GTA SA Map"},
- {393.7918,2477.1445,17.6411, "Abandoned Airport"},
- {966.7471,2160.5139,10.3815, "Meat Factory"},
- {1099.3290,1601.9183,12.1066, "DirtRing"},
- {1171.6813,1350.9072,10.4971, "Bike School"},
- {2096.2563,1285.9447,10.3773, "Obelisk"},
- {2179.3452,1285.6652,42.0967, "Sphinx"},
- {2325.0559,1283.3019,95.8557, "Pyramid"},
- {2098.5833,1159.6077,11.2070, "Castle"},
- {2027.2952,1008.4667,10.3953, "The Four Dragons"},
- {1998.7495,1544.1276,13.8540, "Pirate Ship"},
- {2192.3992,1676.6183,12.3672, "Caligula's"},
- {2226.8938,1838.2239,10.3801, "Clowns Pocket"},
- {2470.8655,1905.8854,9.4165, "Unfinished Casino Construction"},
- {2634.0325,1824.1997,10.5797, "Las Venturas Chinese Stores"},
- {2369.0376,1983.5864,10.3735, "Venturas Steaks"},
- {2320.2668,2124.4951,32.3841, "Candy Suxx"},
- {2506.2283,2121.0957,10.4144, "World Class Topless Girls"},
- {2517.8235,2334.6921,10.3902, "Dick's Sounds"},
- {2577.8293,2381.8379,17.8559, "Guitar Pool"},
- {2932.8455,2119.3911,17.9667, "Oil Pipe (Sea)"},
- {2017.6084,1917.1071,11.9014, "The Visage"},
- {2086.3899,2074.8425,10.6182, "Las Venturas Sex Shop"},
- {2127.4353,2379.3999,10.3837, "Emerald Isle"},
- {2006.0173,2301.4419,10.3823, "Las Venturas Bomb Shop"},
- {1693.8899,2221.5574,19.9481, "Steakhouse"},
- {1657.6414,2189.8066,19.8165, "Four Big Wheels"},
- {1383.0128,2184.5913,10.5971, "Home of The Bandits Stadium"},
- {2090.1895,1515.5844,10.3757, "Royal Casino"},
- {2451.4629,1299.5242,10.5688, "Weeding Chapel 24HR"},
- {2200.8569,1394.8051,11.0625, "Auto Bahn"},
- {-426.4739,2505.0479,124.3047, "Huge Cock"},
- {-230.3798,2663.1609,62.1808, "Desert Chicken"},
- {-844.3906,2745.9275,45.5455, "Tee Tee Motel"},
- {-1305.1088,2491.9995,86.6352, "Aldea Malvada - The Lost Pueblo"},
- {-1353.4595,2057.5054,52.8379, "Desert Bait Shop"},
- {-595.0970,2018.1423,60.1794, "DAM"},
- {-868.2958,2308.5347,160.6376, "San Andreas Biggest Ramp"},
- {-127.6189,2258.2041,27.9226, "Body Bags"},
- {-347.1075,1607.5189,75.8579, "Huge Dish"},
- {-420.5294,1369.4535,12.5537, "Cave"},
- {-92.1433,1188.4261,19.3069, "Desert Bowling"},
- {110.4773,1105.7754,13.1785, "Drive-in Cinema"},
- {589.9595,873.0225,-42.9249, "Quarry"},
- {-792.6751,1627.5806,26.7337, "DAM Camper Park"},
- {-795.1779,1557.0668,26.7001, "Desert Castle"},
- {-734.2950,1546.2085,38.5811, "Desert Ruins"},
- {-860.3210,1530.1660,34.1077, "The Smokin' Beef Grill"},
- {-1465.8965,2637.4116,76.3252, "El Quebrados Water Deposit"},
- {-1514.8104,2519.5940,55.5796, "El Quebrados Medical Center"},
- {-1392.6355,2643.5117,55.4078, "El Quebrados Sheriff"},
- {-2184.9448,2413.0676,4.9013, "Captain School"},
- {-2495.9158,2363.1543,13.6891, "Because We Care...Phat Clothing"},
- {-2665.1262,1594.9802,217.2739, "No Easter Eggs"},
- {-2544.1926,1227.8944,36.9986, "Actual Piece Of Cable"},
- {-2624.8486,1412.3381,6.6632, "Jizzy's"},
- {-1680.7772,1362.7539,7.8828, "Pier 69"},
- {-1644.8544,1205.3395,32.4771, "Otto's"},
- {-1385.7150,672.0509,2.6315, "Under A Bridge (SF)"},
- {-1959.4122,700.1752,46.1319, "Zombotech"},
- {-2243.5339,739.3001,49.0057, "Chinatown"},
- {-2442.5469,754.7700,34.7334, "Supa Save"},
- {-2438.4993,495.3089,29.9260, "San Andreas Federal Mint"},
- {-2314.4526,101.2893,34.9486, "Baseball Field"},
- {-2242.1243,128.9496,34.8966, "Zero RC Shop"},
- {-2270.1965,-155.6732,34.8827, "Cobra Marital Arts"},
- {-2184.3953,-264.4480,40.2779, "San Fierro Warehouse"},
- {-2026.4893,-101.9039,34.7350, "Learn How To Drive"},
- {-2157.6765,-400.2065,35.0290, "Corvin Stadium"},
- {-1790.8474,567.7253,332.3959, "Highest San Fierro Building"},
- {-1286.4249,507.4871,17.8079, "Military Ship"},
- {-2471.6221,1549.7582,33.2273, "Ship Cabin"},
- {-2482.6108,-286.3192,40.0976, "Golf Court"},
- {-2082.2151,-862.9426,66.4372, "Five Identical Buildings (SF)"},
- {-1846.8195,-1708.4432,41.1139, "Angel Pine Junkyard"},
- {-2258.4678,-1742.6514,487.0852, "Chilliad"},
- {-2815.8674,-1521.6892,140.8438, "Chilliad Hill House"},
- {-1995.9794,-1558.0986,84.9481, "Chilliad Hole"},
- {-2050.0474,-2338.9712,40.4652, "Angel Pine Sawmill"},
- {-2165.3091,-2416.9666,30.3205, "Lovin' A Loan"},
- {-2293.9902,-2448.8823,25.2630, "Angel Pine Hobostack"},
- {-799.8579,-2259.4114,39.4541, "Horse Shoes"},
- {-739.4749,-1990.4443,9.5690, "Shitty Lake"},
- {2224.4690,-1262.5192,23.4685, "CJ's First Spawn"},
- {2101.6265,-1649.0497,12.9783, "CJ's First Tag Mission"},
- {-2406.6223,326.0979,34.7434, "Vank Hoff In The Park"},
- {154.2135,-1945.2555,4.2731, "Lighthouse"},
- {421.0309,-1314.9159,32.3516, "Candy Suxx Billboard"},
- {-1989.8995,1117.8409,54.4688, "Where's The Priest?"},
- {-1809.6421,-210.5458,24.5313, "Harry Plums Wholesale Fruit"},
- {-2767.1743,786.2155,52.3440, "Tuff Nut Donuts"},
- {2498.2488,2773.4836,10.3855, "Military Fuels"},
- {732.8908,-1341.5129,14.4291, "Interglobal TV"},
- {823.0460,-1365.3257,-0.9459, "Market Station"},
- {1128.8400,-1488.6097,22.3362, "Verona Mall"},
- {2441.0557,-1653.7570,26.2929, "Breakable Bridge (LS)"},
- {2834.6379,-2434.8826,14.1733, "Ship Docked In Los Santos"},
- {2851.5535,-1532.3398,10.6553, "Sprunk Incorporated"},
- {2808.4189,-1176.2007,24.9234, "Cannon In A House"},
- {2644.7964,-1459.2537,15.8071, "Sewer Tunnel"},
- {1117.8289,-2036.8716,78.1645, "Los Santos Observatory"},
- {-1605.3304,711.0455,13.4393, "SFPD"},
- {-1942.0330,277.1327,35.4739, "Wang Cars"},
- {-2026.4648,156.5116,28.5871, "Doherty Garage"},
- {-1968.7589,110.6265,27.4519, "San Fierro Station"},
- {-1827.2380,42.3856,14.6888, "Solarin Industries"},
- {-1536.7402,483.1094,7.1797, "Easter Basin Naval Station"},
- {-338.4648,2218.3623,42.0909, "DAM Cemetery"},
- {-35.7158,2349.9453,23.9113, "Snake Farm"},
- {1288.8795,271.3768,19.1206, "Inside Track"},
- {103.0110,-294.1638,1.1473, "Fleichberg"},
- {1271.8375,295.0602,20.6563, "BIOWASTE"},
- {1040.0636,-1343.0978,22.1932, "Donut Ring"},
- {1277.5110,370.6000,19.1218, "PAPERCUTS - Let Us Fill Your Office"},
- {1351.2240,349.2023,19.9189, "BIOENGINEERING - Getting OUR hands in YOUR genes"}
- };
- public OnFilterScriptInit()
- {
- GOLDPOTTIMER = SetTimer("GoldPot", 60000, false);
- return 1;
- }
- forward GoldPot();
- public GoldPot()
- {
- new string[255];
- if(!GoldPotFound)
- {
- SendClientMessageToAll(-1, "No one found the goldpot!");
- GoldPotFound = 1;
- DestroyPickup(GOLDPOTPK);
- DestroyDynamicCP(GOLDPOTCP);
- GoldPot();
- }
- else if(GoldPotFound)
- {
- GoldPotFound = 0;
- new gprand = random(sizeof(GPSPAWN));
- GPPos[0] = GPSPAWN[gprand][GPXPOS];
- GPPos[1] = GPSPAWN[gprand][GPYPOS];
- GPPos[2] = GPSPAWN[gprand][GPZPOS];
- format(GoldPotLocation, sizeof(GoldPotLocation), "%s", GPSPAWN[gprand][GPPosition]);
- format(string, sizeof(string), "Find the goldpot worth 10 score and 50 000$. Hint: %s!", GoldPotLocation);
- printf("GOLDPOT LOCATION %s.",GoldPotLocation);
- SendClientMessageToAll(-1, string);
- GOLDPOTPK = CreatePickup(1550, 2, GPPos[0], GPPos[1], GPPos[2], -1);
- GOLDPOTCP = CreateDynamicCP(GPPos[0], GPPos[1], GPPos[2],3,-1,-1,-1,20);
- GOLDPOTTIME[0] = GetTickCount();
- GOLDPOTTIMER = SetTimer("GoldPot", 600000, false);
- }
- return 1;
- }
- CMD:goldpot(playerid,params[])
- {
- new string[255];
- if(!GoldPotFound)
- {
- GOLDPOTTIME[1] = GetTickCount();
- new Float:timeresult = GOLDPOTTIME[1] - GOLDPOTTIME[0];
- format(string, sizeof(string), "The goldpot hasn't been found in %.2f seconds!. Hint: %s!", timeresult/1000,GoldPotLocation);
- }
- if(GoldPotFound) format(string, sizeof(string), "The last goldpot was found. Wait please.");
- return SendClientMessage(playerid, -1, string);
- }
- public OnPlayerEnterDynamicCP(playerid, checkpointid)
- {
- if(checkpointid == GOLDPOTCP)
- {
- new string[180], pname[24];
- GetPlayerName(playerid, pname, 24);
- GOLDPOTTIME[1] = GetTickCount();
- new Float:timeresult = GOLDPOTTIME[1] - GOLDPOTTIME[0];
- format(string, sizeof(string), "%s has found the goldpot in %.2f seconds!. Reward: 10 Score + 50000$!(%s)", pname, timeresult/1000,GoldPotLocation);
- SendClientMessageToAll(-1, string);
- SendClientMessage(playerid, -1, "You have found the goldpot! Reward 10 score and 50 000$");
- SetPlayerScore(playerid, GetPlayerScore(playerid) + 10);
- GivePlayerMoney(playerid, 50000);
- GoldPotFound = 1;
- DestroyPickup(GOLDPOTPK);
- DestroyDynamicCP(GOLDPOTCP);
- KillTimer(GOLDPOTTIMER);
- GOLDPOTTIMER = SetTimer("GoldPot", 120000, false);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment