Advertisement
Guest User

Untitled

a guest
Apr 6th, 2008
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.98 KB | None | 0 0
  1. #include <a_samp>
  2. #include <properties> //You need this Include (.inc)
  3.  
  4. public OnFilterScriptInit()
  5. {
  6.  
  7. print("----------------------------------------");
  8. print(" Properties Filterscipt ");
  9. print(" by [HiC]TheKiller ");
  10. print("----------------------------------------");
  11.  
  12. UsePropertyTextDraw(0);
  13. SetMaxPropertiesPerPlayer(999); //Change this for different MAX properties
  14. SetPayoutFrequency(120);// Change this for a different payout time
  15. //==============================================================================
  16. //To add/change properties the format is AddProperty({name}, {co-ordonates, {Buyprice}, {Sellprice},{Earning});
  17. AddProperty("4Dragons", 1993.36, 1018.19, 994.89, 300000, 200000, 7000);
  18. AddProperty("City_Planning", 361.94, 173.60, 1008.38, 50000, 35000, 1500);
  19. AddProperty("Pyramid", 2318.73, 1261.27, 67.46, 100000, 85000, 3000);
  20. AddProperty("Wang_cars", -1959.17, 303.12, 35.46, 100000, 70000, 3000);
  21. AddProperty("Caligulas_Casino", 2235.43, 1681.08, 1008.35, 400000, 350000, 10000);
  22. AddProperty("Jizzys", -2647.88, 1408.03, 906.27, 200000, 100000, 4500);
  23. AddProperty("A_Staircase", 1955.39, 1342.86, 15.37, 10000, 7000, 500);
  24. AddProperty("LV_Shithole_carpark", 2313.88, 1389.86, 14.34, 50000, 25000, 2000);
  25. AddProperty("Otto's_auto", -1656.90, 1209.58, 8.14, 50000, 30000, 3000);
  26. AddProperty("The_Visage", 2022.54, 1913.75, 12.31, 200000, 145000, 4500);
  27. AddProperty("SFpeterolstation", -1674.35, 430.65, 7.17, 10000, 5000, 500);
  28. AddProperty("Clowns_Pocket", 2207.96, -1072.14, 1050.47, 50000, 44000, 3500);
  29. AddProperty("TheDMV", -2029.43, -116.22, 1035.17, 20000, 10000, 1000);
  30. AddProperty("Starfish_Casino", 2306.60, 1904.73, 10.97, 100000, 83000, 3000);
  31. AddProperty("Coalrip", -1851.42, -1697.87, 40.86, 100000, 50000, 3000);
  32. AddProperty("LVStrip_Shops", 2107.74, 2072.63, 10.82, 70000, 60000, 4000);
  33. AddProperty("Extremepro-laps", -2409.37, -2190.26, 34.03, 70000, 35000, 1300);
  34. AddProperty("Emerald_Isle", 2127.19, 2375.83, 10.82, 100000, 75000, 4500);
  35. AddProperty("Trans_fender", 2380.86, 1039.09, 10.62, 30000, 15000, 1300);
  36. AddProperty("Basketball_court", 2496.95, 1292.41, 10.81, 5000, 2500, 150);
  37. AddProperty("Motel", 2483.79, 1527.26, 11.16, 100000, 50000, 3000);
  38. AddProperty("Caconca", 2436.02, 1671.98, 10.82, 80000, 40000, 2700);
  39. AddProperty("Clowns_Pocket", 2223.90, 1838.37, 10.38, 150000, 75000, 4000);
  40. AddProperty("Sex_Shop", -103.19, -21.26, 1000.71, 40000, 20000, 1300);
  41. AddProperty("Gifts&Jewlery", 2368.70, 2123.23, 10.84, 50000, 25000, 1500);
  42. AddProperty("Stripper's_Bar", 1210.04, -10.01, 1000.92, 15000, 7500, 700);
  43. AddProperty("LV_Airport", 1679.59, 1452.50, 10.77, 10000000, 5000000, 50000);
  44. AddProperty("LV_Hospital", 1606.62, 1821.82, 10.82, 200000, 100000, 6000);
  45. AddProperty("Apartment_Block1", 1477.85, 1992.12, 11.02, 100000, 50000, 2500);
  46. AddProperty("Apartment_Block2", 1532.42, 1921.98, 10.36, 100000, 50000, 2500);
  47. AddProperty("Apartment_Block3", 1632.52, 1923.81, 10.35, 100000, 50000, 2500);
  48. AddProperty("Apartment_Block4", 1634.33, 1965.26, 10.39, 100000, 50000, 2500);
  49. AddProperty("$hody_Cars", 1669.01, 1826.15, 10.82, 40000, 20000, 1300);
  50. AddProperty("Discount_Furniture", 1654.75, 1774.71, 10.82, 40000, 20000, 1200);
  51. AddProperty("Tatoo_Parlor", -203.21, -41.76, 1002.27, 15000, 7500, 700);
  52. AddProperty("Gay_Gordo's", 418.64, -82.64, 1001.80, 15000, 7500, 700);
  53. AddProperty("ZIP", 161.39, -85.25, 1001.80, 30000, 15000, 1200);
  54. AddProperty("Binco", 207.99, -102.65, 1005.25, 30000, 15000, 1200);
  55. AddProperty("Soapys_Carwash", 2153.51, 2461.01, 10.37, 5000, 2500, 200);
  56. AddProperty("Souvenirs_Shop", 1891.96, 2417.98, 10.74, 50000, 25000, 1500);
  57. AddProperty("Golf_Club", 1462.27, 2772.49, 10.32, 150000, 75000, 3500);
  58. AddProperty("Cj's_House", 2496.05, -1697.81, 1014.73, 10000, 7000, 500);
  59. AddProperty("Uni-tell", 2418.31, -1760.92, 13.39, 15000, 8000, 600);
  60. AddProperty("Estacionamientu", 2275.31, -1723.46, 13.11, 15000, 8700, 400);
  61. AddProperty("Sity_Burgurs", 2161.30, -1745.94, 13.10, 5000, 1000, 200);
  62. AddProperty("Tony's_Liquor", 2088.79, -1911.54, 13.11, 10000, 6000, 300);
  63. AddProperty("Kimono_Hotel", 1235.61, -1858.10, 13.11, 20000, 15000, 1200);
  64. AddProperty("Ranch", 470.91, -1575.48, 24.58, 20000, 12000, 1200);
  65. AddProperty("Victim", 210.89, -7.60, 1005.21, 30000, 23000, 1400);
  66. AddProperty("Train_hard", 207.05, -135.94, 1002.87, 30000, 21000, 1400);
  67. AddProperty("Kevin_Clone", 555.47, -1425.30, 15.43, 40000, 32000, 1550);
  68. AddProperty("Interglobal", 644.77, -1362.64, 13.59, 200000, 150000, 4900);
  69. AddProperty("Power_Vidio", 816.54, -1057.22, 24.60, 7000, 4000, 400);
  70. AddProperty("Hobos", 873.84, -974.75, 37.18, 20000, 15000, 700);
  71. AddProperty("Robois_food_mart", 1315.33, -900.78, 39.57, 10000, 6000, 500);
  72. AddProperty("Car_Yard", 2131.00, -1149.88, 24.20, 50000, 28000, 1800);
  73. AddProperty("Pig_Pen", 2425.16, -1221.30, 25.43, 30000, 20000, 1300);
  74. AddProperty("Golden_Palms", 2743.96, -1190.67, 69.39, 50000, 34000, 1800);
  75. AddProperty("Conhita_Market", 2750.86, -1461.65, 30.02, 40000, 29000, 1600);
  76. return 1;
  77. }
  78.  
  79. public OnFilterScriptExit()
  80. {
  81. DestroyAllPropertyPickups();
  82. return 1;
  83. }
  84.  
  85. public OnPlayerDisconnect(playerid, reason)
  86. {
  87. ResetPlayerPropertyInfo(playerid);
  88. return 1;
  89. }
  90. public OnPlayerCommandText(playerid, cmdtext[])
  91. {
  92. new cmd[256];
  93. new idx;
  94. cmd = strtok(cmdtext, idx);
  95.  
  96.  
  97. if (strcmp("/myproperties", cmdtext,true) == 0)
  98. {
  99. GetPlayerProperties(playerid);
  100. return 1;
  101. }
  102.  
  103. if (strcmp("/buy", cmdtext, true) == 0)
  104. {
  105. BuyPropertyForPlayer(playerid);
  106. return 1;
  107. }
  108.  
  109. if (strcmp("/sell", cmdtext, true) == 0)
  110. {
  111. SellPropertyForPlayer(playerid);
  112. return 1;
  113. }
  114.  
  115. if (strcmp("/Findproperty", cmd, true) == 0)
  116. {
  117. new tmp[256];
  118. tmp = strtok(cmdtext, idx);
  119. if(!strlen(tmp))
  120. {
  121. SendClientMessage(playerid, 0xFF0000AA, "USAGE: /Findproperty [PropertyID]");
  122. return 1;
  123. }
  124. new prop = strval(tmp);
  125. if(!DoesPropertyExists(prop)) return SendClientMessage(playerid, 0xFF0000AA, "This property does not exists!");
  126. LocatePropertyForPlayer(prop, playerid);
  127. return 1;
  128. }
  129.  
  130.  
  131. if (strcmp("/propertyhelp", cmdtext, true) == 0)
  132. {
  133. SendClientMessage(playerid, 0xAA3333AA, "Property Commands:");
  134. SendClientMessage(playerid, 0xAA3333AA, "/buy, /sell /Findproperty [ID]");
  135.  
  136. }
  137. return 1;
  138.  
  139. }
  140.  
  141. public OnPlayerPickUpPickup(playerid, pickupid)
  142. {
  143. OnPropertyPickupPickup(playerid, pickupid);
  144. return 1;
  145. }
  146.  
  147. strtok(const string[], &index)
  148. {
  149. new length = strlen(string);
  150. while ((index < length) && (string[index] <= ' '))
  151. {
  152. index++;
  153. }
  154.  
  155. new offset = index;
  156. new result[20];
  157. while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  158. {
  159. result[index - offset] = string[index];
  160. index++;
  161. }
  162. result[index - offset] = EOS;
  163. return result;
  164. }
  165.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement