Advertisement
Guest User

FS de casa

a guest
Oct 10th, 2012
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 117.36 KB | None | 0 0
  1. //-----------------[ Use como FS ]-------------------//
  2. #define filterscript
  3. #include <a_samp>
  4. #include <foreach>
  5. #include <sscanf2>
  6. #include <YSI\y_ini>
  7. #include <YSI\y_commands>
  8. #include <streamer>
  9. #pragma tabsize 0
  10.  
  11. #define MAX_HOUSE   500
  12. #define House_File  "House/%d.ini"
  13. #define FILE_FOR_PLAYER "House/Player/%s.ini"
  14. #define DIALOG_HOUSE     1391
  15. #define SCM SendClientMessage
  16. #define MAX_DAYS    7
  17.  
  18. #define COL_YELLOW "{F5E618}"
  19. #define COL_GREEN "{2EAD15}"
  20. #define COL_WHITE "{FFFFFF}"
  21. #define COL_BLUE "{345ACF}"
  22. #define COLOR_RED 0xE01B4CFF
  23. #define COLOR_PURPLE 0xC21BE0
  24. #define randomEx(%0,%1)             (random((%1) - (%0)) + (%0))
  25. new bool:False = false, _S_T_R_[128];
  26. #define SendFormatMSG(%0,%1,%2,%3)\
  27.         do{\
  28.             format(_S_T_R_, sizeof (_S_T_R_), (%2), %3);\
  29.             SendClientMessage((%0),(%1), _S_T_R_);\
  30.         }\
  31.         while (False)
  32.  
  33. new Text:LockTD0[MAX_PLAYERS],
  34.     Text:LockTD1[MAX_PLAYERS],
  35.     Text:LockTD2[MAX_PLAYERS],
  36.     Text:LockTD3[MAX_PLAYERS],
  37.     Text:LockTD4[MAX_PLAYERS],
  38.     Text:LockTD5[MAX_PLAYERS],
  39.     Text:LockTD6[MAX_PLAYERS],
  40.     Text:Phone0[MAX_PLAYERS],
  41.     Text:Phone1[MAX_PLAYERS],
  42.     Text:Phone2[MAX_PLAYERS],
  43.     Text:Phone3[MAX_PLAYERS],
  44.     Text:Phone4[MAX_PLAYERS],
  45.     Text:Phone5[MAX_PLAYERS],
  46.     Text:hUp[MAX_PLAYERS],
  47.     Choose[MAX_PLAYERS],
  48.     TypeText[5][MAX_PLAYERS],
  49.     HouseOwner[32][MAX_VEHICLES],
  50.     ChooseInt[MAX_PLAYERS],
  51.     HouseID1[MAX_PLAYERS],
  52.     PhoneChoose[MAX_PLAYERS],
  53.     Calling[MAX_PLAYERS],
  54.     TalkWith[MAX_PLAYERS],
  55.     CallFrom[MAX_PLAYERS],
  56.     PlayerCP[MAX_PLAYERS];
  57.    
  58. enum plinfo
  59. {
  60.     Float:SpawnX,
  61.     Float:SpawnY,
  62.     Float:SpawnZ,
  63.     SpawnInt,
  64.     SpawnVW,
  65.     Spawn,
  66.     RobHouse,
  67.     Houseid,
  68.     Sec,
  69.     Min,
  70. }
  71. new Player[MAX_PLAYERS][plinfo];
  72. enum house
  73. {
  74.     Float:EnterX,
  75.     Float:EnterY,
  76.     Float:EnterZ,
  77.     Float:ExitX,
  78.     Float:ExitY,
  79.     Float:ExitZ,
  80.     Text3D:DLabel,
  81.     PickupU,
  82.     HouseName[48],
  83.     Owner[32],
  84.     IntID,
  85.     VW,
  86.     On_Sell,
  87.     Price,
  88.     Level,
  89.     Lock,
  90.     LockPass[5],
  91.     RentPrice,
  92.     Player_Rent[48],
  93.     Money,
  94.     Gun1,
  95.     Gun2,
  96.     Ammo1,
  97.     Ammo2,
  98.     Icon,
  99.     Float:hCarX,
  100.     Float:hCarY,
  101.     Float:hCarZ,
  102.     Float:hCarA,
  103.     hCarC1,
  104.     hCarC2,
  105.     hCarID,
  106.     hCar,
  107.     hCarMoney,
  108.     hCarGun1,
  109.     hCarGun2,
  110.     hCarAmmo1,
  111.     hCarAmmo2,
  112.     PhoneNum[5],
  113.     Address[48],
  114.     DayEnter,
  115.     MonthEnter,
  116. }
  117. new House[MAX_HOUSE][house];
  118.  
  119. enum MainZone
  120. {
  121.     Zone_Name[28],
  122.     Float:Zone_Area[6]
  123. };
  124.  
  125. static const SanAndreasZones[][MainZone] = {
  126.  
  127.     {"The Big Ear",                 {-410.00,1403.30,-3.00,-137.90,1681.20,200.00}},
  128.     {"Aldea Malvada",               {-1372.10,2498.50,0.00,-1277.50,2615.30,200.00}},
  129.     {"Angel Pine",                  {-2324.90,-2584.20,-6.10,-1964.20,-2212.10,200.00}},
  130.     {"Arco del Oeste",              {-901.10,2221.80,0.00,-592.00,2571.90,200.00}},
  131.     {"Avispa Country Club",         {-2646.40,-355.40,0.00,-2270.00,-222.50,200.00}},
  132.     {"Avispa Country Club",         {-2831.80,-430.20,-6.10,-2646.40,-222.50,200.00}},
  133.     {"Avispa Country Club",         {-2361.50,-417.10,0.00,-2270.00,-355.40,200.00}},
  134.     {"Avispa Country Club",         {-2667.80,-302.10,-28.80,-2646.40,-262.30,71.10}},
  135.     {"Avispa Country Club",         {-2470.00,-355.40,0.00,-2270.00,-318.40,46.10}},
  136.     {"Avispa Country Club",         {-2550.00,-355.40,0.00,-2470.00,-318.40,39.70}},
  137.     {"Back o Beyond",               {-1166.90,-2641.10,0.00,-321.70,-1856.00,200.00}},
  138.     {"Battery Point",               {-2741.00,1268.40,-4.50,-2533.00,1490.40,200.00}},
  139.     {"Bayside",                     {-2741.00,2175.10,0.00,-2353.10,2722.70,200.00}},
  140.     {"Bayside Marina",              {-2353.10,2275.70,0.00,-2153.10,2475.70,200.00}},
  141.     {"Beacon Hill",                 {-399.60,-1075.50,-1.40,-319.00,-977.50,198.50}},
  142.     {"Blackfield",                  {964.30,1203.20,-89.00,1197.30,1403.20,110.90}},
  143.     {"Blackfield",                  {964.30,1403.20,-89.00,1197.30,1726.20,110.90}},
  144.     {"Blackfield Chapel",           {1375.60,596.30,-89.00,1558.00,823.20,110.90}},
  145.     {"Blackfield Chapel",           {1325.60,596.30,-89.00,1375.60,795.00,110.90}},
  146.     {"Blackfield Intersection",     {1197.30,1044.60,-89.00,1277.00,1163.30,110.90}},
  147.     {"Blackfield Intersection",     {1166.50,795.00,-89.00,1375.60,1044.60,110.90}},
  148.     {"Blackfield Intersection",     {1277.00,1044.60,-89.00,1315.30,1087.60,110.90}},
  149.     {"Blackfield Intersection",     {1375.60,823.20,-89.00,1457.30,919.40,110.90}},
  150.     {"Blueberry",                   {104.50,-220.10,2.30,349.60,152.20,200.00}},
  151.     {"Blueberry",                   {19.60,-404.10,3.80,349.60,-220.10,200.00}},
  152.     {"Blueberry Acres",             {-319.60,-220.10,0.00,104.50,293.30,200.00}},
  153.     {"Caligula's Palace",           {2087.30,1543.20,-89.00,2437.30,1703.20,110.90}},
  154.     {"Caligula's Palace",           {2137.40,1703.20,-89.00,2437.30,1783.20,110.90}},
  155.     {"Calton Heights",              {-2274.10,744.10,-6.10,-1982.30,1358.90,200.00}},
  156.     {"Chinatown",                   {-2274.10,578.30,-7.60,-2078.60,744.10,200.00}},
  157.     {"City Hall",                   {-2867.80,277.40,-9.10,-2593.40,458.40,200.00}},
  158.     {"Come-A-Lot",                  {2087.30,943.20,-89.00,2623.10,1203.20,110.90}},
  159.     {"Commerce",                    {1323.90,-1842.20,-89.00,1701.90,-1722.20,110.90}},
  160.     {"Commerce",                    {1323.90,-1722.20,-89.00,1440.90,-1577.50,110.90}},
  161.     {"Commerce",                    {1370.80,-1577.50,-89.00,1463.90,-1384.90,110.90}},
  162.     {"Commerce",                    {1463.90,-1577.50,-89.00,1667.90,-1430.80,110.90}},
  163.     {"Commerce",                    {1583.50,-1722.20,-89.00,1758.90,-1577.50,110.90}},
  164.     {"Commerce",                    {1667.90,-1577.50,-89.00,1812.60,-1430.80,110.90}},
  165.     {"Conference Center",           {1046.10,-1804.20,-89.00,1323.90,-1722.20,110.90}},
  166.     {"Conference Center",           {1073.20,-1842.20,-89.00,1323.90,-1804.20,110.90}},
  167.     {"Cranberry Station",           {-2007.80,56.30,0.00,-1922.00,224.70,100.00}},
  168.     {"Creek",                       {2749.90,1937.20,-89.00,2921.60,2669.70,110.90}},
  169.     {"Dillimore",                   {580.70,-674.80,-9.50,861.00,-404.70,200.00}},
  170.     {"Doherty",                     {-2270.00,-324.10,-0.00,-1794.90,-222.50,200.00}},
  171.     {"Doherty",                     {-2173.00,-222.50,-0.00,-1794.90,265.20,200.00}},
  172.     {"Downtown",                    {-1982.30,744.10,-6.10,-1871.70,1274.20,200.00}},
  173.     {"Downtown",                    {-1871.70,1176.40,-4.50,-1620.30,1274.20,200.00}},
  174.     {"Downtown",                    {-1700.00,744.20,-6.10,-1580.00,1176.50,200.00}},
  175.     {"Downtown",                    {-1580.00,744.20,-6.10,-1499.80,1025.90,200.00}},
  176.     {"Downtown",                    {-2078.60,578.30,-7.60,-1499.80,744.20,200.00}},
  177.     {"Downtown",                    {-1993.20,265.20,-9.10,-1794.90,578.30,200.00}},
  178.     {"Downtown Los Santos",         {1463.90,-1430.80,-89.00,1724.70,-1290.80,110.90}},
  179.     {"Downtown Los Santos",         {1724.70,-1430.80,-89.00,1812.60,-1250.90,110.90}},
  180.     {"Downtown Los Santos",         {1463.90,-1290.80,-89.00,1724.70,-1150.80,110.90}},
  181.     {"Downtown Los Santos",         {1370.80,-1384.90,-89.00,1463.90,-1170.80,110.90}},
  182.     {"Downtown Los Santos",         {1724.70,-1250.90,-89.00,1812.60,-1150.80,110.90}},
  183.     {"Downtown Los Santos",         {1370.80,-1170.80,-89.00,1463.90,-1130.80,110.90}},
  184.     {"Downtown Los Santos",         {1378.30,-1130.80,-89.00,1463.90,-1026.30,110.90}},
  185.     {"Downtown Los Santos",         {1391.00,-1026.30,-89.00,1463.90,-926.90,110.90}},
  186.     {"Downtown Los Santos",         {1507.50,-1385.20,110.90,1582.50,-1325.30,335.90}},
  187.     {"East Beach",                  {2632.80,-1852.80,-89.00,2959.30,-1668.10,110.90}},
  188.     {"East Beach",                  {2632.80,-1668.10,-89.00,2747.70,-1393.40,110.90}},
  189.     {"East Beach",                  {2747.70,-1668.10,-89.00,2959.30,-1498.60,110.90}},
  190.     {"East Beach",                  {2747.70,-1498.60,-89.00,2959.30,-1120.00,110.90}},
  191.     {"East Los Santos",             {2421.00,-1628.50,-89.00,2632.80,-1454.30,110.90}},
  192.     {"East Los Santos",             {2222.50,-1628.50,-89.00,2421.00,-1494.00,110.90}},
  193.     {"East Los Santos",             {2266.20,-1494.00,-89.00,2381.60,-1372.00,110.90}},
  194.     {"East Los Santos",             {2381.60,-1494.00,-89.00,2421.00,-1454.30,110.90}},
  195.     {"East Los Santos",             {2281.40,-1372.00,-89.00,2381.60,-1135.00,110.90}},
  196.     {"East Los Santos",             {2381.60,-1454.30,-89.00,2462.10,-1135.00,110.90}},
  197.     {"East Los Santos",             {2462.10,-1454.30,-89.00,2581.70,-1135.00,110.90}},
  198.     {"Easter Basin",                {-1794.90,249.90,-9.10,-1242.90,578.30,200.00}},
  199.     {"Easter Basin",                {-1794.90,-50.00,-0.00,-1499.80,249.90,200.00}},
  200.     {"Easter Bay Airport",          {-1499.80,-50.00,-0.00,-1242.90,249.90,200.00}},
  201.     {"Easter Bay Airport",          {-1794.90,-730.10,-3.00,-1213.90,-50.00,200.00}},
  202.     {"Easter Bay Airport",          {-1213.90,-730.10,0.00,-1132.80,-50.00,200.00}},
  203.     {"Easter Bay Airport",          {-1242.90,-50.00,0.00,-1213.90,578.30,200.00}},
  204.     {"Easter Bay Airport",          {-1213.90,-50.00,-4.50,-947.90,578.30,200.00}},
  205.     {"Easter Bay Airport",          {-1315.40,-405.30,15.40,-1264.40,-209.50,25.40}},
  206.     {"Easter Bay Airport",          {-1354.30,-287.30,15.40,-1315.40,-209.50,25.40}},
  207.     {"Easter Bay Airport",          {-1490.30,-209.50,15.40,-1264.40,-148.30,25.40}},
  208.     {"Easter Bay Chemicals",        {-1132.80,-768.00,0.00,-956.40,-578.10,200.00}},
  209.     {"Easter Bay Chemicals",        {-1132.80,-787.30,0.00,-956.40,-768.00,200.00}},
  210.     {"El Castillo del Diablo",      {-464.50,2217.60,0.00,-208.50,2580.30,200.00}},
  211.     {"El Castillo del Diablo",      {-208.50,2123.00,-7.60,114.00,2337.10,200.00}},
  212.     {"El Castillo del Diablo",      {-208.50,2337.10,0.00,8.40,2487.10,200.00}},
  213.     {"El Corona",                   {1812.60,-2179.20,-89.00,1970.60,-1852.80,110.90}},
  214.     {"El Corona",                   {1692.60,-2179.20,-89.00,1812.60,-1842.20,110.90}},
  215.     {"El Quebrados",                {-1645.20,2498.50,0.00,-1372.10,2777.80,200.00}},
  216.     {"Esplanade East",              {-1620.30,1176.50,-4.50,-1580.00,1274.20,200.00}},
  217.     {"Esplanade East",              {-1580.00,1025.90,-6.10,-1499.80,1274.20,200.00}},
  218.     {"Esplanade East",              {-1499.80,578.30,-79.60,-1339.80,1274.20,20.30}},
  219.     {"Esplanade North",             {-2533.00,1358.90,-4.50,-1996.60,1501.20,200.00}},
  220.     {"Esplanade North",             {-1996.60,1358.90,-4.50,-1524.20,1592.50,200.00}},
  221.     {"Esplanade North",             {-1982.30,1274.20,-4.50,-1524.20,1358.90,200.00}},
  222.     {"Fallen Tree",                 {-792.20,-698.50,-5.30,-452.40,-380.00,200.00}},
  223.     {"Fallow Bridge",               {434.30,366.50,0.00,603.00,555.60,200.00}},
  224.     {"Fern Ridge",                  {508.10,-139.20,0.00,1306.60,119.50,200.00}},
  225.     {"Financial",                   {-1871.70,744.10,-6.10,-1701.30,1176.40,300.00}},
  226.     {"Fisher's Lagoon",             {1916.90,-233.30,-100.00,2131.70,13.80,200.00}},
  227.     {"Flint Intersection",          {-187.70,-1596.70,-89.00,17.00,-1276.60,110.90}},
  228.     {"Flint Range",                 {-594.10,-1648.50,0.00,-187.70,-1276.60,200.00}},
  229.     {"Fort Carson",                 {-376.20,826.30,-3.00,123.70,1220.40,200.00}},
  230.     {"Foster Valley",               {-2270.00,-430.20,-0.00,-2178.60,-324.10,200.00}},
  231.     {"Foster Valley",               {-2178.60,-599.80,-0.00,-1794.90,-324.10,200.00}},
  232.     {"Foster Valley",               {-2178.60,-1115.50,0.00,-1794.90,-599.80,200.00}},
  233.     {"Foster Valley",               {-2178.60,-1250.90,0.00,-1794.90,-1115.50,200.00}},
  234.     {"Frederick Bridge",            {2759.20,296.50,0.00,2774.20,594.70,200.00}},
  235.     {"Gant Bridge",                 {-2741.40,1659.60,-6.10,-2616.40,2175.10,200.00}},
  236.     {"Gant Bridge",                 {-2741.00,1490.40,-6.10,-2616.40,1659.60,200.00}},
  237.     {"Ganton",                      {2222.50,-1852.80,-89.00,2632.80,-1722.30,110.90}},
  238.     {"Ganton",                      {2222.50,-1722.30,-89.00,2632.80,-1628.50,110.90}},
  239.     {"Garcia",                      {-2411.20,-222.50,-0.00,-2173.00,265.20,200.00}},
  240.     {"Garcia",                      {-2395.10,-222.50,-5.30,-2354.00,-204.70,200.00}},
  241.     {"Garver Bridge",               {-1339.80,828.10,-89.00,-1213.90,1057.00,110.90}},
  242.     {"Garver Bridge",               {-1213.90,950.00,-89.00,-1087.90,1178.90,110.90}},
  243.     {"Garver Bridge",               {-1499.80,696.40,-179.60,-1339.80,925.30,20.30}},
  244.     {"Glen Park",                   {1812.60,-1449.60,-89.00,1996.90,-1350.70,110.90}},
  245.     {"Glen Park",                   {1812.60,-1100.80,-89.00,1994.30,-973.30,110.90}},
  246.     {"Glen Park",                   {1812.60,-1350.70,-89.00,2056.80,-1100.80,110.90}},
  247.     {"Green Palms",                 {176.50,1305.40,-3.00,338.60,1520.70,200.00}},
  248.     {"Greenglass College",          {964.30,1044.60,-89.00,1197.30,1203.20,110.90}},
  249.     {"Greenglass College",          {964.30,930.80,-89.00,1166.50,1044.60,110.90}},
  250.     {"Hampton Barns",               {603.00,264.30,0.00,761.90,366.50,200.00}},
  251.     {"Hankypanky Point",            {2576.90,62.10,0.00,2759.20,385.50,200.00}},
  252.     {"Harry Gold Parkway",          {1777.30,863.20,-89.00,1817.30,2342.80,110.90}},
  253.     {"Hashbury",                    {-2593.40,-222.50,-0.00,-2411.20,54.70,200.00}},
  254.     {"Hilltop Farm",                {967.30,-450.30,-3.00,1176.70,-217.90,200.00}},
  255.     {"Hunter Quarry",               {337.20,710.80,-115.20,860.50,1031.70,203.70}},
  256.     {"Idlewood",                    {1812.60,-1852.80,-89.00,1971.60,-1742.30,110.90}},
  257.     {"Idlewood",                    {1812.60,-1742.30,-89.00,1951.60,-1602.30,110.90}},
  258.     {"Idlewood",                    {1951.60,-1742.30,-89.00,2124.60,-1602.30,110.90}},
  259.     {"Idlewood",                    {1812.60,-1602.30,-89.00,2124.60,-1449.60,110.90}},
  260.     {"Idlewood",                    {2124.60,-1742.30,-89.00,2222.50,-1494.00,110.90}},
  261.     {"Idlewood",                    {1971.60,-1852.80,-89.00,2222.50,-1742.30,110.90}},
  262.     {"Jefferson",                   {1996.90,-1449.60,-89.00,2056.80,-1350.70,110.90}},
  263.     {"Jefferson",                   {2124.60,-1494.00,-89.00,2266.20,-1449.60,110.90}},
  264.     {"Jefferson",                   {2056.80,-1372.00,-89.00,2281.40,-1210.70,110.90}},
  265.     {"Jefferson",                   {2056.80,-1210.70,-89.00,2185.30,-1126.30,110.90}},
  266.     {"Jefferson",                   {2185.30,-1210.70,-89.00,2281.40,-1154.50,110.90}},
  267.     {"Jefferson",                   {2056.80,-1449.60,-89.00,2266.20,-1372.00,110.90}},
  268.     {"Julius Thruway East",         {2623.10,943.20,-89.00,2749.90,1055.90,110.90}},
  269.     {"Julius Thruway East",         {2685.10,1055.90,-89.00,2749.90,2626.50,110.90}},
  270.     {"Julius Thruway East",         {2536.40,2442.50,-89.00,2685.10,2542.50,110.90}},
  271.     {"Julius Thruway East",         {2625.10,2202.70,-89.00,2685.10,2442.50,110.90}},
  272.     {"Julius Thruway North",        {2498.20,2542.50,-89.00,2685.10,2626.50,110.90}},
  273.     {"Julius Thruway North",        {2237.40,2542.50,-89.00,2498.20,2663.10,110.90}},
  274.     {"Julius Thruway North",        {2121.40,2508.20,-89.00,2237.40,2663.10,110.90}},
  275.     {"Julius Thruway North",        {1938.80,2508.20,-89.00,2121.40,2624.20,110.90}},
  276.     {"Julius Thruway North",        {1534.50,2433.20,-89.00,1848.40,2583.20,110.90}},
  277.     {"Julius Thruway North",        {1848.40,2478.40,-89.00,1938.80,2553.40,110.90}},
  278.     {"Julius Thruway North",        {1704.50,2342.80,-89.00,1848.40,2433.20,110.90}},
  279.     {"Julius Thruway North",        {1377.30,2433.20,-89.00,1534.50,2507.20,110.90}},
  280.     {"Julius Thruway South",        {1457.30,823.20,-89.00,2377.30,863.20,110.90}},
  281.     {"Julius Thruway South",        {2377.30,788.80,-89.00,2537.30,897.90,110.90}},
  282.     {"Julius Thruway West",         {1197.30,1163.30,-89.00,1236.60,2243.20,110.90}},
  283.     {"Julius Thruway West",         {1236.60,2142.80,-89.00,1297.40,2243.20,110.90}},
  284.     {"Juniper Hill",                {-2533.00,578.30,-7.60,-2274.10,968.30,200.00}},
  285.     {"Juniper Hollow",              {-2533.00,968.30,-6.10,-2274.10,1358.90,200.00}},
  286.     {"K.A.C.C. Military Fuels",     {2498.20,2626.50,-89.00,2749.90,2861.50,110.90}},
  287.     {"Kincaid Bridge",              {-1339.80,599.20,-89.00,-1213.90,828.10,110.90}},
  288.     {"Kincaid Bridge",              {-1213.90,721.10,-89.00,-1087.90,950.00,110.90}},
  289.     {"Kincaid Bridge",              {-1087.90,855.30,-89.00,-961.90,986.20,110.90}},
  290.     {"King's",                      {-2329.30,458.40,-7.60,-1993.20,578.30,200.00}},
  291.     {"King's",                      {-2411.20,265.20,-9.10,-1993.20,373.50,200.00}},
  292.     {"King's",                      {-2253.50,373.50,-9.10,-1993.20,458.40,200.00}},
  293.     {"LVA Freight Depot",           {1457.30,863.20,-89.00,1777.40,1143.20,110.90}},
  294.     {"LVA Freight Depot",           {1375.60,919.40,-89.00,1457.30,1203.20,110.90}},
  295.     {"LVA Freight Depot",           {1277.00,1087.60,-89.00,1375.60,1203.20,110.90}},
  296.     {"LVA Freight Depot",           {1315.30,1044.60,-89.00,1375.60,1087.60,110.90}},
  297.     {"LVA Freight Depot",           {1236.60,1163.40,-89.00,1277.00,1203.20,110.90}},
  298.     {"Las Barrancas",               {-926.10,1398.70,-3.00,-719.20,1634.60,200.00}},
  299.     {"Las Brujas",                  {-365.10,2123.00,-3.00,-208.50,2217.60,200.00}},
  300.     {"Las Colinas",                 {1994.30,-1100.80,-89.00,2056.80,-920.80,110.90}},
  301.     {"Las Colinas",                 {2056.80,-1126.30,-89.00,2126.80,-920.80,110.90}},
  302.     {"Las Colinas",                 {2185.30,-1154.50,-89.00,2281.40,-934.40,110.90}},
  303.     {"Las Colinas",                 {2126.80,-1126.30,-89.00,2185.30,-934.40,110.90}},
  304.     {"Las Colinas",                 {2747.70,-1120.00,-89.00,2959.30,-945.00,110.90}},
  305.     {"Las Colinas",                 {2632.70,-1135.00,-89.00,2747.70,-945.00,110.90}},
  306.     {"Las Colinas",                 {2281.40,-1135.00,-89.00,2632.70,-945.00,110.90}},
  307.     {"Las Payasadas",               {-354.30,2580.30,2.00,-133.60,2816.80,200.00}},
  308.     {"Las Venturas Airport",        {1236.60,1203.20,-89.00,1457.30,1883.10,110.90}},
  309.     {"Las Venturas Airport",        {1457.30,1203.20,-89.00,1777.30,1883.10,110.90}},
  310.     {"Las Venturas Airport",        {1457.30,1143.20,-89.00,1777.40,1203.20,110.90}},
  311.     {"Las Venturas Airport",        {1515.80,1586.40,-12.50,1729.90,1714.50,87.50}},
  312.     {"Last Dime Motel",             {1823.00,596.30,-89.00,1997.20,823.20,110.90}},
  313.     {"Leafy Hollow",                {-1166.90,-1856.00,0.00,-815.60,-1602.00,200.00}},
  314.     {"Liberty City",                {-1000.00,400.00,1300.00,-700.00,600.00,1400.00}},
  315.     {"Lil' Probe Inn",              {-90.20,1286.80,-3.00,153.80,1554.10,200.00}},
  316.     {"Linden Side",                 {2749.90,943.20,-89.00,2923.30,1198.90,110.90}},
  317.     {"Linden Station",              {2749.90,1198.90,-89.00,2923.30,1548.90,110.90}},
  318.     {"Linden Station",              {2811.20,1229.50,-39.50,2861.20,1407.50,60.40}},
  319.     {"Little Mexico",               {1701.90,-1842.20,-89.00,1812.60,-1722.20,110.90}},
  320.     {"Little Mexico",               {1758.90,-1722.20,-89.00,1812.60,-1577.50,110.90}},
  321.     {"Los Flores",                  {2581.70,-1454.30,-89.00,2632.80,-1393.40,110.90}},
  322.     {"Los Flores",                  {2581.70,-1393.40,-89.00,2747.70,-1135.00,110.90}},
  323.     {"Los Santos International",    {1249.60,-2394.30,-89.00,1852.00,-2179.20,110.90}},
  324.     {"Los Santos International",    {1852.00,-2394.30,-89.00,2089.00,-2179.20,110.90}},
  325.     {"Los Santos International",    {1382.70,-2730.80,-89.00,2201.80,-2394.30,110.90}},
  326.     {"Los Santos International",    {1974.60,-2394.30,-39.00,2089.00,-2256.50,60.90}},
  327.     {"Los Santos International",    {1400.90,-2669.20,-39.00,2189.80,-2597.20,60.90}},
  328.     {"Los Santos International",    {2051.60,-2597.20,-39.00,2152.40,-2394.30,60.90}},
  329.     {"Marina",                      {647.70,-1804.20,-89.00,851.40,-1577.50,110.90}},
  330.     {"Marina",                      {647.70,-1577.50,-89.00,807.90,-1416.20,110.90}},
  331.     {"Marina",                      {807.90,-1577.50,-89.00,926.90,-1416.20,110.90}},
  332.     {"Market",                      {787.40,-1416.20,-89.00,1072.60,-1310.20,110.90}},
  333.     {"Market",                      {952.60,-1310.20,-89.00,1072.60,-1130.80,110.90}},
  334.     {"Market",                      {1072.60,-1416.20,-89.00,1370.80,-1130.80,110.90}},
  335.     {"Market",                      {926.90,-1577.50,-89.00,1370.80,-1416.20,110.90}},
  336.     {"Market Station",              {787.40,-1410.90,-34.10,866.00,-1310.20,65.80}},
  337.     {"Martin Bridge",               {-222.10,293.30,0.00,-122.10,476.40,200.00}},
  338.     {"Missionary Hill",             {-2994.40,-811.20,0.00,-2178.60,-430.20,200.00}},
  339.     {"Montgomery",                  {1119.50,119.50,-3.00,1451.40,493.30,200.00}},
  340.     {"Montgomery",                  {1451.40,347.40,-6.10,1582.40,420.80,200.00}},
  341.     {"Montgomery Intersection",     {1546.60,208.10,0.00,1745.80,347.40,200.00}},
  342.     {"Montgomery Intersection",     {1582.40,347.40,0.00,1664.60,401.70,200.00}},
  343.     {"Mulholland",                  {1414.00,-768.00,-89.00,1667.60,-452.40,110.90}},
  344.     {"Mulholland",                  {1281.10,-452.40,-89.00,1641.10,-290.90,110.90}},
  345.     {"Mulholland",                  {1269.10,-768.00,-89.00,1414.00,-452.40,110.90}},
  346.     {"Mulholland",                  {1357.00,-926.90,-89.00,1463.90,-768.00,110.90}},
  347.     {"Mulholland",                  {1318.10,-910.10,-89.00,1357.00,-768.00,110.90}},
  348.     {"Mulholland",                  {1169.10,-910.10,-89.00,1318.10,-768.00,110.90}},
  349.     {"Mulholland",                  {768.60,-954.60,-89.00,952.60,-860.60,110.90}},
  350.     {"Mulholland",                  {687.80,-860.60,-89.00,911.80,-768.00,110.90}},
  351.     {"Mulholland",                  {737.50,-768.00,-89.00,1142.20,-674.80,110.90}},
  352.     {"Mulholland",                  {1096.40,-910.10,-89.00,1169.10,-768.00,110.90}},
  353.     {"Mulholland",                  {952.60,-937.10,-89.00,1096.40,-860.60,110.90}},
  354.     {"Mulholland",                  {911.80,-860.60,-89.00,1096.40,-768.00,110.90}},
  355.     {"Mulholland",                  {861.00,-674.80,-89.00,1156.50,-600.80,110.90}},
  356.     {"Mulholland Intersection",     {1463.90,-1150.80,-89.00,1812.60,-768.00,110.90}},
  357.     {"North Rock",                  {2285.30,-768.00,0.00,2770.50,-269.70,200.00}},
  358.     {"Ocean Docks",                 {2373.70,-2697.00,-89.00,2809.20,-2330.40,110.90}},
  359.     {"Ocean Docks",                 {2201.80,-2418.30,-89.00,2324.00,-2095.00,110.90}},
  360.     {"Ocean Docks",                 {2324.00,-2302.30,-89.00,2703.50,-2145.10,110.90}},
  361.     {"Ocean Docks",                 {2089.00,-2394.30,-89.00,2201.80,-2235.80,110.90}},
  362.     {"Ocean Docks",                 {2201.80,-2730.80,-89.00,2324.00,-2418.30,110.90}},
  363.     {"Ocean Docks",                 {2703.50,-2302.30,-89.00,2959.30,-2126.90,110.90}},
  364.     {"Ocean Docks",                 {2324.00,-2145.10,-89.00,2703.50,-2059.20,110.90}},
  365.     {"Ocean Flats",                 {-2994.40,277.40,-9.10,-2867.80,458.40,200.00}},
  366.     {"Ocean Flats",                 {-2994.40,-222.50,-0.00,-2593.40,277.40,200.00}},
  367.     {"Ocean Flats",                 {-2994.40,-430.20,-0.00,-2831.80,-222.50,200.00}},
  368.     {"Octane Springs",              {338.60,1228.50,0.00,664.30,1655.00,200.00}},
  369.     {"Old Venturas Strip",          {2162.30,2012.10,-89.00,2685.10,2202.70,110.90}},
  370.     {"Palisades",                   {-2994.40,458.40,-6.10,-2741.00,1339.60,200.00}},
  371.     {"Palomino Creek",              {2160.20,-149.00,0.00,2576.90,228.30,200.00}},
  372.     {"Paradiso",                    {-2741.00,793.40,-6.10,-2533.00,1268.40,200.00}},
  373.     {"Pershing Square",             {1440.90,-1722.20,-89.00,1583.50,-1577.50,110.90}},
  374.     {"Pilgrim",                     {2437.30,1383.20,-89.00,2624.40,1783.20,110.90}},
  375.     {"Pilgrim",                     {2624.40,1383.20,-89.00,2685.10,1783.20,110.90}},
  376.     {"Pilson Intersection",         {1098.30,2243.20,-89.00,1377.30,2507.20,110.90}},
  377.     {"Pirates in Men's Pants",      {1817.30,1469.20,-89.00,2027.40,1703.20,110.90}},
  378.     {"Playa del Seville",           {2703.50,-2126.90,-89.00,2959.30,-1852.80,110.90}},
  379.     {"Prickle Pine",                {1534.50,2583.20,-89.00,1848.40,2863.20,110.90}},
  380.     {"Prickle Pine",                {1117.40,2507.20,-89.00,1534.50,2723.20,110.90}},
  381.     {"Prickle Pine",                {1848.40,2553.40,-89.00,1938.80,2863.20,110.90}},
  382.     {"Prickle Pine",                {1938.80,2624.20,-89.00,2121.40,2861.50,110.90}},
  383.     {"Queens",                      {-2533.00,458.40,0.00,-2329.30,578.30,200.00}},
  384.     {"Queens",                      {-2593.40,54.70,0.00,-2411.20,458.40,200.00}},
  385.     {"Queens",                      {-2411.20,373.50,0.00,-2253.50,458.40,200.00}},
  386.     {"Randolph Industrial",         {1558.00,596.30,-89.00,1823.00,823.20,110.90}},
  387.     {"Redsands East",               {1817.30,2011.80,-89.00,2106.70,2202.70,110.90}},
  388.     {"Redsands East",               {1817.30,2202.70,-89.00,2011.90,2342.80,110.90}},
  389.     {"Redsands East",               {1848.40,2342.80,-89.00,2011.90,2478.40,110.90}},
  390.     {"Redsands West",               {1236.60,1883.10,-89.00,1777.30,2142.80,110.90}},
  391.     {"Redsands West",               {1297.40,2142.80,-89.00,1777.30,2243.20,110.90}},
  392.     {"Redsands West",               {1377.30,2243.20,-89.00,1704.50,2433.20,110.90}},
  393.     {"Redsands West",               {1704.50,2243.20,-89.00,1777.30,2342.80,110.90}},
  394.     {"Regular Tom",                 {-405.70,1712.80,-3.00,-276.70,1892.70,200.00}},
  395.     {"Richman",                     {647.50,-1118.20,-89.00,787.40,-954.60,110.90}},
  396.     {"Richman",                     {647.50,-954.60,-89.00,768.60,-860.60,110.90}},
  397.     {"Richman",                     {225.10,-1369.60,-89.00,334.50,-1292.00,110.90}},
  398.     {"Richman",                     {225.10,-1292.00,-89.00,466.20,-1235.00,110.90}},
  399.     {"Richman",                     {72.60,-1404.90,-89.00,225.10,-1235.00,110.90}},
  400.     {"Richman",                     {72.60,-1235.00,-89.00,321.30,-1008.10,110.90}},
  401.     {"Richman",                     {321.30,-1235.00,-89.00,647.50,-1044.00,110.90}},
  402.     {"Richman",                     {321.30,-1044.00,-89.00,647.50,-860.60,110.90}},
  403.     {"Richman",                     {321.30,-860.60,-89.00,687.80,-768.00,110.90}},
  404.     {"Richman",                     {321.30,-768.00,-89.00,700.70,-674.80,110.90}},
  405.     {"Robada Intersection",         {-1119.00,1178.90,-89.00,-862.00,1351.40,110.90}},
  406.     {"Roca Escalante",              {2237.40,2202.70,-89.00,2536.40,2542.50,110.90}},
  407.     {"Roca Escalante",              {2536.40,2202.70,-89.00,2625.10,2442.50,110.90}},
  408.     {"Rockshore East",              {2537.30,676.50,-89.00,2902.30,943.20,110.90}},
  409.     {"Rockshore West",              {1997.20,596.30,-89.00,2377.30,823.20,110.90}},
  410.     {"Rockshore West",              {2377.30,596.30,-89.00,2537.30,788.80,110.90}},
  411.     {"Rodeo",                       {72.60,-1684.60,-89.00,225.10,-1544.10,110.90}},
  412.     {"Rodeo",                       {72.60,-1544.10,-89.00,225.10,-1404.90,110.90}},
  413.     {"Rodeo",                       {225.10,-1684.60,-89.00,312.80,-1501.90,110.90}},
  414.     {"Rodeo",                       {225.10,-1501.90,-89.00,334.50,-1369.60,110.90}},
  415.     {"Rodeo",                       {334.50,-1501.90,-89.00,422.60,-1406.00,110.90}},
  416.     {"Rodeo",                       {312.80,-1684.60,-89.00,422.60,-1501.90,110.90}},
  417.     {"Rodeo",                       {422.60,-1684.60,-89.00,558.00,-1570.20,110.90}},
  418.     {"Rodeo",                       {558.00,-1684.60,-89.00,647.50,-1384.90,110.90}},
  419.     {"Rodeo",                       {466.20,-1570.20,-89.00,558.00,-1385.00,110.90}},
  420.     {"Rodeo",                       {422.60,-1570.20,-89.00,466.20,-1406.00,110.90}},
  421.     {"Rodeo",                       {466.20,-1385.00,-89.00,647.50,-1235.00,110.90}},
  422.     {"Rodeo",                       {334.50,-1406.00,-89.00,466.20,-1292.00,110.90}},
  423.     {"Royal Casino",                {2087.30,1383.20,-89.00,2437.30,1543.20,110.90}},
  424.     {"San Andreas Sound",           {2450.30,385.50,-100.00,2759.20,562.30,200.00}},
  425.     {"Santa Flora",                 {-2741.00,458.40,-7.60,-2533.00,793.40,200.00}},
  426.     {"Santa Maria Beach",           {342.60,-2173.20,-89.00,647.70,-1684.60,110.90}},
  427.     {"Santa Maria Beach",           {72.60,-2173.20,-89.00,342.60,-1684.60,110.90}},
  428.     {"Shady Cabin",                 {-1632.80,-2263.40,-3.00,-1601.30,-2231.70,200.00}},
  429.     {"Shady Creeks",                {-1820.60,-2643.60,-8.00,-1226.70,-1771.60,200.00}},
  430.     {"Shady Creeks",                {-2030.10,-2174.80,-6.10,-1820.60,-1771.60,200.00}},
  431.     {"Sobell Rail Yards",           {2749.90,1548.90,-89.00,2923.30,1937.20,110.90}},
  432.     {"Spinybed",                    {2121.40,2663.10,-89.00,2498.20,2861.50,110.90}},
  433.     {"Starfish Casino",             {2437.30,1783.20,-89.00,2685.10,2012.10,110.90}},
  434.     {"Starfish Casino",             {2437.30,1858.10,-39.00,2495.00,1970.80,60.90}},
  435.     {"Starfish Casino",             {2162.30,1883.20,-89.00,2437.30,2012.10,110.90}},
  436.     {"Temple",                      {1252.30,-1130.80,-89.00,1378.30,-1026.30,110.90}},
  437.     {"Temple",                      {1252.30,-1026.30,-89.00,1391.00,-926.90,110.90}},
  438.     {"Temple",                      {1252.30,-926.90,-89.00,1357.00,-910.10,110.90}},
  439.     {"Temple",                      {952.60,-1130.80,-89.00,1096.40,-937.10,110.90}},
  440.     {"Temple",                      {1096.40,-1130.80,-89.00,1252.30,-1026.30,110.90}},
  441.     {"Temple",                      {1096.40,-1026.30,-89.00,1252.30,-910.10,110.90}},
  442.     {"The Camel's Toe",             {2087.30,1203.20,-89.00,2640.40,1383.20,110.90}},
  443.     {"The Clown's Pocket",          {2162.30,1783.20,-89.00,2437.30,1883.20,110.90}},
  444.     {"The Emerald Isle",            {2011.90,2202.70,-89.00,2237.40,2508.20,110.90}},
  445.     {"The Farm",                    {-1209.60,-1317.10,114.90,-908.10,-787.30,251.90}},
  446.     {"Four Dragons Casino",         {1817.30,863.20,-89.00,2027.30,1083.20,110.90}},
  447.     {"The High Roller",             {1817.30,1283.20,-89.00,2027.30,1469.20,110.90}},
  448.     {"The Mako Span",               {1664.60,401.70,0.00,1785.10,567.20,200.00}},
  449.     {"The Panopticon",              {-947.90,-304.30,-1.10,-319.60,327.00,200.00}},
  450.     {"The Pink Swan",               {1817.30,1083.20,-89.00,2027.30,1283.20,110.90}},
  451.     {"The Sherman Dam",             {-968.70,1929.40,-3.00,-481.10,2155.20,200.00}},
  452.     {"The Strip",                   {2027.40,863.20,-89.00,2087.30,1703.20,110.90}},
  453.     {"The Strip",                   {2106.70,1863.20,-89.00,2162.30,2202.70,110.90}},
  454.     {"The Strip",                   {2027.40,1783.20,-89.00,2162.30,1863.20,110.90}},
  455.     {"The Strip",                   {2027.40,1703.20,-89.00,2137.40,1783.20,110.90}},
  456.     {"The Visage",                  {1817.30,1863.20,-89.00,2106.70,2011.80,110.90}},
  457.     {"The Visage",                  {1817.30,1703.20,-89.00,2027.40,1863.20,110.90}},
  458.     {"Unity Station",               {1692.60,-1971.80,-20.40,1812.60,-1932.80,79.50}},
  459.     {"Valle Ocultado",              {-936.60,2611.40,2.00,-715.90,2847.90,200.00}},
  460.     {"Verdant Bluffs",              {930.20,-2488.40,-89.00,1249.60,-2006.70,110.90}},
  461.     {"Verdant Bluffs",              {1073.20,-2006.70,-89.00,1249.60,-1842.20,110.90}},
  462.     {"Verdant Bluffs",              {1249.60,-2179.20,-89.00,1692.60,-1842.20,110.90}},
  463.     {"Verdant Meadows",             {37.00,2337.10,-3.00,435.90,2677.90,200.00}},
  464.     {"Verona Beach",                {647.70,-2173.20,-89.00,930.20,-1804.20,110.90}},
  465.     {"Verona Beach",                {930.20,-2006.70,-89.00,1073.20,-1804.20,110.90}},
  466.     {"Verona Beach",                {851.40,-1804.20,-89.00,1046.10,-1577.50,110.90}},
  467.     {"Verona Beach",                {1161.50,-1722.20,-89.00,1323.90,-1577.50,110.90}},
  468.     {"Verona Beach",                {1046.10,-1722.20,-89.00,1161.50,-1577.50,110.90}},
  469.     {"Vinewood",                    {787.40,-1310.20,-89.00,952.60,-1130.80,110.90}},
  470.     {"Vinewood",                    {787.40,-1130.80,-89.00,952.60,-954.60,110.90}},
  471.     {"Vinewood",                    {647.50,-1227.20,-89.00,787.40,-1118.20,110.90}},
  472.     {"Vinewood",                    {647.70,-1416.20,-89.00,787.40,-1227.20,110.90}},
  473.     {"Whitewood Estates",           {883.30,1726.20,-89.00,1098.30,2507.20,110.90}},
  474.     {"Whitewood Estates",           {1098.30,1726.20,-89.00,1197.30,2243.20,110.90}},
  475.     {"Willowfield",                 {1970.60,-2179.20,-89.00,2089.00,-1852.80,110.90}},
  476.     {"Willowfield",                 {2089.00,-2235.80,-89.00,2201.80,-1989.90,110.90}},
  477.     {"Willowfield",                 {2089.00,-1989.90,-89.00,2324.00,-1852.80,110.90}},
  478.     {"Willowfield",                 {2201.80,-2095.00,-89.00,2324.00,-1989.90,110.90}},
  479.     {"Willowfield",                 {2541.70,-1941.40,-89.00,2703.50,-1852.80,110.90}},
  480.     {"Willowfield",                 {2324.00,-2059.20,-89.00,2541.70,-1852.80,110.90}},
  481.     {"Willowfield",                 {2541.70,-2059.20,-89.00,2703.50,-1941.40,110.90}},
  482.     {"Yellow Bell Station",         {1377.40,2600.40,-21.90,1492.40,2687.30,78.00}},
  483.     // Citys Zones
  484.     {"Los Santos",                  {44.60,-2892.90,-242.90,2997.00,-768.00,900.00}},
  485.     {"Las Venturas",                {869.40,596.30,-242.90,2997.00,2993.80,900.00}},
  486.     {"Bone County",                 {-480.50,596.30,-242.90,869.40,2993.80,900.00}},
  487.     {"Tierra Robada",               {-2997.40,1659.60,-242.90,-480.50,2993.80,900.00}},
  488.     {"Tierra Robada",               {-1213.90,596.30,-242.90,-480.50,1659.60,900.00}},
  489.     {"San Fierro",                  {-2997.40,-1115.50,-242.90,-1213.90,1659.60,900.00}},
  490.     {"Red County",                  {-1213.90,-768.00,-242.90,2997.00,596.30,900.00}},
  491.     {"Flint County",                {-1213.90,-2892.90,-242.90,44.60,-768.00,900.00}},
  492.     {"Whetstone",                   {-2997.40,-2892.90,-242.90,-1213.90,-1115.50,900.00}}
  493. };
  494.  
  495.  
  496. public OnFilterScriptInit()
  497. {
  498.     print("\n--------------------------------------");
  499.     print(" Sistema de Casas Traduzido !");
  500.     print("--------------------------------------\n");
  501.     DisableInteriorEnterExits();
  502.     SetTimer("GlobalTimer",1000,true);
  503.     for(new i = 0; i <= MAX_HOUSE; i++)
  504.     {
  505.         new gFile[35];
  506.         format(gFile, 35, House_File ,i);
  507.         if(fexist(gFile))
  508.         {
  509.         INI_ParseFile(gFile, "LoadHouse", .bExtra = true, .extra = i);
  510.         ReadHouse(i);
  511.         }
  512.     }
  513.     return 1;
  514. }
  515.  
  516. public OnFilterScriptExit()
  517. {
  518.     return 1;
  519. }
  520.  
  521. main()
  522. {
  523.     /*print("\n----------------------------------");
  524.     print(" Blank Gamemode by your name here");
  525.     print("----------------------------------\n");*/
  526. }
  527.  
  528.  
  529. public OnGameModeInit()
  530. {
  531.     AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  532.     return 1;
  533. }
  534.  
  535. public OnGameModeExit()
  536. {
  537.     return 1;
  538. }
  539.  
  540. public OnPlayerRequestClass(playerid, classid)
  541. {
  542.     SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  543.     SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  544.     SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  545.     return 1;
  546. }
  547.  
  548. public OnPlayerConnect(playerid)
  549. {
  550. SetPlayerInterior(playerid, 0);
  551. SetPlayerVirtualWorld(playerid, 0);
  552. Player[playerid][Houseid] = 999;
  553. Phone0[playerid] = TextDrawCreate(48.000000, 150.000000, "~n~");
  554. TextDrawBackgroundColor(Phone0[playerid], 255);
  555. TextDrawFont(Phone0[playerid], 1);
  556. TextDrawLetterSize(Phone0[playerid], 0.500000, 14.199999);
  557. TextDrawColor(Phone0[playerid], -1);
  558. TextDrawSetOutline(Phone0[playerid], 0);
  559. TextDrawSetProportional(Phone0[playerid], 1);
  560. TextDrawSetShadow(Phone0[playerid], 1);
  561. TextDrawUseBox(Phone0[playerid], 1);
  562. TextDrawBoxColor(Phone0[playerid], 100);
  563. TextDrawTextSize(Phone0[playerid], 130.000000, 0.000000);
  564.  
  565. Phone1[playerid] = TextDrawCreate(59.000000, 216.000000, "1 2 3~n~4 5 6~n~7 8 9~n~* 0 #");
  566. TextDrawBackgroundColor(Phone1[playerid], 255);
  567. TextDrawFont(Phone1[playerid], 1);
  568. TextDrawLetterSize(Phone1[playerid], 0.559997, 1.299998);
  569. TextDrawColor(Phone1[playerid], -1);
  570. TextDrawSetOutline(Phone1[playerid], 0);
  571. TextDrawSetProportional(Phone1[playerid], 1);
  572. TextDrawSetShadow(Phone1[playerid], 1);
  573.  
  574. Phone2[playerid] = TextDrawCreate(56.000000, 170.000000, "~n~");
  575. TextDrawBackgroundColor(Phone2[playerid], 255);
  576. TextDrawFont(Phone2[playerid], 1);
  577. TextDrawLetterSize(Phone2[playerid], 1.000000, 4.000000);
  578. TextDrawColor(Phone2[playerid], -1);
  579. TextDrawSetOutline(Phone2[playerid], 0);
  580. TextDrawSetProportional(Phone2[playerid], 1);
  581. TextDrawSetShadow(Phone2[playerid], 1);
  582. TextDrawUseBox(Phone2[playerid], 1);
  583. TextDrawBoxColor(Phone2[playerid], 310843903);
  584. TextDrawTextSize(Phone2[playerid], 119.000000, 0.000000);
  585.  
  586. Phone3[playerid] = TextDrawCreate(120.000000, 126.000000, "~n~");
  587. TextDrawBackgroundColor(Phone3[playerid], 255);
  588. TextDrawFont(Phone3[playerid], 1);
  589. TextDrawLetterSize(Phone3[playerid], 0.500000, 2.000000);
  590. TextDrawColor(Phone3[playerid], -1);
  591. TextDrawSetOutline(Phone3[playerid], 0);
  592. TextDrawSetProportional(Phone3[playerid], 1);
  593. TextDrawSetShadow(Phone3[playerid], 1);
  594. TextDrawUseBox(Phone3[playerid], 1);
  595. TextDrawBoxColor(Phone3[playerid], 100);
  596. TextDrawTextSize(Phone3[playerid], 120.000000, 0.000000);
  597.  
  598. Phone4[playerid] = TextDrawCreate(53.000000, 182.000000, "Call 1111");
  599. TextDrawBackgroundColor(Phone4[playerid], 255);
  600. TextDrawFont(Phone4[playerid], 2);
  601. TextDrawLetterSize(Phone4[playerid], 0.289999, 1.000000);
  602. TextDrawColor(Phone4[playerid], -1);
  603. TextDrawSetOutline(Phone4[playerid], 1);
  604. TextDrawSetProportional(Phone4[playerid], 1);
  605.  
  606. Phone5[playerid] = TextDrawCreate(69.000000, 150.000000, "ooo~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~ooo");
  607. TextDrawBackgroundColor(Phone5[playerid], 255);
  608. TextDrawFont(Phone5[playerid], 1);
  609. TextDrawLetterSize(Phone5[playerid], 0.500000, 1.000000);
  610. TextDrawColor(Phone5[playerid], -1);
  611. TextDrawSetOutline(Phone5[playerid], 1);
  612. TextDrawSetProportional(Phone5[playerid], 1);
  613.  
  614. hUp[playerid] = TextDrawCreate(260.000000, 363.000000, "  Atualização de casa~n~~n~~r~< ~w~Preço: ~g~$90000 ~r~>");
  615. TextDrawBackgroundColor(hUp[playerid], 255);
  616. TextDrawFont(hUp[playerid], 2);
  617. TextDrawLetterSize(hUp[playerid], 0.349999, 1.200000);
  618. TextDrawColor(hUp[playerid], -1);
  619. TextDrawSetOutline(hUp[playerid], 1);
  620. TextDrawSetProportional(hUp[playerid], 1);
  621.  
  622. LockTD0[playerid] = TextDrawCreate(37.000000, 150.000000, "~n~");
  623. TextDrawBackgroundColor(LockTD0[playerid], 255);
  624. TextDrawFont(LockTD0[playerid], 1);
  625. TextDrawLetterSize(LockTD0[playerid], 0.500000, 6.899999);
  626. TextDrawColor(LockTD0[playerid], -1);
  627. TextDrawSetOutline(LockTD0[playerid], 0);
  628. TextDrawSetProportional(LockTD0[playerid], 1);
  629. TextDrawSetShadow(LockTD0[playerid], 1);
  630. TextDrawUseBox(LockTD0[playerid], 1);
  631. TextDrawBoxColor(LockTD0[playerid], -206);
  632. TextDrawTextSize(LockTD0[playerid], 150.000000, 0.000000);
  633.  
  634. LockTD1[playerid] = TextDrawCreate(47.000000, 162.000000, "~n~");
  635. TextDrawBackgroundColor(LockTD1[playerid], 255);
  636. TextDrawFont(LockTD1[playerid], 1);
  637. TextDrawLetterSize(LockTD1[playerid], 0.500000, 3.399998);
  638. TextDrawColor(LockTD1[playerid], -1);
  639. TextDrawSetOutline(LockTD1[playerid], 0);
  640. TextDrawSetProportional(LockTD1[playerid], 1);
  641. TextDrawSetShadow(LockTD1[playerid], 1);
  642. TextDrawUseBox(LockTD1[playerid], 1);
  643. TextDrawBoxColor(LockTD1[playerid], -1633968897);
  644. TextDrawTextSize(LockTD1[playerid], 79.000000, 10.000000);
  645.  
  646. LockTD2[playerid] = TextDrawCreate(45.000000, 171.000000, "1234");
  647. TextDrawBackgroundColor(LockTD2[playerid], 255);
  648. TextDrawFont(LockTD2[playerid], 3);
  649. TextDrawLetterSize(LockTD2[playerid], 0.380000, 0.899999);
  650. TextDrawColor(LockTD2[playerid], -1199695105);
  651. TextDrawSetOutline(LockTD2[playerid], 1);
  652. TextDrawSetProportional(LockTD2[playerid], 1);
  653.  
  654. LockTD3[playerid] = TextDrawCreate(95.000000, 157.000000, "~r~1 ~w~2 3~n~4 5 6~n~7 8 9~n~  0");
  655. TextDrawBackgroundColor(LockTD3[playerid], 255);
  656. TextDrawFont(LockTD3[playerid], 1);
  657. TextDrawLetterSize(LockTD3[playerid], 0.450000, 1.000000);
  658. TextDrawColor(LockTD3[playerid], -1);
  659. TextDrawSetOutline(LockTD3[playerid], 1);
  660. TextDrawSetProportional(LockTD3[playerid], 1);
  661.  
  662. LockTD4[playerid] = TextDrawCreate(44.000000, 200.000000, "Digite Fechar");
  663. TextDrawBackgroundColor(LockTD4[playerid], 255);
  664. TextDrawFont(LockTD4[playerid], 1);
  665. TextDrawLetterSize(LockTD4[playerid], 0.460000, 1.000000);
  666. TextDrawColor(LockTD4[playerid], -1);
  667. TextDrawSetOutline(LockTD4[playerid], 1);
  668. TextDrawSetProportional(LockTD4[playerid], 1);
  669.  
  670. LockTD5[playerid] = TextDrawCreate(34.000000, 149.000000, "~n~");
  671. TextDrawBackgroundColor(LockTD5[playerid], 255);
  672. TextDrawFont(LockTD5[playerid], 1);
  673. TextDrawLetterSize(LockTD5[playerid], 0.500000, -0.400000);
  674. TextDrawColor(LockTD5[playerid], -1);
  675. TextDrawSetOutline(LockTD5[playerid], 0);
  676. TextDrawSetProportional(LockTD5[playerid], 1);
  677. TextDrawSetShadow(LockTD5[playerid], 1);
  678. TextDrawUseBox(LockTD5[playerid], 1);
  679. TextDrawBoxColor(LockTD5[playerid], -1166599937);
  680. TextDrawTextSize(LockTD5[playerid], 153.000000, 0.000000);
  681.  
  682. LockTD6[playerid] = TextDrawCreate(34.000000, 217.000000, "~n~");
  683. TextDrawBackgroundColor(LockTD6[playerid], 255);
  684. TextDrawFont(LockTD6[playerid], 1);
  685. TextDrawLetterSize(LockTD6[playerid], 0.500000, -0.400000);
  686. TextDrawColor(LockTD6[playerid], -1);
  687. TextDrawSetOutline(LockTD6[playerid], 0);
  688. TextDrawSetProportional(LockTD6[playerid], 1);
  689. TextDrawSetShadow(LockTD6[playerid], 1);
  690. TextDrawUseBox(LockTD6[playerid], 1);
  691. TextDrawBoxColor(LockTD6[playerid], -1166599937);
  692. TextDrawTextSize(LockTD6[playerid], 153.000000, 0.000000);
  693. new pFile[48];
  694. format(pFile, 48, FILE_FOR_PLAYER, GetName(playerid));
  695.  
  696. if(!fexist(pFile))
  697. {
  698.     new
  699.     INI:UserFile = INI_Open(pFile);
  700.     INI_WriteFloat(UserFile, "pSpawnX", 0);
  701.     INI_WriteFloat(UserFile, "pSpawnY", 0);
  702.     INI_WriteFloat(UserFile, "pSpawnZ", 0);
  703.     INI_WriteInt(UserFile, "pSpawn",0);
  704.     INI_WriteInt(UserFile, "pSpawnInt", 0);
  705.     INI_WriteInt(UserFile, "pVW", 0);
  706.     INI_WriteInt(UserFile, "RobHouse", 0);
  707.     INI_WriteInt(UserFile, "HouseID", 999);
  708.     INI_WriteInt(UserFile, "Bill", 0);
  709.     INI_Close(UserFile);
  710. }
  711. INI_ParseFile(pFile, "LoadPlayerData", .bExtra = true, .extra = playerid);
  712. return 1;
  713. }
  714.  
  715. public OnPlayerDisconnect(playerid, reason)
  716. {
  717.     TextDrawDestroy(LockTD0[playerid]);
  718.     TextDrawDestroy(LockTD1[playerid]);
  719.     TextDrawDestroy(LockTD2[playerid]);
  720.     TextDrawDestroy(LockTD3[playerid]);
  721.     TextDrawDestroy(LockTD4[playerid]);
  722.     TextDrawDestroy(LockTD5[playerid]);
  723.     TextDrawDestroy(LockTD6[playerid]);
  724.     TextDrawDestroy(hUp[playerid]);
  725.     TextDrawDestroy(Phone0[playerid]);
  726.     TextDrawDestroy(Phone1[playerid]);
  727.     TextDrawDestroy(Phone2[playerid]);
  728.     TextDrawDestroy(Phone3[playerid]);
  729.     TextDrawDestroy(Phone4[playerid]);
  730.     TextDrawDestroy(Phone5[playerid]);
  731.     new
  732.         pFile[35];
  733.  
  734.    format(pFile, 35, FILE_FOR_PLAYER, GetName(playerid));
  735.     new
  736.     INI:UserFile = INI_Open(pFile);
  737.     INI_WriteFloat(UserFile, "pSpawnX", Player[playerid][SpawnX]);
  738.     INI_WriteFloat(UserFile, "pSpawnY", Player[playerid][SpawnY]);
  739.     INI_WriteFloat(UserFile, "pSpawnZ", Player[playerid][SpawnZ]);
  740.     INI_WriteInt(UserFile, "pSpawn", Player[playerid][Spawn]);
  741.     INI_WriteInt(UserFile, "pSpawnInt", Player[playerid][SpawnInt]);
  742.     INI_WriteInt(UserFile, "pVW", Player[playerid][SpawnVW]);
  743.     INI_WriteInt(UserFile, "RobHouse", Player[playerid][RobHouse]);
  744.     INI_WriteInt(UserFile, "HouseID", Player[playerid][Houseid]);
  745.     INI_WriteInt(UserFile, "Bill", Player[playerid][Min]);
  746.     INI_Close(UserFile);
  747.     return 1;
  748. }
  749. forward LoadPlayerData(playerid, name[], value[]);
  750. public LoadPlayerData(playerid, name[], value[])
  751. {
  752.     INI_Float("pSpawnX", Player[playerid][SpawnX]);
  753.     INI_Float("pSpawnY", Player[playerid][SpawnY]);
  754.     INI_Float("pSpawnZ", Player[playerid][SpawnZ]);
  755.     INI_Int("pSpawn", Player[playerid][Spawn]);
  756.     INI_Int("pSpawnInt", Player[playerid][SpawnInt]);
  757.     INI_Int("pVW", Player[playerid][SpawnVW]);
  758.     INI_Int("RobHouse", Player[playerid][RobHouse]);
  759.     INI_Int("HouseID", Player[playerid][Houseid]);
  760.     INI_Int("Bill", Player[playerid][Min]);
  761.     return 1;
  762. }
  763. public OnPlayerSpawn(playerid)
  764. {
  765. if(Player[playerid][Spawn] == 1)
  766. {
  767.     SetPlayerPos(playerid,Player[playerid][SpawnX],Player[playerid][SpawnY],Player[playerid][SpawnZ]);
  768.     SetPlayerInterior(playerid,Player[playerid][SpawnInt]);
  769.     SetPlayerVirtualWorld(playerid,Player[playerid][SpawnVW]);
  770. }
  771. return 1;
  772. }
  773.  
  774. public OnPlayerDeath(playerid, killerid, reason)
  775. {
  776.     return 1;
  777. }
  778.  
  779. public OnVehicleSpawn(vehicleid)
  780. {
  781.     return 1;
  782. }
  783.  
  784. public OnVehicleDeath(vehicleid, killerid)
  785. {
  786.     return 1;
  787. }
  788.  
  789.  
  790. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  791. {
  792.     new string[64],Float:Pos[3]; GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
  793.                 if(strcmp(HouseOwner[vehicleid],GetName(playerid),false) == 0)
  794.                 {
  795.                 }
  796.                 else
  797.                 {
  798.                     format(string,128,"{1BBCE0}Proprietário: "COL_WHITE"%s",HouseOwner[vehicleid]);
  799.                     SCM(playerid,-1,string);
  800.                     SCM(playerid,-1,"{1BBCE0}Você não tem uma chave.");
  801.                     SetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
  802.                 }
  803.     return 1;
  804. }
  805.  
  806. public OnPlayerExitVehicle(playerid, vehicleid)
  807. {
  808.     return 1;
  809. }
  810.  
  811. public OnPlayerStateChange(playerid, newstate, oldstate)
  812. {
  813.     return 1;
  814. }
  815.  
  816. public OnPlayerEnterCheckpoint(playerid)
  817. {
  818.     new i = Player[playerid][Houseid];
  819.     if(PlayerCP[playerid] == 1)
  820.     {
  821.     if(IsPlayerInRangeOfPoint(playerid,2.0,House[i][EnterX],House[i][EnterY],House[i][EnterZ]))
  822.     {
  823.         DisablePlayerCheckpoint(playerid);
  824.         PlayerCP[playerid] = 0;
  825.     }
  826.     }
  827.     return 1;
  828. }
  829.  
  830. public OnPlayerLeaveCheckpoint(playerid)
  831. {
  832.     return 1;
  833. }
  834.  
  835. public OnPlayerEnterRaceCheckpoint(playerid)
  836. {
  837.     return 1;
  838. }
  839.  
  840. public OnPlayerLeaveRaceCheckpoint(playerid)
  841. {
  842.     return 1;
  843. }
  844.  
  845. public OnRconCommand(cmd[])
  846. {
  847.     return 1;
  848. }
  849.  
  850. public OnPlayerRequestSpawn(playerid)
  851. {
  852.     return 1;
  853. }
  854.  
  855. public OnObjectMoved(objectid)
  856. {
  857.     return 1;
  858. }
  859.  
  860. public OnPlayerObjectMoved(playerid, objectid)
  861. {
  862.     return 1;
  863. }
  864.  
  865. public OnPlayerPickUpPickup(playerid, pickupid)
  866. {
  867.     return 1;
  868. }
  869.  
  870. public OnVehicleMod(playerid, vehicleid, componentid)
  871. {
  872.     return 1;
  873. }
  874.  
  875. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  876. {
  877.     return 1;
  878. }
  879.  
  880. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  881. {
  882.     return 1;
  883. }
  884.  
  885. public OnPlayerSelectedMenuRow(playerid, row)
  886. {
  887.     return 1;
  888. }
  889.  
  890. public OnPlayerExitedMenu(playerid)
  891. {
  892.     return 1;
  893. }
  894.  
  895. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  896. {
  897.     return 1;
  898. }
  899.  
  900. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  901. {
  902.     if(newkeys == KEY_SECONDARY_ATTACK)
  903.     {
  904.         if(PhoneChoose[playerid] == 1)
  905.             {
  906.             if(strlen(TypeText[playerid]) >= 4) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Apenas o número 4 por favor!");
  907.             strcat(TypeText[playerid], "1");
  908.             TextDrawSetString(Phone4[playerid],TypeText[playerid]);
  909.             }
  910.         else if(PhoneChoose[playerid] == 2)
  911.             {
  912.             if(strlen(TypeText[playerid]) >= 4) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Apenas o número 4 por favor");
  913.             strcat(TypeText[playerid], "2");
  914.             TextDrawSetString(Phone4[playerid],TypeText[playerid]);
  915.             }
  916.         else if(PhoneChoose[playerid] == 3)
  917.             {
  918.             if(strlen(TypeText[playerid]) >= 4) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Apenas o número 4 por favor");
  919.             strcat(TypeText[playerid], "3");
  920.             TextDrawSetString(Phone4[playerid],TypeText[playerid]);
  921.             }
  922.         else if(PhoneChoose[playerid] == 4)
  923.             {
  924.             if(strlen(TypeText[playerid]) >= 4) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Apenas o número 4 por favor");
  925.             strcat(TypeText[playerid], "4");
  926.             TextDrawSetString(Phone4[playerid],TypeText[playerid]);
  927.             }
  928.         else if(PhoneChoose[playerid] == 5)
  929.             {
  930.             if(strlen(TypeText[playerid]) >= 4) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Apenas o número 4 por favor");
  931.             strcat(TypeText[playerid], "5");
  932.             TextDrawSetString(Phone4[playerid],TypeText[playerid]);
  933.             }
  934.         else if(PhoneChoose[playerid] == 6)
  935.             {
  936.             if(strlen(TypeText[playerid]) >= 4) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Apenas o número 4 por favor");
  937.             strcat(TypeText[playerid], "6");
  938.             TextDrawSetString(Phone4[playerid],TypeText[playerid]);
  939.             }
  940.         else if(PhoneChoose[playerid] == 7)
  941.             {
  942.             if(strlen(TypeText[playerid]) >= 4) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Apenas o número 4 por favor");
  943.             strcat(TypeText[playerid], "7");
  944.             TextDrawSetString(Phone4[playerid],TypeText[playerid]);
  945.             }
  946.         else if(PhoneChoose[playerid] == 8)
  947.             {
  948.             if(strlen(TypeText[playerid]) >= 4) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Apenas o número 4 por favor");
  949.             strcat(TypeText[playerid], "8");
  950.             TextDrawSetString(Phone4[playerid],TypeText[playerid]);
  951.             }
  952.         else if(PhoneChoose[playerid] == 9)
  953.             {
  954.             if(strlen(TypeText[playerid]) >= 4) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Apenas o número 4 por favor");
  955.             strcat(TypeText[playerid], "9");
  956.             TextDrawSetString(Phone4[playerid],TypeText[playerid]);
  957.             }
  958.         else if(PhoneChoose[playerid] == 10)
  959.             {
  960.             new string[32];
  961.             for(new id = 0; id <= MAX_HOUSE; id++)
  962.             {
  963.             format(string,32,House_File,id);
  964.             if(!fexist(string)) continue;
  965.             if(strcmp(House[id][PhoneNum],TypeText[playerid],false) == 0)
  966.             {
  967.             if(strcmp(House[id][Owner],"Apartamentos",false) == 0) continue;
  968.             foreach(Player, i)
  969.             {
  970.             if(IsPlayerInRangeOfPoint(i,10.0,House[id][ExitX],House[id][ExitY],House[id][ExitZ]) && GetPlayerVirtualWorld(i) == House[id][VW])
  971.             {
  972.             PhoneChoose[playerid] = 0;
  973.             TextDrawHideForPlayer(playerid,Phone0[playerid]);
  974.             TextDrawHideForPlayer(playerid,Phone1[playerid]);
  975.             TextDrawHideForPlayer(playerid,Phone2[playerid]);
  976.             TextDrawHideForPlayer(playerid,Phone3[playerid]);
  977.             TextDrawHideForPlayer(playerid,Phone4[playerid]);
  978.             TextDrawHideForPlayer(playerid,Phone5[playerid]);
  979.             TogglePlayerControllable(playerid,true);
  980.             SCM(playerid,-1,"Calling...");
  981.             SCM(playerid,-1,"Wait for answer.");
  982.             Calling[playerid] = 10;
  983.             CallFrom[i] = playerid;
  984.             }
  985.             }
  986.             }
  987.             }
  988.             }
  989.         else if(PhoneChoose[playerid] == 11)
  990.             {
  991.             if(strlen(TypeText[playerid]) >= 4) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Apenas o número 4 por favor");
  992.             strcat(TypeText[playerid], "0");
  993.             TextDrawSetString(Phone4[playerid],TypeText[playerid]);
  994.             }
  995.         else if(PhoneChoose[playerid] == 12)
  996.             {
  997.             PhoneChoose[playerid] = 0;
  998.             TextDrawHideForPlayer(playerid,Phone0[playerid]);
  999.             TextDrawHideForPlayer(playerid,Phone1[playerid]);
  1000.             TextDrawHideForPlayer(playerid,Phone2[playerid]);
  1001.             TextDrawHideForPlayer(playerid,Phone3[playerid]);
  1002.             TextDrawHideForPlayer(playerid,Phone4[playerid]);
  1003.             TextDrawHideForPlayer(playerid,Phone5[playerid]);
  1004.             TogglePlayerControllable(playerid,true);
  1005.             SCM(playerid,-1,"You are hangup phone");
  1006.             }
  1007.         if(ChooseInt[playerid] == 1)
  1008.             {
  1009.             new h = Player[playerid][Houseid];
  1010.             if(GetPlayerMoney(playerid) < 15000) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não tem dinheiro suficiente.");
  1011.             House[h][ExitX] = 2496.049804;
  1012.             House[h][ExitY] = -1695.238159;
  1013.             House[h][ExitZ] = 1014.742187;
  1014.             House[h][IntID] = 3;
  1015.             SetPlayerVirtualWorld(playerid,House[h][VW]);
  1016.             SetPlayerPos(playerid,House[h][ExitX],House[h][ExitY],House[h][ExitZ]);
  1017.             SetPlayerInterior(playerid,House[h][IntID]);
  1018.             TextDrawHideForPlayer(playerid,hUp[playerid]);
  1019.             GivePlayerMoney(playerid,-15000);
  1020.             ChooseInt[playerid] = 0;
  1021.             CheckHouse(h);
  1022.             }
  1023.         else if(ChooseInt[playerid] == 2)
  1024.             {
  1025.             new h = Player[playerid][Houseid];
  1026.             if(GetPlayerMoney(playerid) < 13000) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não tem dinheiro suficiente..");
  1027.             House[h][ExitX] = 2527.654052;
  1028.             House[h][ExitY] = -1679.388305;
  1029.             House[h][ExitZ] = 1015.498596;
  1030.             House[h][IntID] = 1;
  1031.             SetPlayerVirtualWorld(playerid,House[h][VW]);
  1032.             SetPlayerPos(playerid,House[h][ExitX],House[h][ExitY],House[h][ExitZ]);
  1033.             SetPlayerInterior(playerid,House[h][IntID]);
  1034.             TextDrawHideForPlayer(playerid,hUp[playerid]);
  1035.             GivePlayerMoney(playerid,-13000);
  1036.             ChooseInt[playerid] = 0;
  1037.             CheckHouse(h);
  1038.             }
  1039.         else if(ChooseInt[playerid] == 3)
  1040.             {
  1041.             new h = Player[playerid][Houseid];
  1042.             if(GetPlayerMoney(playerid) < 17000) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não tem dinheiro suficiente.");
  1043.             House[h][ExitX] = 2807.619873;
  1044.             House[h][ExitY] = -1171.899902;
  1045.             House[h][ExitZ] = 1025.570312;
  1046.             House[h][IntID] = 8;
  1047.             SetPlayerVirtualWorld(playerid,House[h][VW]);
  1048.             SetPlayerPos(playerid,House[h][ExitX],House[h][ExitY],House[h][ExitZ]);
  1049.             SetPlayerInterior(playerid,House[h][IntID]);
  1050.             TextDrawHideForPlayer(playerid,hUp[playerid]);
  1051.             GivePlayerMoney(playerid,-17000);
  1052.             ChooseInt[playerid] = 0;
  1053.             CheckHouse(h);
  1054.             }
  1055.         if(Choose[playerid] == 1)
  1056.             {
  1057.             if(strlen(TypeText[playerid]) >= 4) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Apenas o número 4 por favor!");
  1058.             strcat(TypeText[playerid], "1");
  1059.             TextDrawSetString(LockTD2[playerid],TypeText[playerid]);
  1060.             }
  1061.         else if(Choose[playerid] == 2)
  1062.             {
  1063.             if(strlen(TypeText[playerid]) >= 4) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Apenas o número 4 por favor!");
  1064.             strcat(TypeText[playerid], "2");
  1065.             TextDrawSetString(LockTD2[playerid],TypeText[playerid]);
  1066.             }
  1067.         else if(Choose[playerid] == 3)
  1068.             {
  1069.             if(strlen(TypeText[playerid]) >= 4) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Apenas o número 4 por favor");
  1070.             strcat(TypeText[playerid], "3");
  1071.             TextDrawSetString(LockTD2[playerid],TypeText[playerid]);
  1072.             }
  1073.         else if(Choose[playerid] == 4)
  1074.             {
  1075.             if(strlen(TypeText[playerid]) >= 4) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Apenas o número 4 por favor");
  1076.             strcat(TypeText[playerid], "4");
  1077.             TextDrawSetString(LockTD2[playerid],TypeText[playerid]);
  1078.             }
  1079.         else if(Choose[playerid] == 5)
  1080.             {
  1081.             if(strlen(TypeText[playerid]) >= 4) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Apenas o número 4 por favor");
  1082.             strcat(TypeText[playerid], "5");
  1083.             TextDrawSetString(LockTD2[playerid],TypeText[playerid]);
  1084.             }
  1085.         else if(Choose[playerid] == 6)
  1086.             {
  1087.             if(strlen(TypeText[playerid]) >= 4) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Apenas o número 4 por favor!");
  1088.             strcat(TypeText[playerid], "6");
  1089.             TextDrawSetString(LockTD2[playerid],TypeText[playerid]);
  1090.             }
  1091.         else if(Choose[playerid] == 7)
  1092.             {
  1093.             if(strlen(TypeText[playerid]) >= 4) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Apenas o número 4 por favor");
  1094.             strcat(TypeText[playerid], "7");
  1095.             TextDrawSetString(LockTD2[playerid],TypeText[playerid]);
  1096.             }
  1097.         else if(Choose[playerid] == 8)
  1098.             {
  1099.             if(strlen(TypeText[playerid]) >= 4) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Apenas o número 4 por favor");
  1100.             strcat(TypeText[playerid], "8");
  1101.             TextDrawSetString(LockTD2[playerid],TypeText[playerid]);
  1102.             }
  1103.         else if(Choose[playerid] == 9)
  1104.             {
  1105.             if(strlen(TypeText[playerid]) >= 4) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Apenas o número 4 por favor");
  1106.             strcat(TypeText[playerid], "9");
  1107.             TextDrawSetString(LockTD2[playerid],TypeText[playerid]);
  1108.             }
  1109.         else if(Choose[playerid] == 10)
  1110.             {
  1111.             if(strlen(TypeText[playerid]) >= 4) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Apenas o número 4 por favor");
  1112.             strcat(TypeText[playerid], "0");
  1113.             TextDrawSetString(LockTD2[playerid],TypeText[playerid]);
  1114.             }
  1115.         else if(Choose[playerid] == 10)
  1116.             {
  1117.             if(strlen(TypeText[playerid]) >= 4) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Apenas o número 4 por favor");
  1118.             strcat(TypeText[playerid], "0");
  1119.             TextDrawSetString(LockTD2[playerid],TypeText[playerid]);
  1120.             }
  1121.         else if(Choose[playerid] == 11)
  1122.             {
  1123.             new id = GetClosetHouseID(playerid);
  1124.             if(strcmp(House[id][LockPass],TypeText[playerid],false) == 0)
  1125.             {
  1126.             House[id][Lock] = 1;
  1127.             Choose[playerid] = 0;
  1128.             TextDrawHideForPlayer(playerid,LockTD0[playerid]);
  1129.             TextDrawHideForPlayer(playerid,LockTD1[playerid]);
  1130.             TextDrawHideForPlayer(playerid,LockTD2[playerid]);
  1131.             TextDrawHideForPlayer(playerid,LockTD3[playerid]);
  1132.             TextDrawHideForPlayer(playerid,LockTD4[playerid]);
  1133.             TextDrawHideForPlayer(playerid,LockTD5[playerid]);
  1134.             TextDrawHideForPlayer(playerid,LockTD6[playerid]);
  1135.             TogglePlayerControllable(playerid,true);
  1136.             SCM(playerid,-1,"House is locked.");
  1137.             CheckHouse(id);
  1138.             }
  1139.             else return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"senha errada");
  1140.             }
  1141.         else if(Choose[playerid] == 12)
  1142.             {
  1143.             TextDrawHideForPlayer(playerid,LockTD0[playerid]);
  1144.             TextDrawHideForPlayer(playerid,LockTD1[playerid]);
  1145.             TextDrawHideForPlayer(playerid,LockTD2[playerid]);
  1146.             TextDrawHideForPlayer(playerid,LockTD3[playerid]);
  1147.             TextDrawHideForPlayer(playerid,LockTD4[playerid]);
  1148.             TextDrawHideForPlayer(playerid,LockTD5[playerid]);
  1149.             TextDrawHideForPlayer(playerid,LockTD6[playerid]);
  1150.             TogglePlayerControllable(playerid,true);
  1151.             }
  1152.     }
  1153.     return 1;
  1154. }
  1155.  
  1156. public OnRconLoginAttempt(ip[], password[], success)
  1157. {
  1158.     return 1;
  1159. }
  1160. public OnPlayerUpdate(playerid)
  1161. {
  1162. new k, ud, lr;
  1163. GetPlayerKeys(playerid, k, ud, lr);
  1164. if(lr > 0)
  1165. {
  1166.     if(ChooseInt[playerid] == 1)
  1167.     {
  1168.         ChooseInt[playerid] = 2;
  1169.         SetPlayerPos(playerid,2527.654052,-1679.388305,1015.498596);
  1170.         SetPlayerInterior(playerid,1);
  1171.         TextDrawSetString(hUp[playerid],"  Atualização de casa~n~~n~~r~< ~w~Preço: ~g~$13000 ~r~>");
  1172.         TextDrawShowForPlayer(playerid,hUp[playerid]);
  1173.     }
  1174.     else if(ChooseInt[playerid] == 2)
  1175.     {
  1176.         ChooseInt[playerid] = 3;
  1177.         SetPlayerPos(playerid,2807.619873,-1171.899902,1025.570312);
  1178.         SetPlayerInterior(playerid,8);
  1179.         TextDrawSetString(hUp[playerid],"  Atualização de casa~n~~n~~r~< ~w~Preço: ~g~$17000 ~r~>");
  1180.         TextDrawShowForPlayer(playerid,hUp[playerid]);
  1181.     }
  1182.     else if(ChooseInt[playerid] == 3)
  1183.     {
  1184.         ChooseInt[playerid] = 1;
  1185.         SetPlayerPos(playerid,2496.049804,-1695.238159,1014.742187);
  1186.         SetPlayerInterior(playerid,3);
  1187.         TextDrawSetString(hUp[playerid],"  Atualização de casa~n~~n~~r~< ~w~Preço: ~g~$20000 ~r~>");
  1188.         TextDrawShowForPlayer(playerid,hUp[playerid]);
  1189.     }
  1190.    
  1191. }
  1192. if(ud > 0)
  1193. {
  1194.     if(PhoneChoose[playerid] == 1)
  1195.     {
  1196.         TextDrawSetString(Phone1[playerid],"~w~1 ~y~2 ~w~3~n~4 5 6~n~7 8 9~n~~g~~g~C ~w~0 ~r~H");
  1197.         PhoneChoose[playerid] = 2;
  1198.     }
  1199.     else if(PhoneChoose[playerid] == 2)
  1200.     {
  1201.         TextDrawSetString(Phone1[playerid],"~w~1 2 ~y~3~n~~w~4 5 6~n~7 8 9~n~~g~~g~C ~w~0 ~r~H");
  1202.         PhoneChoose[playerid] = 3;
  1203.     }
  1204.     else if(PhoneChoose[playerid] == 3)
  1205.     {
  1206.         TextDrawSetString(Phone1[playerid],"~w~1 2 3~n~~y~4 ~w~5 6~n~7 8 9~n~~g~~g~C ~w~0 ~r~H");
  1207.         PhoneChoose[playerid] = 4;
  1208.     }
  1209.     else if(PhoneChoose[playerid] == 4)
  1210.     {
  1211.         TextDrawSetString(Phone1[playerid],"~w~1 2 3~n~4 ~y~5 ~w~6~n~7 8 9~n~~g~~g~C ~w~0 ~r~H");
  1212.         PhoneChoose[playerid] = 5;
  1213.     }
  1214.     else if(PhoneChoose[playerid] == 5)
  1215.     {
  1216.         TextDrawSetString(Phone1[playerid],"~w~1 2 3~n~4 5 ~y~6~n~~w~7 8 9~n~~g~~g~C ~w~0 ~r~H");
  1217.         PhoneChoose[playerid] = 6;
  1218.     }
  1219.     else if(PhoneChoose[playerid] == 6)
  1220.     {
  1221.         TextDrawSetString(Phone1[playerid],"~w~1 2 3~n~4 5 6~n~~y~7 ~w~8 9~n~~g~~g~C ~w~0 ~r~H");
  1222.         PhoneChoose[playerid] = 7;
  1223.     }
  1224.     else if(PhoneChoose[playerid] == 7)
  1225.     {
  1226.         TextDrawSetString(Phone1[playerid],"~w~1 2 3~n~4 5 6~n~7 ~y~8 ~w~9~n~~g~~g~C ~w~0 ~r~H");
  1227.         PhoneChoose[playerid] = 8;
  1228.     }
  1229.     else if(PhoneChoose[playerid] == 8)
  1230.     {
  1231.         TextDrawSetString(Phone1[playerid],"~w~1 2 3~n~4 5 6~n~7 8 ~y~9~n~~g~~g~C ~w~0 ~r~H");
  1232.         PhoneChoose[playerid] = 9;
  1233.     }
  1234.     else if(PhoneChoose[playerid] == 9)
  1235.     {
  1236.         TextDrawSetString(Phone1[playerid],"~w~1 2 3~n~4 5 6~n~7 8 9~n~~y~C ~w~0 ~r~H");
  1237.         PhoneChoose[playerid] = 10;
  1238.     }
  1239.     else if(PhoneChoose[playerid] == 10)
  1240.     {
  1241.         TextDrawSetString(Phone1[playerid],"~w~1 2 3~n~4 5 6~n~7 8 9~n~~g~~g~C ~y~0 ~r~H");
  1242.         PhoneChoose[playerid] = 11;
  1243.     }
  1244.     else if(PhoneChoose[playerid] == 11)
  1245.     {
  1246.         TextDrawSetString(Phone1[playerid],"~w~1 2 3~n~4 5 6~n~7 8 9~n~~g~~g~C ~w~0 ~y~H");
  1247.         PhoneChoose[playerid] = 12;
  1248.     }
  1249.     else if(PhoneChoose[playerid] == 12)
  1250.     {
  1251.         TextDrawSetString(Phone1[playerid],"~y~1 ~w~2 3~n~4 5 6~n~7 8 9~n~~g~~g~C ~w~0 ~r~H");
  1252.         PhoneChoose[playerid] = 1;
  1253.     }
  1254. //Alarm
  1255.     if(Choose[playerid] == 1)
  1256.     {
  1257.         TextDrawSetString(LockTD3[playerid],"~w~1 ~r~2 ~w~3~n~4 5 6~n~7 8 9~n~  0");
  1258.         Choose[playerid] = 2;
  1259.     }
  1260.     else if(Choose[playerid] == 2)
  1261.     {
  1262.         TextDrawSetString(LockTD3[playerid],"~w~1 2 ~r~3~n~~w~4 5 6~n~7 8 9~n~  0");
  1263.         Choose[playerid] = 3;
  1264.     }
  1265.     else if(Choose[playerid] == 3)
  1266.     {
  1267.         TextDrawSetString(LockTD3[playerid],"~w~1 2 3~n~~r~4 ~w~5 6~n~7 8 9~n~  0");
  1268.         Choose[playerid] = 4;
  1269.     }
  1270.     else if(Choose[playerid] == 4)
  1271.     {
  1272.         TextDrawSetString(LockTD3[playerid],"~w~1 2 3~n~4 ~r~5 ~w~6~n~7 8 9~n~  0");
  1273.         Choose[playerid] = 5;
  1274.     }
  1275.     else if(Choose[playerid] == 5)
  1276.     {
  1277.         TextDrawSetString(LockTD3[playerid],"~w~1 2 3~n~4 5 ~r~6~n~~w~7 8 9~n~  0");
  1278.         Choose[playerid] = 6;
  1279.     }
  1280.     else if(Choose[playerid] == 6)
  1281.     {
  1282.         TextDrawSetString(LockTD3[playerid],"~w~1 2 3~n~4 5 6~n~~r~7 ~w~8 9~n~  0");
  1283.         Choose[playerid] = 7;
  1284.     }
  1285.     else if(Choose[playerid] == 7)
  1286.     {
  1287.         TextDrawSetString(LockTD3[playerid],"~w~1 2 3~n~4 5 6~n~7 ~r~8 ~w~9~n~  0");
  1288.         Choose[playerid] = 8;
  1289.     }
  1290.     else if(Choose[playerid] == 8)
  1291.     {
  1292.         TextDrawSetString(LockTD3[playerid],"~w~1 2 3~n~4 5 6~n~7 8 ~r~9~n~  ~w~0");
  1293.         Choose[playerid] = 9;
  1294.     }
  1295.     else if(Choose[playerid] == 9)
  1296.     {
  1297.         TextDrawSetString(LockTD3[playerid],"~w~1 2 3~n~4 5 6~n~7 8 9~n~  ~r~0");
  1298.         Choose[playerid] = 10;
  1299.     }
  1300.     else if(Choose[playerid] == 10)
  1301.     {
  1302.         TextDrawSetString(LockTD3[playerid],"~w~1 2 3~n~4 5 6~n~7 8 9~n~  0");
  1303.         TextDrawSetString(LockTD4[playerid],"~r~Digite  ~w~Fechar");
  1304.         Choose[playerid] = 11;
  1305.     }
  1306.     else if(Choose[playerid] == 11)
  1307.     {
  1308.         TextDrawSetString(LockTD4[playerid],"~w~Digite  ~r~Fechar");
  1309.         Choose[playerid] = 12;
  1310.     }
  1311.     else if(Choose[playerid] == 12)
  1312.     {
  1313.         TextDrawSetString(LockTD4[playerid],"~w~Digite  ~w~Fechar");
  1314.         TextDrawSetString(LockTD3[playerid],"~r~1 ~w~2 3~n~4 5 6~n~7 8 9~n~  0");
  1315.         Choose[playerid] = 1;
  1316.     }
  1317. }
  1318. else if(ud < 0)
  1319. {
  1320.     if(Choose[playerid] == 1)
  1321.     {
  1322.         TextDrawSetString(LockTD3[playerid],"~w~1 2 ~w~3~n~4 5 6~n~7 8 9~n~  ~w~0");
  1323.         TextDrawSetString(LockTD4[playerid],"~w~Digite  ~r~Fechar");
  1324.         Choose[playerid] = 12;
  1325.     }
  1326.     else if(Choose[playerid] == 12)
  1327.     {
  1328.         TextDrawSetString(LockTD4[playerid],"~r~Digite  ~w~Fechar");
  1329.         Choose[playerid] = 11;
  1330.     }
  1331.     else if(Choose[playerid] == 11)
  1332.     {
  1333.         TextDrawSetString(LockTD4[playerid],"~w~Digite  ~w~Fechar");
  1334.         TextDrawSetString(LockTD3[playerid],"~w~1 2 3~n~4 5 6~n~7 8 9~n~  ~r~0");
  1335.         Choose[playerid] = 10;
  1336.     }
  1337.     else if(Choose[playerid] == 10)
  1338.     {
  1339.         TextDrawSetString(LockTD3[playerid],"~w~1 2 3~n~4 5 6~n~7 8 ~r~9~n~  ~w~0");
  1340.         Choose[playerid] = 9;
  1341.     }
  1342.     else if(Choose[playerid] == 9)
  1343.     {
  1344.         TextDrawSetString(LockTD3[playerid],"~w~1 2 3~n~4 5 6~n~7 ~r~8 ~w~9~n~  0");
  1345.         Choose[playerid] = 8;
  1346.     }
  1347.     else if(Choose[playerid] == 8)
  1348.     {
  1349.         TextDrawSetString(LockTD3[playerid],"~w~1 2 3~n~4 5 6~n~~r~7 ~w~8 9~n~  0");
  1350.         Choose[playerid] = 7;
  1351.     }
  1352.     else if(Choose[playerid] == 7)
  1353.     {
  1354.         TextDrawSetString(LockTD3[playerid],"~w~1 2 3~n~4 5 ~r~6~n~~w~7 8 9~n~  0");
  1355.         Choose[playerid] = 6;
  1356.     }
  1357.     else if(Choose[playerid] == 6)
  1358.     {
  1359.         TextDrawSetString(LockTD3[playerid],"~w~1 2 3~n~4 ~r~5 ~w~6~n~7 8 9~n~  0");
  1360.         Choose[playerid] = 5;
  1361.     }
  1362.     else if(Choose[playerid] == 5)
  1363.     {
  1364.         TextDrawSetString(LockTD3[playerid],"~w~1 2 3~n~~r~4 ~w~5 6~n~7 8 9~n~  0");
  1365.         Choose[playerid] = 4;
  1366.     }
  1367.     else if(Choose[playerid] == 4)
  1368.     {
  1369.         TextDrawSetString(LockTD3[playerid],"~w~1 2 ~r~3~n~~w~4 5 6~n~7 8 9~n~  0");
  1370.         Choose[playerid] = 3;
  1371.     }
  1372.     else if(Choose[playerid] == 3)
  1373.     {
  1374.         TextDrawSetString(LockTD3[playerid],"~w~1 ~r~2 ~w~3~n~4 5 6~n~7 8 9~n~  0");
  1375.         Choose[playerid] = 2;
  1376.     }
  1377.     else if(Choose[playerid] == 2)
  1378.     {
  1379.         TextDrawSetString(LockTD3[playerid],"~r~1 ~w~2 3~n~4 5 6~n~7 8 9~n~  0");
  1380.         Choose[playerid] = 1;
  1381.     }
  1382. }
  1383.     return 1;
  1384. }
  1385.  
  1386. public OnPlayerStreamIn(playerid, forplayerid)
  1387. {
  1388.     return 1;
  1389. }
  1390.  
  1391. public OnPlayerStreamOut(playerid, forplayerid)
  1392. {
  1393.     return 1;
  1394. }
  1395.  
  1396. public OnVehicleStreamIn(vehicleid, forplayerid)
  1397. {
  1398.     return 1;
  1399. }
  1400.  
  1401. public OnVehicleStreamOut(vehicleid, forplayerid)
  1402. {
  1403.     return 1;
  1404. }
  1405.  
  1406. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  1407. {
  1408. switch(dialogid)
  1409. {
  1410.             case DIALOG_HOUSE:
  1411.             {
  1412.             if(!response) return 1;
  1413.             new
  1414.                 string[200];
  1415.                 switch(listitem)
  1416.                 {
  1417.                 case 0: {
  1418.                 new id = Player[playerid][Houseid];
  1419.                 if(id == 999) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não tem uma casa");
  1420.                 if(!IsPlayerInRangeOfPoint(playerid,3.0,House[id][EnterX],House[id][EnterY],House[id][EnterZ])) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"You are not near your house");
  1421.                 format(House[id][Owner], 32, "Apartamento");
  1422.                 if(House[id][hCar] > 0) format(HouseOwner[House[id][hCar]],64,"Apartamento");
  1423.                 House[id][On_Sell] = 1;
  1424.                 Player[playerid][Houseid] = 999;
  1425.                 GivePlayerMoney(playerid,House[id][Price]/2);
  1426.                 DestroyDynamicPickup(House[id][PickupU]);
  1427.                 House[id][PickupU] = CreateDynamicPickup(1273, 23,  House[id][EnterX],House[id][EnterY],House[id][EnterZ],-1,-1,-1,100.0);
  1428.                 DestroyDynamicMapIcon(House[id][Icon]);
  1429.                 House[id][Icon] = CreateDynamicMapIcon(House[id][EnterX],House[id][EnterY],House[id][EnterZ], 31, 0, -1, -1, -1, 100.0);
  1430.                 CheckHouse(id);
  1431.                 UpdatePlayerInformation(playerid);
  1432.                 format(string,sizeof(string),"{29CC3F}Owner: "COL_WHITE"Apartamento\n{29CC3F}Nome da Casa: "COL_WHITE"%s\n{29CC3F}Preço: "COL_WHITE"%d\n{29CC3F}Level: "COL_WHITE"%d\n{29CC3F}Endereço: "COL_WHITE"%s\n (/comprarcasa)",House[id][HouseName],House[id][Price],House[id][Level],House[id][Address]);
  1433.                 UpdateDynamic3DTextLabelText(House[id][DLabel],-1,string);
  1434.                 }
  1435.                 case 1: {
  1436.                 ShowPlayerDialog(playerid,DIALOG_HOUSE+1,DIALOG_STYLE_INPUT,""COL_YELLOW"Alugar Casa",""COL_BLUE"Preço de aluguel tipo","colocar","fechar"); }
  1437.                 case 2:
  1438.                 {
  1439.                 new id = Player[playerid][Houseid];
  1440.                 foreach (Player, i)
  1441.                 {
  1442.                     if(i != playerid)
  1443.                     {
  1444.                     if(strcmp(House[id][Player_Rent],GetName(playerid), false ) == 0) {SCM(i,COLOR_RED,"Você foi despejada de casa");}
  1445.                     format(House[id][Player_Rent],48,"Nobody");
  1446.                     }
  1447.                     }
  1448.                     }
  1449.                 case 3: {
  1450.                         ShowPlayerDialog(playerid,DIALOG_HOUSE+2,DIALOG_STYLE_INPUT,""COL_YELLOW"Nome da Casa",""COL_WHITE"Digite o novo nome da casa","Nome","Fechar");
  1451.                         }
  1452.                 case 4: {
  1453.                         ShowPlayerDialog(playerid,DIALOG_HOUSE+3,DIALOG_STYLE_INPUT,""COL_YELLOW"Senha (apenas números)",""COL_WHITE"Digite a nova senha","Insert","Fechar");
  1454.                         }
  1455.                     }
  1456.                 }
  1457.            case DIALOG_HOUSE+1:
  1458.            {
  1459.             if(!response) return 1;
  1460.             new string[210];
  1461.             new id = Player[playerid][Houseid];
  1462.             if(strval(inputtext) <= 0) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Preço não pode ser menos um");
  1463.             House[id][RentPrice] = strval(inputtext);
  1464.             format(string,sizeof(string),"New rent price is $%d",strval(inputtext)); SCM(playerid,-1,string);
  1465.             format(string,sizeof(string),"{E0BC1B}Proprietário: "COL_WHITE"%s\n{E0BC1B}Nome da Casa: "COL_WHITE"%s\n{E0BC1B}Preço: "COL_WHITE"%d\n{E0BC1B}Level: "COL_WHITE"%d\n{E0BC1B}Preço do Aluguel: "COL_WHITE"%d\n{E0BC1B}Endereço: "COL_WHITE"%s\n (/alugarcasa)",House[id][Owner],House[id][HouseName],House[id][Price],House[id][Level],House[id][RentPrice],House[id][Address]);
  1466.             UpdateDynamic3DTextLabelText(House[id][DLabel],-1,string);
  1467.             CheckHouse(id);
  1468.            }
  1469.            case DIALOG_HOUSE+2:
  1470.            {
  1471.             if(!response) return 1;
  1472.             new string[210];
  1473.             new id = Player[playerid][Houseid];
  1474.             format(House[id][HouseName], 32, "%s", inputtext);
  1475.             format(string,sizeof(string),"{E0BC1B}Proprietário: "COL_WHITE"%s\n{E0BC1B}Nome da Casa: "COL_WHITE"%s\n{E0BC1B}Preço: "COL_WHITE"%d\n{E0BC1B}Level: "COL_WHITE"%d\n{E0BC1B}Preço do Aluguel: "COL_WHITE"%d\n{E0BC1B}Endereço: "COL_WHITE"%s\n (/alugarcasa)",House[id][Owner],House[id][HouseName],House[id][Price],House[id][Level],House[id][RentPrice],House[id][Address]);
  1476.             UpdateDynamic3DTextLabelText(House[id][DLabel],-1,string);
  1477.             CheckHouse(id);
  1478.            }
  1479.            case DIALOG_HOUSE+3:
  1480.            {
  1481.             if(!response) return 1;
  1482.             new string[128];
  1483.             new id = Player[playerid][Houseid];
  1484.             if(strlen(inputtext) >= 5 || strlen(inputtext) < 4) return ShowPlayerDialog(playerid,DIALOG_HOUSE+3,DIALOG_STYLE_INPUT,""COL_WHITE"Senha",""COL_BLUE"Digite a nova senha","Inserir","Fechar"),SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Apenas quatro números");
  1485.             format(House[id][LockPass],5,"%d",strval(inputtext));
  1486.             format(string,sizeof(string),"Nova senha é %d",strval(inputtext)); SCM(playerid,-1,string);
  1487.             CheckHouse(id);
  1488.            }
  1489.            }
  1490.     return 1;
  1491. }
  1492.  
  1493. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  1494. {
  1495.     return 1;
  1496. }
  1497. forward LoadHouse(id, name[], value[]);
  1498. public LoadHouse(id, name[], value[])
  1499. {
  1500.     INI_Float("EnterX", House[id][EnterX]);
  1501.     INI_Float("EnterY", House[id][EnterY]);
  1502.     INI_Float("EnterZ", House[id][EnterZ]);
  1503.     INI_Float("ExitX", House[id][ExitX]);
  1504.     INI_Float("ExitY", House[id][ExitY]);
  1505.     INI_Float("ExitZ", House[id][ExitZ]);
  1506.     INI_String("HouseName", House[id][HouseName] , 32 );
  1507.     INI_String("Owner", House[id][Owner] , 32 );
  1508.     INI_Int("Price", House[id][Price]);
  1509.     INI_Int("Level", House[id][Level]);
  1510.     INI_Int("Interior", House[id][IntID]);
  1511.     INI_Int("VW", House[id][VW]);
  1512.     INI_Int("On_Sell", House[id][On_Sell]);
  1513.     INI_Int("Lock", House[id][Lock]);
  1514.     INI_Int("RentPrice", House[id][RentPrice]);
  1515.     INI_String("PlayerRent", House[id][Player_Rent] , 32 );
  1516.     INI_Int("Money", House[id][Money]);
  1517.     INI_Int("Gun1", House[id][Gun1]);
  1518.     INI_Int("Gun2", House[id][Gun2]);
  1519.     INI_Int("Ammo1", House[id][Ammo1]);
  1520.     INI_Int("Ammo2", House[id][Ammo2]);
  1521.     INI_String("LockPass", House[id][LockPass] , 5 );
  1522.     INI_Float("hCarX", House[id][hCarX]);
  1523.     INI_Float("hCarY", House[id][hCarY]);
  1524.     INI_Float("hCarZ", House[id][hCarZ]);
  1525.     INI_Float("hCarA", House[id][hCarA]);
  1526.     INI_Int("hCarC1", House[id][hCarC1]);
  1527.     INI_Int("hCarC2", House[id][hCarC2]);
  1528.     INI_Int("hCarID", House[id][hCarID]);
  1529.     INI_Int("hCarMoney", House[id][hCarMoney]);
  1530.     INI_Int("hCarGun1", House[id][hCarGun1]);
  1531.     INI_Int("hCarGun2", House[id][hCarGun2]);
  1532.     INI_Int("hCarAmmo1", House[id][hCarAmmo1]);
  1533.     INI_Int("hCarAmmo2", House[id][hCarAmmo2]);
  1534.     INI_String("PhoneNum", House[id][PhoneNum] , 5 );
  1535.     INI_String("Address", House[id][Address] , 48);
  1536.     INI_Int("DayEnter", House[id][DayEnter]);
  1537.     INI_Int("MonthEnter", House[id][MonthEnter]);
  1538.  
  1539.     return 1;
  1540. }
  1541. //==================House System=====================
  1542. YCMD:criarcasa(playerid, params[], help)
  1543. {
  1544.         #pragma unused help
  1545.         if(!IsPlayerAdmin(playerid)) return SCM(playerid, COLOR_RED, "Não está logado na Rcon !");
  1546.         new
  1547.             Float:Pos[3],string[64],id,name[48],price,level;
  1548.         if(sscanf(params, "is[48]ii",id,name,price,level)) return SCM(playerid, COLOR_RED, "Usage:"COL_WHITE" /criarcasa [ID] [Nomedacasa] [Preço] [Level]");
  1549.         if(id >= MAX_HOUSE) return SCM(playerid, COLOR_RED, "Erro: "COL_WHITE"Tente novamente. Você digitou o ID de casa errada.");
  1550.         format(string, sizeof(string), House_File, id);
  1551.         if(fexist(string)) return SCM(playerid, COLOR_RED, "Casa em que ID já existe.!");
  1552.         GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
  1553.         CreateSaveHouse(name,id,price,level,id+1,Pos[0],Pos[1],Pos[2]);
  1554.         SCM(playerid, -1, ""COL_YELLOW"Você criou uma casa ..");
  1555.         return 1;
  1556. }
  1557. YCMD:removercasa(playerid, params[], help)
  1558. {
  1559.         #pragma unused help
  1560.         #pragma unused params
  1561.         if(!IsPlayerAdmin(playerid)) return SCM(playerid, COLOR_RED, "Não está logado na Rcon !");
  1562.         new h = GetClosetHouseID(playerid),file[32];
  1563.         if(h == -1) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Não há casa.");
  1564.         format(file,32,House_File,h);
  1565.             if(fexist(file))
  1566.             {
  1567.                 fremove(file);
  1568.                 DestroyDynamicPickup(House[h][PickupU]);
  1569.                 DestroyDynamic3DTextLabel(House[h][DLabel]);
  1570.                 DestroyDynamicMapIcon(House[h][Icon]);
  1571.             }
  1572.         return 1;
  1573. }
  1574. YCMD:ircasa(playerid, params[], help)
  1575. {
  1576.         #pragma unused help
  1577.         new id,file[32];
  1578.         if(!IsPlayerAdmin(playerid)) return SCM(playerid, COLOR_RED, "Não está logado na Rcon !");
  1579.         if(sscanf(params,"i",id)) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Usage: /ircasa[ID]");
  1580.         format(file,32,House_File,id);
  1581.         if(!fexist(file)) return SCM(playerid,-1,"Não há casa em que id.");
  1582.         SetPlayerPos(playerid,House[id][EnterX],House[id][EnterY],House[id][EnterZ]);
  1583.         return 1;
  1584. }
  1585. YCMD:comprarcasa(playerid, params[], help)
  1586. {
  1587.         #pragma unused help
  1588.         #pragma unused params
  1589.         new string[210];
  1590.         new i = GetClosetHouseID(playerid);
  1591.         if(Player[playerid][Houseid] != 999) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você já tem casa !");
  1592.         if(!IsPlayerInRangeOfPoint(playerid,5.0,House[i][EnterX],House[i][EnterY],House[i][EnterZ])) return SCM(playerid,COLOR_RED,"Você não está perto de sua casa.");
  1593.         if(GetPlayerMoney(playerid) < House[i][Price]) return SCM(playerid, COLOR_RED, "Você não tem esse tipo de dinheiro.");
  1594.         format(House[i][Owner], 32, "%s", GetName(playerid));
  1595.         if(House[i][hCar] > 0) format(HouseOwner[House[i][hCar]],64,"%s",GetName(playerid));
  1596.         House[i][On_Sell] = 0;
  1597.         Player[playerid][Houseid] = i;
  1598.         DestroyDynamicPickup(House[i][PickupU]);
  1599.         House[i][PickupU] = CreateDynamicPickup(1272, 23,  House[i][EnterX],House[i][EnterY],House[i][EnterZ],-1,-1,-1,100.0);
  1600.         GivePlayerMoney(playerid, -House[i][Price]);
  1601.         DestroyDynamicMapIcon(House[i][Icon]);
  1602.         House[i][Icon] = CreateDynamicMapIcon(House[i][EnterX],House[i][EnterY],House[i][EnterZ], 32, 0, -1, -1, -1, 100.0);
  1603.         CheckHouse(i);
  1604.         format(string,sizeof(string),"{E0BC1B}Proprietário: "COL_WHITE"%s\n{E0BC1B}Nome da casa: "COL_WHITE"%s\n{E0BC1B}Preço: "COL_WHITE"%d\n{E0BC1B}Level: "COL_WHITE"%d\n{E0BC1B}Arrendamento Preço: "COL_WHITE"%d\n{E0BC1B}Endereço "COL_WHITE"%s\n (/alugarcasa)",House[i][Owner],House[i][HouseName],House[i][Price],House[i][Level],House[i][RentPrice],House[i][Address]);
  1605.         UpdateDynamic3DTextLabelText(House[i][DLabel],-1,string);
  1606.         UpdatePlayerInformation(playerid);
  1607.         return 1;
  1608. }
  1609. YCMD:casa(playerid, params[], help)
  1610. {
  1611.         #pragma unused help
  1612.         #pragma unused params
  1613.         new id = Player[playerid][Houseid];
  1614.         if(id == 999) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não tem uma casa.");
  1615.         if(!IsPlayerInRangeOfPoint(playerid,5.0,House[id][EnterX],House[id][EnterY],House[id][EnterZ])) return SCM(playerid,COLOR_RED,"Esta não é a sua casa.!");
  1616.         ShowPlayerDialog(playerid,DIALOG_HOUSE,DIALOG_STYLE_LIST,"Casa do painel de controle","vender\nAlterar alugar\ndesalojar\nnome da casa\nSenha Tracar","escolher","fechar");
  1617.         return 1;
  1618. }
  1619. YCMD:alugarcasa(playerid, params[], help)
  1620. {
  1621.         #pragma unused help
  1622.         #pragma unused params
  1623.         new id = GetClosetHouseID(playerid);
  1624.         if(id == -1) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Não há casa.");
  1625.         if(strcmp(House[id][Owner],"apartamento", false ) == 0)
  1626.         {
  1627.         SCM(playerid,COLOR_RED,"Esta casa não tem um dono.");
  1628.         return 1;
  1629.         }
  1630.         if(strcmp(House[id][Player_Rent],"ninguém", false ) == 0)
  1631.         {
  1632.         new string[128];
  1633.         if(!IsPlayerInRangeOfPoint(playerid,5.0,House[id][EnterX],House[id][EnterY],House[id][EnterZ])) return SCM(playerid,COLOR_RED,"Niste blizu nijedne kuce!");
  1634.         House[id][Money] += House[id][RentPrice];
  1635.         GivePlayerMoney(playerid, -House[id][RentPrice]);
  1636.         format(House[id][Player_Rent],48,"%s",GetName(playerid));
  1637.         format(string,sizeof(string),"{E0BC1B}Você deve alugar para Casa $%d",House[id][RentPrice]);
  1638.         SCM(playerid,-1,string);
  1639.         CheckHouse(id);
  1640.         }
  1641.         else return SCM(playerid,COLOR_RED,"Alguém já alugou esta casa.");
  1642.         return 1;
  1643. }
  1644. YCMD:desalugarcasa(playerid, params[], help)
  1645. {
  1646.         #pragma unused help
  1647.         #pragma unused params
  1648.         new id = GetClosetHouseID(playerid);
  1649.         if(id == -1) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Não há casa.");
  1650.         if(strcmp(House[id][Owner],"Apartment", false ) == 0)
  1651.         {
  1652.         SCM(playerid,COLOR_RED,"Esta casa não tem um dono.");
  1653.         return 1;
  1654.         }
  1655.         if(strcmp(House[id][Player_Rent],GetName(playerid), false ) == 0)
  1656.         {
  1657.         if(!IsPlayerInRangeOfPoint(playerid,5.0,House[id][EnterX],House[id][EnterY],House[id][EnterZ])) return SCM(playerid,COLOR_RED,"Niste blizu nijedne kuce!");
  1658.         format(House[id][Player_Rent],48,"Nobody");
  1659.         SCM(playerid,-1,"Está casa está deslugada !");
  1660.         CheckHouse(id);
  1661.         }
  1662.         else return SCM(playerid,COLOR_RED,"Erro:"COL_WHITE" Você não alugar esta casa.");
  1663.         return 1;
  1664. }
  1665. YCMD:hdepositar(playerid, params[], help)
  1666. {
  1667.         #pragma unused help
  1668.         #pragma unused params
  1669.         new id = Player[playerid][Houseid];
  1670.         if(id == 999) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não tem uma casa.");
  1671.         new string[128],money;
  1672.         if(!IsPlayerInRangeOfPoint(playerid,5.0,House[id][ExitX],House[id][ExitY],House[id][ExitZ])) return SCM(playerid,COLOR_RED,"Você não está na posição certa!");
  1673.         if(sscanf(params, "i",money)) return SCM(playerid, COLOR_RED, "Use: /hdepositar [dinheiro]");
  1674.         if(money > GetPlayerMoney(playerid)) return SCM(playerid, COLOR_RED, "Você não tem esse tipo de dinheiro.");
  1675.         if(money < 1) return SCM(playerid, COLOR_RED, "O dinheiro não pode ser inferior a 1");
  1676.         House[id][Money] += money;
  1677.         GivePlayerMoney(playerid, -money);
  1678.         format(string,sizeof(string),"{E0BC1B}Você colocar no seguro $%d. você tem $%d",money,House[id][Money]);
  1679.         SCM(playerid,-1,string);
  1680.         CheckHouse(id);
  1681.         return 1;
  1682. }
  1683. YCMD:hretirar(playerid, params[], help)
  1684. {
  1685.         #pragma unused help
  1686.         #pragma unused params
  1687.         new id = Player[playerid][Houseid];
  1688.         if(id == 999) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não tem uma casa.");
  1689.         new string[128],money;
  1690.         if(!IsPlayerInRangeOfPoint(playerid,5.0,House[id][ExitX],House[id][ExitY],House[id][ExitZ])) return SCM(playerid,COLOR_RED,"You are not in your house!");
  1691.         if(sscanf(params, "i",money)) return SCM(playerid, COLOR_RED, "Use: /hretirar [dinheiro]");
  1692.         if(money > House[id][Money]) return SCM(playerid, COLOR_RED, "Você não tem esta soma de dinheiro.");
  1693.         if(money < 1) return SCM(playerid, COLOR_RED, "O dinheiro não pode ser inferior a 1");
  1694.         House[id][Money] -= money;
  1695.         GivePlayerMoney(playerid, money);
  1696.         format(string,sizeof(string),""COL_YELLOW"Está tirar de seguro"COL_GREEN"$%d"COL_YELLOW".Agora não há "COL_GREEN"$%d",money,House[id][Money]);
  1697.         SCM(playerid,-1,string);
  1698.         CheckHouse(id);
  1699.         return 1;
  1700. }
  1701. YCMD:harma(playerid, params[], help)
  1702. {
  1703.         #pragma unused help
  1704.         #pragma unused params
  1705.        new id = Player[playerid][Houseid];
  1706.         if(id == 999) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não tem uma casa.");
  1707.         new string[128],slot,ammo;
  1708.         if(!IsPlayerInRangeOfPoint(playerid,30.0,House[id][ExitX],House[id][ExitY],House[id][ExitZ])) return SCM(playerid,COLOR_RED,"You are not at right position!");
  1709.         if(sscanf(params, "ii",slot,ammo)) return SCM(playerid, COLOR_RED, "Use: /harma [Slot 1/2] [Arma]");
  1710.         if(ammo > GetPlayerAmmo(playerid)) return SCM(playerid, COLOR_RED, "Você não tem que muita munição.");
  1711.         if(ammo < 1) return SCM(playerid, COLOR_RED, "Ammo can't be less then 1");
  1712.         if(slot == 1)
  1713.         {
  1714.         if(House[id][Gun1] != 0) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Já existe arma para esse slot.");
  1715.         House[id][Gun1] = GetPlayerWeapon(playerid);
  1716.         House[id][Ammo1] = ammo;
  1717.         SetPlayerAmmo(playerid,GetPlayerWeapon(playerid),GetPlayerAmmo(playerid)-ammo);
  1718.         format(string,sizeof(string),"{E0BC1B}Você colocou arma na slot 1. %d ammo",ammo);
  1719.         SCM(playerid,-1,string);
  1720.         CheckHouse(id);
  1721.         }
  1722.         if(slot == 2)
  1723.         {
  1724.         if(House[id][Gun2] != 0) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Já existe arma para esse slot.");
  1725.         House[id][Gun2] = GetPlayerWeapon(playerid);
  1726.         House[id][Ammo2] = ammo;
  1727.         SetPlayerAmmo(playerid,GetPlayerWeapon(playerid),GetPlayerAmmo(playerid)-ammo);
  1728.         format(string,sizeof(string),"{E0BC1B}Você colocou arma em slot 2.With %d ammo",ammo);
  1729.         SCM(playerid,-1,string);
  1730.         CheckHouse(id);
  1731.         }
  1732.         return 1;
  1733. }
  1734. YCMD:htomararma(playerid, params[], help)
  1735. {
  1736.         #pragma unused help
  1737.         #pragma unused params
  1738.         new id = Player[playerid][Houseid];
  1739.         if(id == 999) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não tem uma casa.");
  1740.         if(!IsPlayerInRangeOfPoint(playerid,5.0,House[id][ExitX],House[id][ExitY],House[id][ExitZ])) return SCM(playerid,COLOR_RED,"Você não está em sua casa!");
  1741.         new string[128],slot,ammo;
  1742.         if(!IsPlayerInRangeOfPoint(playerid,5.0,House[id][ExitX],House[id][ExitY],House[id][ExitZ])) return SCM(playerid,COLOR_RED,"Você não está na posição certa!");
  1743.         if(sscanf(params, "ii",slot,ammo)) return SCM(playerid, COLOR_RED, "Use: /htomararma [Slot 1/2] [Arma]");
  1744.         if(ammo < 1) return SCM(playerid, COLOR_RED, "Munição não pode ser inferior a 1");
  1745.         if(slot == 1)
  1746.         {
  1747.         if(House[id][Gun1] == 0) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Não há arma para este slot.");
  1748.         if(ammo > House[id][Ammo1]) return SCM(playerid, COLOR_RED, "Erro:"COL_WHITE" No cofre não tem que muita munição.");
  1749.         GivePlayerWeapon(playerid,House[id][Gun1],ammo);
  1750.         House[id][Ammo1] -= ammo;
  1751.         if(House[id][Ammo1] == 0) {House[id][Gun1] = 0;}
  1752.         format(string,sizeof(string),"{E0BC1B}Está tomar arma de slot 1.With %d ammo",ammo);
  1753.         SCM(playerid,-1,string);
  1754.         CheckHouse(id);
  1755.         }
  1756.         if(slot == 2)
  1757.         {
  1758.         if(House[id][Gun2] == 0) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Não há arma para este slot.");
  1759.         if(ammo > House[id][Ammo2]) return SCM(playerid, COLOR_RED, "Erro:"COL_WHITE" No cofre não tem que muita munição.");
  1760.         GivePlayerWeapon(playerid,House[id][Gun2],ammo);
  1761.         House[id][Ammo2] -= ammo;
  1762.         if(House[id][Ammo2] == 0) {House[id][Gun2] = 0;}
  1763.         format(string,sizeof(string),"{E0BC2B}Você tomou arma de slot 2.With %d ammo",ammo);
  1764.         SCM(playerid,-1,string);
  1765.         CheckHouse(id);
  1766.         }
  1767.         return 1;
  1768. }
  1769. YCMD:verificarseguranca(playerid, params[], help)
  1770. {
  1771.         #pragma unused help
  1772.         #pragma unused params
  1773.         new h = Player[playerid][Houseid];
  1774.         if(h == 999) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não tem uma casa.");
  1775.         new string[128];
  1776.         format(string,sizeof(string),""COL_YELLOW"Money"COL_GREEN" $%d",House[h][Money]);
  1777.         format(string,sizeof(string),""COL_YELLOW"Slot 1 | Gun:"COL_GREEN" %d "COL_YELLOW"| Ammo:"COL_GREEN" %d",House[h][Gun1],House[h][Ammo1]);
  1778.         format(string,sizeof(string),""COL_YELLOW"Slot 2 | Gun:"COL_GREEN" %d "COL_YELLOW"| Ammo:"COL_GREEN" %d",House[h][Gun2],House[h][Ammo2]);
  1779.         SCM(playerid,-1,string);
  1780.         return 1;
  1781. }
  1782. YCMD:bater(playerid, params[], help)
  1783. {
  1784.         #pragma unused params
  1785.         #pragma unused help
  1786.          new i = GetClosetHouseID(playerid), string[128];
  1787.          if(i == -1) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Não há casa.");
  1788.                 if (IsPlayerInRangeOfPoint(playerid,5.0,House[i][EnterX], House[i][EnterY], House[i][EnterZ]))
  1789.                 {
  1790.                     format(string, sizeof(string), "* %s bate à porta.", GetName(playerid));
  1791.                     ProxDetector(playerid, string, COLOR_PURPLE,30);
  1792.                     foreach (Player, p)
  1793.                     {
  1794.                         if (IsPlayerInRangeOfPoint(p,5.0,House[i][ExitX], House[i][ExitY], House[i][ExitZ]))
  1795.                         {
  1796.                             SendClientMessage(p, COLOR_PURPLE, "* alguém bateu na porta");
  1797.                         }
  1798.                     }
  1799.                 }
  1800.         return 1;
  1801. }
  1802. YCMD:portafechada(playerid, params[], help)
  1803. {
  1804.         #pragma unused params
  1805.         #pragma unused help
  1806.         new h = Player[playerid][Houseid];
  1807.         if(h == 999) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não tem uma casa.");
  1808.         if(House[h][Lock] == 1) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Casa já está bloqueado.");
  1809.         if(!IsPlayerInRangeOfPoint(playerid,3.0,House[h][EnterX],House[h][EnterY],House[h][EnterZ])) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não está perto de sua casa");
  1810.         Choose[playerid] = 1;
  1811.         TextDrawSetString(LockTD3[playerid],"~r~1 ~w~2 3~n~4 5 6~n~7 8 9~n~  0");
  1812.         TextDrawShowForPlayer(playerid,LockTD0[playerid]);
  1813.         TextDrawShowForPlayer(playerid,LockTD1[playerid]);
  1814.         TextDrawShowForPlayer(playerid,LockTD2[playerid]);
  1815.         TextDrawShowForPlayer(playerid,LockTD3[playerid]);
  1816.         TextDrawShowForPlayer(playerid,LockTD4[playerid]);
  1817.         TextDrawShowForPlayer(playerid,LockTD5[playerid]);
  1818.         TextDrawShowForPlayer(playerid,LockTD6[playerid]);
  1819.         TogglePlayerControllable(playerid,false);
  1820.         format(TypeText[playerid],5,"");
  1821.         TextDrawSetString(LockTD2[playerid],TypeText[playerid]);
  1822.         TextDrawSetString(LockTD4[playerid],"~w~Digite Fechar");
  1823.         return 1;
  1824. }
  1825. YCMD:destrancarporta(playerid, params[], help)
  1826. {
  1827.         #pragma unused params
  1828.         #pragma unused help
  1829.         new h = Player[playerid][Houseid];
  1830.         if(h == 999) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não tem uma casa.");
  1831.         if(!IsPlayerInRangeOfPoint(playerid,3.0,House[h][EnterX],House[h][EnterY],House[h][EnterZ])) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não está perto de sua casa");
  1832.         House[h][Lock] = 0;
  1833.         SCM(playerid,-1,"Agora, sua porta é destrancada.");
  1834.         return 1;
  1835. }
  1836. YCMD:hentrar(playerid, params[], help)
  1837. {
  1838.         #pragma unused params
  1839.         #pragma unused help
  1840.         new h = GetClosetHouseID(playerid);
  1841.         if(h == -1) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Não há casa.");
  1842.         if(House[h][On_Sell] == 0 && House[h][Lock] == 0)
  1843.         {
  1844.             SetPlayerPos(playerid,House[h][ExitX],House[h][ExitY],House[h][ExitZ]);
  1845.             SetPlayerInterior(playerid,House[h][IntID]);
  1846.             SetPlayerVirtualWorld(playerid,House[h][VW]);
  1847.         }
  1848.         else return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Casa está trancada / Não é à venda.");
  1849.         if(strcmp(House[h][Owner],GetName(playerid),false) == 0)
  1850.         {
  1851.         new Year, Month, Day;
  1852.         getdate(Year, Month, Day);
  1853.         House[h][DayEnter] = Day;
  1854.         House[h][MonthEnter] = Month;
  1855.         CheckHouse(h);
  1856.         }
  1857.         return 1;
  1858. }
  1859. YCMD:hsair(playerid, params[], help)
  1860. {
  1861.         #pragma unused params
  1862.         #pragma unused help
  1863.         new h = GetClosetHouseIntID(playerid);
  1864.         if(h == -1) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Não há casa.");
  1865.         SetPlayerPos(playerid,House[h][EnterX],House[h][EnterY],House[h][EnterZ]);
  1866.         SetPlayerInterior(playerid,0);
  1867.         SetPlayerVirtualWorld(playerid,0);
  1868.         return 1;
  1869. }
  1870. YCMD:pagaraluguel(playerid, params[], help)
  1871. {
  1872.         #pragma unused params
  1873.         #pragma unused help
  1874.         new h = GetClosetHouseID(playerid),string[128];
  1875.         if(h == -1) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Não há casa.");
  1876.         if(strcmp(House[h][Player_Rent],GetName(playerid), false ) == 0)
  1877.         {
  1878.         if(House[h][RentPrice] > GetPlayerMoney(playerid)) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não tem esse tipo de dinheiro ..");
  1879.         House[h][Money] += House[h][RentPrice];
  1880.         GivePlayerMoney(playerid,-House[h][RentPrice]);
  1881.         format(string,128,"Você tem pagar "COL_GREEN"$%d "COL_WHITE"para alugar",House[h][RentPrice]);
  1882.         SCM(playerid,-1,string);
  1883.         }
  1884.         else return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não é dono desta casa");
  1885.         return 1;
  1886. }
  1887. YCMD:hcarro(playerid, params[], help)
  1888. {
  1889.         #pragma unused help
  1890.         if(!IsPlayerAdmin(playerid)) return SCM(playerid, COLOR_RED, "Você deve ser administrador RCON");
  1891.         new
  1892.             Float:Pos[4],id,vehicle,color[2],string[32];
  1893.         if(sscanf(params, "iiii",id,vehicle,color[0],color[1])) return SCM(playerid, COLOR_RED, "Usage:"COL_WHITE" /hcarro [Casa ID] [Veiculo ID] [Cor 1] [Cor 2]");
  1894.         if(id >= MAX_HOUSE) return SCM(playerid, COLOR_RED, "Erro: "COL_WHITE"Tente novamente. Você digitou o ID de casa errada.");
  1895.         format(string, sizeof(string), House_File, id);
  1896.         if(fexist(string))
  1897.         {
  1898.         GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
  1899.         GetPlayerFacingAngle(playerid,Pos[3]);
  1900.         House[id][hCar] = AddStaticVehicleEx(vehicle,Pos[0],Pos[1]+1,Pos[2],Pos[3],color[0],color[1],3600);
  1901.         House[id][hCarX] = Pos[0];
  1902.         House[id][hCarY] = Pos[1];
  1903.         House[id][hCarZ] = Pos[2];
  1904.         House[id][hCarA] = Pos[3];
  1905.         House[id][hCarC1] = color[0];
  1906.         House[id][hCarC2] = color[1];
  1907.         House[id][hCarID] = vehicle;
  1908.         CheckHouse(id);
  1909.         }
  1910.         return 1;
  1911. }
  1912. YCMD:encontrarcarro(playerid, params[], help)
  1913. {
  1914.         #pragma unused help
  1915.         #pragma unused params
  1916.         new
  1917.             Float:Pos[4];
  1918.         new id = Player[playerid][Houseid];
  1919.         if(id == 999) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não tem uma casa.");
  1920.         GetVehiclePos(House[id][hCar],Pos[0],Pos[1],Pos[2]);
  1921.         SetPlayerCheckpoint(playerid,Pos[0],Pos[1],Pos[2],5.0);
  1922.         SCM(playerid,-1,"Seu carro é marcado no mapa.");
  1923.         return 1;
  1924. }
  1925. YCMD:hmelhorar(playerid, params[], help)
  1926. {
  1927.         #pragma unused help
  1928.         #pragma unused params
  1929.         new h = Player[playerid][Houseid];
  1930.         if(h == 999) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não tem uma casa.");
  1931.         if(!IsPlayerInRangeOfPoint(playerid,3.0,House[h][ExitX],House[h][ExitY],House[h][ExitZ])) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não está perto de sua casa");
  1932.         if(ChooseInt[playerid] == 0)
  1933.         {
  1934.         HouseID1[playerid] = h;
  1935.         ChooseInt[playerid] = 1;
  1936.         SetPlayerPos(playerid,2496.049804,-1695.238159,1014.742187);
  1937.         SetPlayerInterior(playerid,3);
  1938.         SetPlayerVirtualWorld(playerid,0);
  1939.         TextDrawSetString(hUp[playerid]," Atualização de casa~n~~n~~r~< ~w~Preço: ~g~$20000 ~r~>");
  1940.         TextDrawShowForPlayer(playerid,hUp[playerid]);
  1941.         }
  1942.         else
  1943.         {
  1944.         ChooseInt[playerid] = 0;
  1945.         SetPlayerPos(playerid,House[HouseID1[playerid]][ExitX],House[HouseID1[playerid]][ExitY],House[HouseID1[playerid]][ExitZ]);
  1946.         SetPlayerInterior(playerid,House[HouseID1[playerid]][IntID]);
  1947.         TextDrawHideForPlayer(playerid,hUp[playerid]);
  1948.         }
  1949.         return 1;
  1950. }
  1951. //=====Casa armazenamento de carro
  1952. YCMD:hretirarcarro(playerid, params[], help)
  1953. {
  1954.         #pragma unused help
  1955.         #pragma unused params
  1956.         new houseid = 0,string[128];
  1957.         new i = Player[playerid][Houseid];
  1958.         if(i == 999) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não tem uma casa.");
  1959.         if(House[i][hCarID] > 0)
  1960.         {
  1961.         new Float:Pos[3]; GetVehiclePos(House[i][hCar],Pos[0],Pos[1],Pos[2]);
  1962.         if(!IsPlayerInRangeOfPoint(playerid,10.0,Pos[0],Pos[1],Pos[2])) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não está perto de seu carro casa.");
  1963.         houseid = i;
  1964.         new money;
  1965.         if(sscanf(params, "i",money)) return SCM(playerid, COLOR_RED, "Use: /hretirarcarro[dinheiro]");
  1966.         if(money > GetPlayerMoney(playerid)) return SCM(playerid, COLOR_RED, "Você não tem esse tipo de dinheiro.");
  1967.         if(money < 1) return SCM(playerid, COLOR_RED, "O dinheiro não pode ser inferior a 1");
  1968.         House[houseid][hCarMoney] += money;
  1969.         GivePlayerMoney(playerid, -money);
  1970.         format(string,sizeof(string),"{E0BC1B}Você colocar no carro $%d. Agora você tem $%d",money,House[houseid][hCarMoney]);
  1971.         SCM(playerid,-1,string);
  1972.         CheckHouse(houseid);
  1973.         }
  1974.         return 1;
  1975. }
  1976. YCMD:hdepositarcarro(playerid, params[], help)
  1977. {
  1978.         #pragma unused help
  1979.         #pragma unused params
  1980.         new houseid = 0,string[128];
  1981.         new i = Player[playerid][Houseid];
  1982.         if(i == 999) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não tem uma casa.");
  1983.         if(House[i][hCarID] > 0)
  1984.         {
  1985.         new Float:Pos[3]; GetVehiclePos(House[i][hCar],Pos[0],Pos[1],Pos[2]);
  1986.         if(!IsPlayerInRangeOfPoint(playerid,10.0,Pos[0],Pos[1],Pos[2])) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não está perto de seu carro, casa.");
  1987.         new money;
  1988.         if(sscanf(params, "i",money)) return SCM(playerid, COLOR_RED, "Use: /hdepositarcarro [dinheiro]");
  1989.         if(money > GetPlayerMoney(playerid)) return SCM(playerid, COLOR_RED, "Você não tem esse tipo de dinheiro.");
  1990.         if(money < 1) return SCM(playerid, COLOR_RED, "O dinheiro não pode ser inferior a 1");
  1991.         House[houseid][hCarMoney] -= money;
  1992.         GivePlayerMoney(playerid, money);
  1993.         format(string,sizeof(string),"{E0BC1B}Você tem tomado armazenamento de carro $%d. Agora você tem $%d",money,House[houseid][hCarMoney]);
  1994.         SCM(playerid,-1,string);
  1995.         CheckHouse(houseid);
  1996.         }
  1997.         return 1;
  1998. }
  1999. YCMD:harmacarro(playerid, params[], help)
  2000. {
  2001.         #pragma unused help
  2002.         #pragma unused params
  2003.         new houseid = 0,string[128];
  2004.         new id = Player[playerid][Houseid];
  2005.         if(id == 999) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não tem uma casa.");
  2006.         if(House[id][hCarID] > 0)
  2007.         {
  2008.         new Float:Pos[3]; GetVehiclePos(House[id][hCar],Pos[0],Pos[1],Pos[2]);
  2009.         if(!IsPlayerInRangeOfPoint(playerid,10.0,Pos[0],Pos[1],Pos[2])) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não está perto de seu carro, casa.");
  2010.         new slot,ammo;
  2011.         if(sscanf(params, "ii",slot,ammo)) return SCM(playerid, COLOR_RED, "Use: /harmacarro [Slot 1/2] [munição]");
  2012.         if(ammo > GetPlayerAmmo(playerid)) return SCM(playerid, COLOR_RED, "Você não tem que muita munição.");
  2013.         if(ammo < 1) return SCM(playerid, COLOR_RED, "Munição não pode ser inferior a 1");
  2014.         if(slot == 1)
  2015.         {
  2016.         if(House[houseid][hCarGun1] != 0) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"There is already gun on this slot.");
  2017.         House[houseid][hCarGun1] = GetPlayerWeapon(playerid);
  2018.         House[houseid][hCarAmmo1] = ammo;
  2019.         SetPlayerAmmo(playerid,GetPlayerWeapon(playerid),GetPlayerAmmo(playerid)-ammo);
  2020.         format(string,sizeof(string),"{E0BC1B}Você colocou arma na slot 1.With %d munição",ammo);
  2021.         SCM(playerid,-1,string);
  2022.         CheckHouse(id);
  2023.         }
  2024.         if(slot == 2)
  2025.         {
  2026.         if(House[houseid][hCarGun1] != 0) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Já existe arma para este slot.");
  2027.         House[houseid][hCarGun2] = GetPlayerWeapon(playerid);
  2028.         House[houseid][hCarAmmo2] = ammo;
  2029.         SetPlayerAmmo(playerid,GetPlayerWeapon(playerid),GetPlayerAmmo(playerid)-ammo);
  2030.         format(string,sizeof(string),"{E0BC1B}Você colocar no slot arma 2.With %d Munição",ammo);
  2031.         SCM(playerid,-1,string);
  2032.         CheckHouse(id);
  2033.         }
  2034.         }
  2035.         return 1;
  2036. }
  2037. YCMD:hlevararma(playerid, params[], help)
  2038. {
  2039.         #pragma unused help
  2040.         #pragma unused params
  2041.         new houseid = 0,string[128];
  2042.         new id = Player[playerid][Houseid];
  2043.         if(id == 999) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não tem uma casa.");
  2044.         if(House[id][hCarID] > 0)
  2045.         {
  2046.         new Float:Pos[3]; GetVehiclePos(House[id][hCar],Pos[0],Pos[1],Pos[2]);
  2047.         if(!IsPlayerInRangeOfPoint(playerid,10.0,Pos[0],Pos[1],Pos[2])) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não está perto de seu carro casa.");
  2048.         new slot,ammo;
  2049.         if(sscanf(params, "ii",slot,ammo)) return SCM(playerid, COLOR_RED, "Use: /hlevararma [Slot 1/2] [munição]");
  2050.         if(ammo < 1) return SCM(playerid, COLOR_RED, "Munição não pode ser inferior a 1");
  2051.         if(slot == 1)
  2052.         {
  2053.         if(House[houseid][hCarGun1] == 0) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Não há arma para este slot.");
  2054.         if(ammo > House[houseid][hCarAmmo1]) return SCM(playerid, COLOR_RED, "Erro:"COL_WHITE" No cofre não tem que muita munição.");
  2055.         GivePlayerWeapon(playerid,House[houseid][hCarGun1],ammo);
  2056.         House[houseid][hCarAmmo1] -= ammo;
  2057.         if(House[houseid][hCarAmmo1] == 0) {House[houseid][hCarGun1] = 0;}
  2058.         format(string,sizeof(string),"{E0BC1B}Está tomar arma de fenda 1.With %d Munição",ammo);
  2059.         SCM(playerid,-1,string);
  2060.         CheckHouse(id);
  2061.         }
  2062.         if(slot == 2)
  2063.         {
  2064.         if(House[houseid][hCarGun2] == 0) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Não há arma para este slot.");
  2065.         if(ammo > House[houseid][hCarAmmo2]) return SCM(playerid, COLOR_RED, "Erro:"COL_WHITE" No cofre não tem que muita munição.");
  2066.         GivePlayerWeapon(playerid,House[houseid][hCarGun2],ammo);
  2067.         House[houseid][hCarAmmo2] -= ammo;
  2068.         if(House[houseid][hCarAmmo2] == 0) {House[houseid][hCarGun2] = 0;}
  2069.         format(string,sizeof(string),"{E0BC2B}Você tomou arma de fenda 2.With %d Munição",ammo);
  2070.         SCM(playerid,-1,string);
  2071.         CheckHouse(id);
  2072.         }
  2073.         }
  2074.         return 1;
  2075. }
  2076. YCMD:hestacionar(playerid, params[], help)
  2077. {
  2078.         #pragma unused help
  2079.         #pragma unused params
  2080.         if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você deve estar em um veículo");
  2081.         new hid,Float:Pos[4];
  2082.         GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
  2083.         GetPlayerFacingAngle(playerid,Pos[3]);
  2084.         new id = Player[playerid][Houseid];
  2085.         if(id == 999) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não tem uma casa.");
  2086.         if(House[id][hCar] > 0)
  2087.         {
  2088.         if(House[id][hCar] != GetPlayerVehicleID(playerid)) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Este não é o seu carro.");
  2089.         House[hid][hCarX] = Pos[0];
  2090.         House[hid][hCarY] = Pos[1];
  2091.         House[hid][hCarZ] = Pos[2];
  2092.         House[hid][hCarA] = Pos[3];
  2093.         GameTextForPlayer(playerid,"Carro ~r~estacionado",3000,0);
  2094.         CheckHouse(hid);
  2095.         }
  2096.         return 1;
  2097. }
  2098. YCMD:hcorcarro(playerid, params[], help)
  2099. {
  2100.         #pragma unused help
  2101.         #pragma unused params
  2102.         if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você deve estar em um veículo");
  2103.         new id = GetPlayerVehicleID(playerid),hid,C[2];
  2104.         new i = Player[playerid][Houseid];
  2105.         if(i == 999) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não tem uma casa.");
  2106.         if(House[i][hCarID] > 0)
  2107.         {
  2108.         if(House[i][hCar] != GetPlayerVehicleID(playerid)) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Este não é o seu carro.");
  2109.         hid = i;
  2110.         if(sscanf(params,"ii",C[0],C[1])) return SCM(playerid,COLOR_RED,"Usage: "COL_WHITE"/hcorcarro [Cor 1] [Cor 2]");
  2111.         House[hid][hCarC1] = C[0];
  2112.         House[hid][hCarC2] = C[1];
  2113.         ChangeVehicleColor(id,House[hid][hCarC1],House[hid][hCarC2]);
  2114.         GameTextForPlayer(playerid,"Cor do carro mudou",3000,0);
  2115.         CheckHouse(hid);
  2116.         }
  2117.         return 1;
  2118. }
  2119. YCMD:htelefone(playerid, params[], help)
  2120. {
  2121.         #pragma unused help
  2122.         #pragma unused params
  2123.         new id = Player[playerid][Houseid];
  2124.         if(id == 999) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não tem uma casa");
  2125.         if(!IsPlayerInRangeOfPoint(playerid,3.0,House[id][ExitX],House[id][ExitY],House[id][ExitZ])) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não está perto de sua casa");
  2126.         TogglePlayerControllable(playerid,false);
  2127.         PhoneChoose[playerid] = 1;
  2128.         TextDrawSetString(Phone1[playerid],"~y~1 2 3~n~4 5 6~n~7 8 9~n~~g~~g~C ~w~0 ~r~H");
  2129.         TextDrawSetString(Phone4[playerid],"");
  2130.         TextDrawShowForPlayer(playerid,Phone0[playerid]);
  2131.         TextDrawShowForPlayer(playerid,Phone1[playerid]);
  2132.         TextDrawShowForPlayer(playerid,Phone2[playerid]);
  2133.         TextDrawShowForPlayer(playerid,Phone3[playerid]);
  2134.         TextDrawShowForPlayer(playerid,Phone4[playerid]);
  2135.         TextDrawShowForPlayer(playerid,Phone5[playerid]);
  2136.         return 1;
  2137. }
  2138. YCMD:hatendertelefone(playerid, params[], help)
  2139. {
  2140.         #pragma unused help
  2141.         #pragma unused params
  2142.         if(CallFrom[playerid] != 999 && Calling[CallFrom[playerid]] > 0)
  2143.             {
  2144.                 TalkWith[playerid] = CallFrom[playerid];
  2145.                 TalkWith[CallFrom[playerid]] = playerid;
  2146.                 SCM(playerid,-1,"Alguém atende o telefone");
  2147.                 Calling[CallFrom[playerid]] = 0;
  2148.                 CallFrom[playerid] = 999;
  2149.             }
  2150.         return 1;
  2151. }
  2152. YCMD:hmudarspawm(playerid, params[], help)
  2153. {
  2154.         #pragma unused help
  2155.         #pragma unused params
  2156.         new id = Player[playerid][Houseid];
  2157.         if(id == 999) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não tem uma casa");
  2158.         if(!IsPlayerInRangeOfPoint(playerid,3.0,House[id][ExitX],House[id][ExitY],House[id][ExitZ])) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você deve estar em sua casa.");
  2159.             Player[playerid][Spawn] = 1;
  2160.             Player[playerid][SpawnX] = House[id][ExitX];
  2161.             Player[playerid][SpawnY] = House[id][ExitY];
  2162.             Player[playerid][SpawnZ] = House[id][ExitZ];
  2163.             Player[playerid][SpawnInt] = House[id][IntID];
  2164.             Player[playerid][SpawnVW] = House[id][VW];
  2165.             SCM(playerid,-1,"Spawn foi alterado para um local específico");
  2166.         return 1;
  2167. }
  2168. YCMD:hroubarcasa(playerid, params[], help)
  2169. {
  2170.         #pragma unused help
  2171.         #pragma unused params
  2172.         new id = GetClosetHouseID(playerid),password[5],string[128];
  2173.         if(id == -1) return SCM(playerid,-1,"There is no house");
  2174.         if(Player[playerid][RobHouse] > 0) return SCM(playerid,-1,"Você já é roubar casa");
  2175.         if(sscanf(params,"s[5]",password)) return SCM(playerid,-1,"Use: /hroubarcasa [Senha]");
  2176.         if(strcmp(House[id][LockPass],password,false) == 0)
  2177.         {
  2178.             if(House[id][Money] == 0)return SCM(playerid,-1,"Não há dinheiro em casa ou seguro.");
  2179.             Player[playerid][RobHouse] = 3600;
  2180.             GivePlayerMoney(playerid,House[id][Money]/2);
  2181.             House[id][Money] -= House[id][Money]/2;
  2182.             format(string,128,"Você roubou uma casa e levado $%d",House[id][Money]/2);
  2183.             SCM(playerid,-1,string);
  2184.         }
  2185.         else return SCM(playerid,-1,"senha errada");
  2186.         return 1;
  2187. }
  2188. //Update 1.2
  2189. YCMD:hdarchave(playerid, params[], help)
  2190. {
  2191.         #pragma unused help
  2192.         new string[170],id;
  2193.         new i = Player[playerid][Houseid];
  2194.         if(Player[playerid][Houseid] == 999) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não tem uma casa");
  2195.         if(sscanf(params,"u",id))return SCM(playerid,COLOR_RED,"Usage: "COL_WHITE"/hdarchave [ID/Nome]");
  2196.         if(id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_RED, "Erro: "COL_WHITE"jogador inválido.");
  2197.         if(Player[id][Houseid] != 999) return SCM(playerid, COLOR_RED, "Erro: "COL_WHITE"Esse jogador já tem uma casa.");
  2198.         format(House[i][Owner], 32, "%s", GetName(id));
  2199.         Player[id][Houseid] = Player[playerid][Houseid];
  2200.         Player[playerid][Houseid] = 999;
  2201.         Player[id][Houseid] = Player[playerid][Houseid];
  2202.         CheckHouse(i);
  2203.         format(string,sizeof(string),"{E0BC1B}Owner: "COL_WHITE"%s\n{E0BC1B}Nome da casa: "COL_WHITE"%s\n{E0BC1B}Preço: "COL_WHITE"%d\n{E0BC1B}Level: "COL_WHITE"%d\n{E0BC1B}Preço Aluguel: "COL_WHITE"%d\n{E0BC1B}Endereço: "COL_WHITE"%s\n (/alugarcasa)",House[i][Owner],House[i][HouseName],House[i][Price],House[i][Level],House[i][RentPrice],House[i][Address]);
  2204.         UpdateDynamic3DTextLabelText(House[i][DLabel],-1,string);
  2205.         UpdatePlayerInformation(playerid);
  2206.         return 1;
  2207. }
  2208. YCMD:hminhacasa(playerid, params[], help)
  2209. {
  2210.         #pragma unused help
  2211.         #pragma unused params
  2212.         new i = Player[playerid][Houseid];
  2213.         if(Player[playerid][Houseid] == 999) return SCM(playerid,COLOR_RED,"Erro: "COL_WHITE"Você não tem uma casa");
  2214.         SetPlayerCheckpoint(playerid,House[i][EnterX],House[i][EnterY],House[i][EnterZ],2.0);
  2215.         PlayerCP[playerid] = 1;
  2216.         SendFormatMSG(playerid,-1,"O seu endereço de casa é %s. Casa está marcado no mapa",House[i][Address]);
  2217.         return 1;
  2218. }
  2219. //==========Stock
  2220. stock CreateSaveHouse(name[],id,price,level,vw,Float:PosX,Float:PosY,Float:PosZ)
  2221. {
  2222.         new dFile[32],string[200],number = randomEx(1000,9999);
  2223.         new zone[48];
  2224.         new Year, Month, Day;
  2225.         getdate(Year, Month, Day);
  2226.         GetHouse2DZone(id, zone, 48);
  2227.         format(dFile, 35, House_File, id);
  2228.  
  2229.         new
  2230.             INI:File = INI_Open(dFile);
  2231.  
  2232.             INI_WriteFloat(File, "EnterX", PosX);
  2233.             INI_WriteFloat(File, "EnterY", PosY);
  2234.             INI_WriteFloat(File, "EnterZ", PosZ);
  2235.             INI_WriteFloat(File, "ExitX", 223.42928466797);
  2236.             INI_WriteFloat(File, "ExitY", 1287.3064941406);
  2237.             INI_WriteFloat(File, "ExitZ", 1082.14);
  2238.             INI_WriteString(File, "HouseName", name);
  2239.             INI_WriteString(File, "Owner", "Apartment");
  2240.             INI_WriteInt(File, "Price", price);
  2241.             INI_WriteInt(File, "Level", level);
  2242.             INI_WriteInt(File, "Interior", 1);
  2243.             INI_WriteInt(File, "VW", vw);
  2244.             INI_WriteInt(File, "On_Sell", 1);
  2245.             INI_WriteInt(File, "Lock", 0);
  2246.             INI_WriteInt(File, "RentPrice", 100);
  2247.             INI_WriteString(File, "PlayerRent", "Nobody");
  2248.             INI_WriteInt(File, "Money", 0);
  2249.             INI_WriteInt(File, "Gun1", 0);
  2250.             INI_WriteInt(File, "Gun2", 0);
  2251.             INI_WriteInt(File, "Ammo1", 0);
  2252.             INI_WriteInt(File, "Ammo2", 0);
  2253.             INI_WriteString(File, "LockPass", "1111");
  2254.             INI_WriteFloat(File, "hCarX", 0);
  2255.             INI_WriteFloat(File, "hCarY", 0);
  2256.             INI_WriteFloat(File, "hCarZ", 0);
  2257.             INI_WriteFloat(File, "hCarA", 0);
  2258.             INI_WriteInt(File, "hCarC1", 0);
  2259.             INI_WriteInt(File, "hCarC2", 0);
  2260.             INI_WriteInt(File, "hCarID", 0);
  2261.             INI_WriteInt(File, "hCarMoney",0);
  2262.             INI_WriteInt(File, "hCarGun1",0);
  2263.             INI_WriteInt(File, "hCarGun2",0);
  2264.             INI_WriteInt(File, "hCarAmmo1", 0);
  2265.             INI_WriteInt(File, "hCarAmmo2", 0);
  2266.             format(string,sizeof(string),"%d",number);
  2267.             INI_WriteString(File, "PhoneNum", string);
  2268.             format(string,sizeof(string),"%s %d",zone,id);
  2269.             INI_WriteString(File, "Address", string);
  2270.             INI_WriteInt(File, "DayEnter", Day);
  2271.             INI_WriteInt(File, "MonthEnter", Month);
  2272.            
  2273.             INI_Close(File);
  2274.  
  2275.             House[id][EnterX] = PosX;
  2276.             House[id][EnterY] = PosY;
  2277.             House[id][EnterZ] = PosZ;
  2278.             House[id][ExitX] = 223.42928466797;
  2279.             House[id][ExitY] = 1287.3064941406;
  2280.             House[id][ExitZ] = 1082.14;
  2281.             format(House[id][HouseName],48,"%s",name);
  2282.             format(House[id][Owner],48,"Apartment");
  2283.             House[id][Price] = price;
  2284.             House[id][Level] = level;
  2285.             House[id][IntID] = 1;
  2286.             House[id][VW] = vw;
  2287.             House[id][On_Sell] = 1;
  2288.             House[id][Lock] = 0;
  2289.             House[id][RentPrice] = 100;
  2290.             format(House[id][Player_Rent],48,"Nobody");
  2291.             House[id][Money] = 0;
  2292.             House[id][Gun1] = 0;
  2293.             House[id][Gun2] = 0;
  2294.             House[id][Ammo1] = 0;
  2295.             House[id][Ammo2] = 0;
  2296.             format(House[id][LockPass],48,"1111");
  2297.             House[id][hCarX] = 0;
  2298.             House[id][hCarY] = 0;
  2299.             House[id][hCarZ] = 0;
  2300.             House[id][hCarA] = 0;
  2301.             House[id][hCarC1] = 0;
  2302.             House[id][hCarC2] = 0;
  2303.             House[id][hCarID] = 0;
  2304.             House[id][hCarMoney] = 0;
  2305.             House[id][hCarGun1] = 0;
  2306.             House[id][hCarGun2] = 0;
  2307.             House[id][hCarAmmo1] = 0;
  2308.             House[id][hCarAmmo2] = 0;
  2309.             format(House[id][PhoneNum],5,"%d",number);
  2310.             format(House[id][Address],32,"%s %d",zone,id);
  2311.             House[id][DayEnter] = Day;
  2312.             House[id][MonthEnter] = Month;
  2313.            
  2314.             House[id][PickupU] = CreateDynamicPickup(1273, 23,  PosX,PosY,PosZ,-1,-1,-1,100.0);
  2315.             format(string,sizeof(string),"{29CC3F}Proprietário: "COL_WHITE"Apartamento\n{29CC3F}Nome da Casa: "COL_WHITE"%s\n{29CC3F}Preço: "COL_WHITE"%d\n{29CC3F}Level: "COL_WHITE"%d\n{29CC3F}Endereço: "COL_WHITE"%s %d\n (/comprarcasa)",name,price,level,zone,id);
  2316.             House[id][DLabel] = CreateDynamic3DTextLabel(string, 0xFFFFFF,  PosX,PosY,PosZ, 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10);
  2317.             House[id][Icon] = CreateDynamicMapIcon(PosX,PosY,PosZ, 31, 0, -1, -1, -1, 10);
  2318. }
  2319. stock CheckHouse(id)
  2320. {
  2321.         new dFile[32];
  2322.         format(dFile, 35, House_File, id);
  2323.  
  2324.         new
  2325.             INI:File = INI_Open(dFile);
  2326.  
  2327.             INI_WriteFloat(File, "EnterX", House[id][EnterX]);
  2328.             INI_WriteFloat(File, "EnterY", House[id][EnterY]);
  2329.             INI_WriteFloat(File, "EnterZ", House[id][EnterZ]);
  2330.             INI_WriteFloat(File, "ExitX", House[id][ExitX]);
  2331.             INI_WriteFloat(File, "ExitY", House[id][ExitY]);
  2332.             INI_WriteFloat(File, "ExitZ", House[id][ExitZ]);
  2333.             INI_WriteString(File, "HouseName", House[id][HouseName]);
  2334.             INI_WriteString(File, "Owner", House[id][Owner]);
  2335.             INI_WriteInt(File, "Price", House[id][Price]);
  2336.             INI_WriteInt(File, "Level", House[id][Level]);
  2337.             INI_WriteInt(File, "Interior", House[id][IntID]);
  2338.             INI_WriteInt(File, "VW", House[id][VW]);
  2339.             INI_WriteInt(File, "On_Sell", House[id][On_Sell]);
  2340.             INI_WriteInt(File, "Lock", House[id][Lock]);
  2341.             INI_WriteInt(File, "RentPrice", House[id][RentPrice]);
  2342.             INI_WriteString(File, "PlayerRent", House[id][Player_Rent]);
  2343.             INI_WriteInt(File, "Money", House[id][Money]);
  2344.             INI_WriteInt(File, "Gun1", House[id][Gun1]);
  2345.             INI_WriteInt(File, "Gun2", House[id][Gun2]);
  2346.             INI_WriteInt(File, "Ammo1", House[id][Ammo1]);
  2347.             INI_WriteInt(File, "Ammo2", House[id][Ammo2]);
  2348.             INI_WriteString(File, "LockPass", House[id][LockPass]);
  2349.             INI_WriteFloat(File, "hCarX", House[id][hCarX]);
  2350.             INI_WriteFloat(File, "hCarY", House[id][hCarY]);
  2351.             INI_WriteFloat(File, "hCarZ", House[id][hCarZ]);
  2352.             INI_WriteFloat(File, "hCarA", House[id][hCarA]);
  2353.             INI_WriteInt(File, "hCarC1", House[id][hCarC1]);
  2354.             INI_WriteInt(File, "hCarC2", House[id][hCarC2]);
  2355.             INI_WriteInt(File, "hCarID", House[id][hCarID]);
  2356.             INI_WriteInt(File, "hCarMoney", House[id][hCarMoney]);
  2357.             INI_WriteInt(File, "hCarGun1", House[id][hCarGun1]);
  2358.             INI_WriteInt(File, "hCarGun2", House[id][hCarGun2]);
  2359.             INI_WriteInt(File, "hCarAmmo1", House[id][hCarAmmo1]);
  2360.             INI_WriteInt(File, "hCarAmmo2", House[id][hCarAmmo2]);
  2361.             INI_WriteString(File, "PhoneNum", House[id][PhoneNum]);
  2362.             INI_WriteString(File, "Address", House[id][Address]);
  2363.             INI_WriteInt(File, "DayEnter", House[id][DayEnter]);
  2364.             INI_WriteInt(File, "MonthEnter", House[id][MonthEnter]);
  2365.             INI_Close(File);
  2366. }
  2367. stock ReadHouse(i)
  2368. {
  2369.     new string[200];
  2370.     if(House[i][On_Sell] == 1)
  2371.     {
  2372.     format(string,sizeof(string),"{29CC3F}Proprietário: "COL_WHITE"Apartamento\n{29CC3F}Nome da Casa: "COL_WHITE"%s\n{29CC3F}Preço: "COL_WHITE"%d\n{29CC3F}Level: "COL_WHITE"%d\n{29CC3F}Endereço: "COL_WHITE"%s\n (/comprarcasa)",House[i][HouseName],House[i][Price],House[i][Level],House[i][Address]);
  2373.     House[i][DLabel] = CreateDynamic3DTextLabel(string, 0xFFFFFF, House[i][EnterX],House[i][EnterY],House[i][EnterZ], 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10);
  2374.     House[i][PickupU] = CreateDynamicPickup(1273, 23,  House[i][EnterX],House[i][EnterY],House[i][EnterZ],-1,-1,-1,10);
  2375.     House[i][Icon] = CreateDynamicMapIcon(House[i][EnterX],House[i][EnterY],House[i][EnterZ], 31, 0, -1, -1, -1, 10);
  2376.     if(House[i][hCarID] != 0)
  2377.     {
  2378.         House[i][hCar] = AddStaticVehicleEx(House[i][hCarID],House[i][hCarX],House[i][hCarY],House[i][hCarZ],House[i][hCarA],House[i][hCarC1],House[i][hCarC2],3600);
  2379.         format(HouseOwner[House[i][hCar]],32,"%s",House[i][Owner]);
  2380.     }
  2381.     else if(House[i][hCarID] == 0)
  2382.     {
  2383.     House[i][hCar] = 0;
  2384.     }
  2385.     }
  2386.     else if(House[i][On_Sell] == 0)
  2387.     {
  2388.     format(string,sizeof(string),"{E0BC1B}Proprietário: "COL_WHITE"%s\n{E0BC1B}Nome da Casa: "COL_WHITE"%s\n{E0BC1B}Preço: "COL_WHITE"%d\n{E0BC1B}Level: "COL_WHITE"%d\n{E0BC1B}Preço do Aluguel: "COL_WHITE"%d\n{E0BC1B}Endereço: "COL_WHITE"%s\n (/alugarcasa)",House[i][Owner],House[i][HouseName],House[i][Price],House[i][Level],House[i][RentPrice],House[i][Address]);
  2389.     House[i][DLabel] = CreateDynamic3DTextLabel(string, 0xFFFFFF,  House[i][EnterX],House[i][EnterY],House[i][EnterZ], 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10);
  2390.     House[i][PickupU] = CreateDynamicPickup(1272, 23,  House[i][EnterX],House[i][EnterY],House[i][EnterZ],-1,-1,-1,10);
  2391.     House[i][Icon] = CreateDynamicMapIcon(House[i][EnterX],House[i][EnterY],House[i][EnterZ], 32, 0, -1, -1, -1, 10);
  2392.     if(House[i][hCarID] != 0)
  2393.     {
  2394.         House[i][hCar] = AddStaticVehicleEx(House[i][hCarID],House[i][hCarX],House[i][hCarY],House[i][hCarZ],House[i][hCarA],House[i][hCarC1],House[i][hCarC2],3600);
  2395.         format(HouseOwner[House[i][hCar]],32,"%s",House[i][Owner]);
  2396.     }
  2397.     else if(House[i][hCarID] == 0)
  2398.     {
  2399.     House[i][hCar] = 0;
  2400.     }
  2401.     }
  2402. }
  2403. //==========Public
  2404. forward GetClosetHouseID(playerid);
  2405. public GetClosetHouseID(playerid)
  2406. {
  2407.     new Float:Distance;
  2408.     for(new h; h<MAX_HOUSE; h++)
  2409.     {
  2410.         Distance = GetDistanceToHouse(playerid, h);
  2411.         if(Distance < 2.0)
  2412.         {
  2413.             return h;
  2414.         }
  2415.     }
  2416.     return -1;
  2417. }
  2418. forward Float:GetDistanceToHouse(playerid, h);
  2419. public Float:GetDistanceToHouse(playerid, h)
  2420. {
  2421.     new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
  2422.     GetPlayerPos(playerid,x1,y1,z1);
  2423.     x2 = House[h][EnterX];
  2424.     y2 = House[h][EnterY];
  2425.     z2 = House[h][EnterZ];
  2426.     return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
  2427. }
  2428. forward GetClosetHouseIntID(playerid);
  2429. public GetClosetHouseIntID(playerid)
  2430. {
  2431.     new Float:Distance;
  2432.     for(new h; h<MAX_HOUSE; h++)
  2433.     {
  2434.         Distance = GetDistanceToHouseInt(playerid, h);
  2435.         if(Distance < 10.0 && House[h][VW] == GetPlayerVirtualWorld(playerid))
  2436.         {
  2437.             return h;
  2438.         }
  2439.     }
  2440.     return -1;
  2441. }
  2442. forward Float:GetDistanceToHouseInt(playerid, h);
  2443. public Float:GetDistanceToHouseInt(playerid, h)
  2444. {
  2445.     new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
  2446.     GetPlayerPos(playerid,x1,y1,z1);
  2447.     x2 = House[h][ExitX];
  2448.     y2 = House[h][ExitY];
  2449.     z2 = House[h][ExitZ];
  2450.     return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
  2451. }
  2452. stock GetName(playerid)
  2453. {
  2454.     new
  2455.         pName[MAX_PLAYER_NAME];
  2456.  
  2457.     GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
  2458.     return pName;
  2459. }
  2460. stock ProxDetector(playerid, const msg [], color, maxdistance = 50)
  2461. {
  2462.     new
  2463.         Float: x1,
  2464.         Float: y1,
  2465.         Float: z1,
  2466.         distance,
  2467.         string [128];
  2468.  
  2469.     if (GetPlayerName (playerid, string, sizeof string))
  2470.     {
  2471.         format (string, sizeof string, "%s", msg);
  2472.         GetPlayerPos (playerid, x1, y1, z1);
  2473.         for (new i = 0; i < MAX_PLAYERS; ++i)
  2474.         {
  2475.             if (IsPlayerConnected (i) && !IsPlayerNPC (i))
  2476.             {
  2477.                 if (i == playerid)
  2478.                     SCM (i, color, string);
  2479.                 else
  2480.                 {
  2481.                     distance = floatround (GetPlayerDistanceFromPoint (i, x1, y1, z1));
  2482.                     if (distance <= maxdistance)
  2483.                         SCM (i, ColorFade (color, distance, maxdistance), string);
  2484.                 }
  2485.             }
  2486.         }
  2487.         return 1;
  2488.     }
  2489.     return 0;
  2490. }
  2491. stock ColorFade (color, value, maxvalue)
  2492. {
  2493.     if (0 <= value <= maxvalue)
  2494.     {
  2495.         new
  2496.             Float: ratio = float (value) / float (maxvalue);
  2497.         new
  2498.             r = max (0, min (255, floatround (float ((color >> 24) & 0xFF) * ratio))),
  2499.             g = max (0, min (255, floatround (float ((color >> 16) & 0xFF) * ratio))),
  2500.             b = max (0, min (255, floatround (float ((color >> 8) & 0xFF) * ratio)));
  2501.         return (r << 24) | (g << 16) | (b << 8) | (value & 0xFF);
  2502.     }
  2503.     return 0;
  2504. }
  2505. stock GetClosestVehicleID(playerid)
  2506. {
  2507.     new
  2508.         Float:Pos[3],
  2509.         Float:dist,
  2510.         Float:closedist=10.0,
  2511.         closeveh;
  2512.     for(new i=0; i < MAX_VEHICLES; i++)
  2513.     {
  2514.         if(GetVehiclePos(i, Pos[0], Pos[1], Pos[2]))
  2515.         {
  2516.             dist = GetPlayerDistanceFromPoint(playerid, Pos[0], Pos[1], Pos[2]);
  2517.             if(dist < closedist)
  2518.             {
  2519.                 closedist = dist;
  2520.                 closeveh = i;
  2521.             }
  2522.         }
  2523.     }
  2524.     return closeveh;
  2525. }
  2526. forward GlobalTimer();
  2527. public GlobalTimer()
  2528. {
  2529. new Year, Month, Day,string[64];
  2530. getdate(Year, Month, Day);
  2531. for(new id = 0; id <= MAX_HOUSE;id++)
  2532. {
  2533. format(string,64,House_File,id);
  2534. if(House[id][DayEnter]+MAX_DAYS <= Day && House[id][On_Sell] == 0)
  2535. {
  2536. if(fexist(string))
  2537. {
  2538. //If month have 31 days
  2539. if(House[id][MonthEnter] == 1 || House[id][MonthEnter] == 3 || House[id][MonthEnter] == 5 || House[id][MonthEnter] == 7 || House[id][MonthEnter] == 8 || House[id][MonthEnter] == 10 || House[id][MonthEnter] == 12)
  2540. {
  2541. if(House[id][DayEnter]+MAX_DAYS > 31)
  2542. {
  2543. new newday = (31-House[id][DayEnter]);
  2544. new newday1 = MAX_DAYS-newday;
  2545. if(newday1 != Day) return 1;
  2546. }
  2547. }
  2548. //If month have 30 days
  2549. if(House[id][MonthEnter] == 4 || House[id][MonthEnter] == 6 || House[id][MonthEnter] == 9 || House[id][MonthEnter] == 11)
  2550. {
  2551. if(House[id][DayEnter]+MAX_DAYS > 30)
  2552. {
  2553. new newday = (30-House[id][DayEnter]);
  2554. new newday1 = MAX_DAYS-newday;
  2555. if(newday1 != Day) return 1;
  2556. }
  2557. }
  2558. //If month have 29 days
  2559. if(House[id][MonthEnter] == 2)
  2560. {
  2561. if(House[id][DayEnter]+MAX_DAYS > 29)
  2562. {
  2563. new newday = (29-House[id][DayEnter]);
  2564. new newday1 = MAX_DAYS-newday;
  2565. if(newday1 != Day) return 1;
  2566. }
  2567. }
  2568. ResetPlayerHouseID(House[id][Owner]);
  2569. House[id][On_Sell] = 1;
  2570. format(House[id][Owner],48,"Apartment");
  2571. CheckHouse(id);
  2572. DestroyDynamicPickup(House[id][PickupU]);
  2573. House[id][PickupU] = CreateDynamicPickup(1273, 23,  House[id][EnterX],House[id][EnterY],House[id][EnterZ],-1,-1,-1,100.0);
  2574. DestroyDynamicMapIcon(House[id][Icon]);
  2575. House[id][Icon] = CreateDynamicMapIcon(House[id][EnterX],House[id][EnterY],House[id][EnterZ], 31, 0, -1, -1, -1, 100.0);
  2576. format(string,sizeof(string),"{29CC3F}Proprietário: "COL_WHITE"Apartamentos\n{29CC3F}Nome da casa: "COL_WHITE"%s\n{29CC3F}Preço: "COL_WHITE"%d\n{29CC3F}Level: "COL_WHITE"%d\n{29CC3F}Endereço: "COL_WHITE"%s\n (/comprarcasa)",House[id][HouseName],House[id][Price],House[id][Level],House[id][Address]);
  2577. UpdateDynamic3DTextLabelText(House[id][DLabel],-1,string);
  2578. printf("House ID %d has been unowned",id);
  2579. }
  2580. }
  2581. }
  2582. foreach(Player, i)
  2583. {
  2584. //===Bills===
  2585. if(Player[i][Houseid] != 999)
  2586. {
  2587. Player[i][Sec]++;
  2588. if(Player[i][Sec] >= 60) {Player[i][Sec] = 0; Player[i][Min]++;}
  2589. if(Player[i][Min] == 60)
  2590. {
  2591. Player[i][Min] = 0;
  2592. new money = randomEx(50,150);
  2593. SendFormatMSG(i,-1,"Você pagar as contas da casa {13AD32}$%d",money);
  2594. GivePlayerMoney(i,-money);
  2595. }
  2596. }
  2597. //Phone
  2598. if(Calling[i] > 0)
  2599. {
  2600. Calling[i]--;
  2601. if(Calling[i] == 0) {SCM(i,-1,"Não há resposta.");}
  2602. }
  2603. if(Player[i][RobHouse] > 0) Player[i][RobHouse]--;
  2604. }
  2605. return 1;
  2606. }
  2607. stock UpdatePlayerInformation(playerid)
  2608. {
  2609. new dFile[32];
  2610. format(dFile, 35, FILE_FOR_PLAYER, GetName(playerid));
  2611.  
  2612. new
  2613.     INI:UserFile = INI_Open(dFile);
  2614.  
  2615.     INI_WriteFloat(UserFile, "pSpawnX", Player[playerid][SpawnX]);
  2616.     INI_WriteFloat(UserFile, "pSpawnY", Player[playerid][SpawnY]);
  2617.     INI_WriteFloat(UserFile, "pSpawnZ", Player[playerid][SpawnZ]);
  2618.     INI_WriteInt(UserFile, "pSpawn", Player[playerid][Spawn]);
  2619.     INI_WriteInt(UserFile, "pSpawnInt", Player[playerid][SpawnInt]);
  2620.     INI_WriteInt(UserFile, "pVW", Player[playerid][SpawnVW]);
  2621.     INI_WriteInt(UserFile, "RobHouse", Player[playerid][RobHouse]);
  2622.     INI_WriteInt(UserFile, "HouseID", Player[playerid][Houseid]);
  2623.     INI_WriteInt(UserFile, "Bill", Player[playerid][Min]);
  2624.  
  2625.     INI_Close(UserFile);
  2626. }
  2627. stock ResetPlayerHouseID(name[])
  2628. {
  2629. new dFile[32];
  2630. format(dFile, 35, FILE_FOR_PLAYER, name);
  2631.  
  2632. new
  2633.     INI:UserFile = INI_Open(dFile);
  2634.  
  2635.     INI_WriteInt(UserFile, "HouseID", 999);
  2636.     INI_Close(UserFile);
  2637. }
  2638.  
  2639.  
  2640. stock GetHouse2DZone(id, zone[], len)
  2641. {
  2642.     new Float:x = House[id][EnterX], Float:y = House[id][EnterY];
  2643.     for(new i = 0; i != sizeof(SanAndreasZones); i++ )
  2644.     {
  2645.         if(x >= SanAndreasZones[i][Zone_Area][0] && x <= SanAndreasZones[i][Zone_Area][3] && y >= SanAndreasZones[i][Zone_Area][1] && y <= SanAndreasZones[i][Zone_Area][4])
  2646.             return format(zone, len, SanAndreasZones[i][Zone_Name], 0);
  2647.     }
  2648.     return 0;
  2649. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement