SHARE
TWEET

Untitled

a guest Mar 25th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Key Icon made by "Vectors Market" on www.flaticon.com
  2.  
  3. if( !SPROP || type( SPROP ) != "table" ) then
  4.     SPROP = {};
  5. end
  6. SPROP.Props = SPROP.Props or {};
  7.  
  8. SPROP.Settings = {};
  9. // These ranks can use the admin tools:
  10. SPROP.Settings.AdminRanks   = { "superadmin", "owner", "founder" };
  11. // these ranks can change permanent properties stuff:
  12. SPROP.Settings.TimedMenuRanks= { "superadmin", "owner", "founder" };
  13. // command to open:
  14. SPROP.Settings.TimedMenuCommand = "!sprop";
  15.  
  16. SPROP.Settings.PurchaseMade             = "You purchased the property.";
  17. SPROP.Settings.SoldMade                 = "You sold the property for $[x].";
  18. SPROP.Settings.CantPurchase             = "You can't afford this.";
  19. SPROP.Settings.Close                    = "Close";
  20. SPROP.Settings.ForSale                  = "For sale!";
  21. SPROP.Settings.Currency                 = "$";
  22. SPROP.Settings.Purchase                 = "Purchase";
  23. SPROP.Settings.Extend                   = "Extend";
  24. SPROP.Settings.Sell                     = "Sell";
  25. SPROP.Settings.Confirm                  = "Click again";
  26. SPROP.Settings.OwnedByYou               = "You";
  27. SPROP.Settings.AddCoOwner               = "Add Co-Owner";
  28. SPROP.Settings.DelCoOwner               = "Remove Co-Owner";
  29. SPROP.Settings.UnownTime                = 120; // if not using timed properties, doors will be owned this many seconds after dc(incase crash)
  30. SPROP.Settings.Owned                    = "Owned by [x]"; // [x] is replaced with the owenrs name
  31. SPROP.Settings.BoxWidth                 = 300;
  32. SPROP.Settings.NoAccess                 = "You don't have access to these properties.";
  33.  
  34. SPROP.Settings.LineH                    = 3;
  35. SPROP.Settings.LineClr                  = Color( 90, 210, 130, 140 );
  36. SPROP.Settings.GeneralClr               = Color( 0, 0, 0, 230 );
  37. SPROP.Settings.GeneralClr2              = Color( 36, 36, 36, 180 );
  38. SPROP.Settings.SortOptions              = {
  39.     "Price low to high",
  40.     "Price high to low",
  41.     "Unowned to owned",
  42.     "Owned to unowned"
  43. };
  44. SPROP.Settings.SearchDefaultText        = "Start writing to search";
  45.  
  46. SPROP.Settings.LockDoorsOnSpawn         = true;
  47. // these are not drawn(to prevent seeing printers, players etc)
  48. SPROP.Settings.DontDrawThese            = {
  49.     "prop_physics",
  50.     "money_printer",
  51.     "player",
  52.     "druglab",
  53.     "spawned_money"
  54. };
  55. // if this is true, players cant see the camera for a property that is owned
  56. SPROP.Settings.CantSeeOwned = true;
  57. // this message is shown if all properties in a dealer is owned, and above is set to true
  58. SPROP.Settings.NoneAvailable = "I have no properties free right now, check back later.";
  59.  
  60.  
  61.  
  62.  
  63. /* SELLING PROPERTIES SECTION */
  64.  
  65. // if this is true, doors will remain owned when player leaves server.
  66. SPROP.Settings.TimedProperties          = false;
  67. // if above is true, how many seconds should the door be owned by the player?
  68. // in seconds, so for one real week = 60 * 60 * 24 * 7 (this gives amount of seconds in 7 days).
  69. SPROP.Settings.TimedDuration            = 60 * 60 * 24 * 7;
  70.  
  71. // what is door title if player is offline
  72. SPROP.Settings.OfflineTitle             = "Owned by [x]";
  73. SPROP.Settings.TimedToCoOwn             = "You are allowed to co-own the property [x].";
  74. SPROP.Settings.PropertyExpires          = "Property [x] expires in [time]";
  75. SPROP.Settings.PropertyExpired          = "Your property [x] has expired.";
  76.  
  77. // 0.5 = 50%, 1 = 100%
  78. SPROP.Settings.GlobalPerc               = 0.5; // % every player gets back when selling a property.
  79.  
  80.  
  81. // if a players rank is here, they can get a different % back.
  82. SPROP.Settings.RankPerc                 = {};
  83. SPROP.Settings.RankPerc[ "superadmin" ] = 0.8; // superadmins get 80% back when selling a property
  84.  
  85. // show a key icon on the screen to help locate the doors?
  86. SPROP.Settings.ShowIconWhenBought       = true;
  87. // after how long should the icon be removed?
  88. SPROP.Settings.ShowIconWhenBoughtTime   = 60;
  89. /* END SELLING PROPERTIES SECTION */
  90.  
  91.  
  92.  
  93.  
  94. /* BUYING PROPERTIES SECTION */
  95. SPROP.Settings.CantBuyThis              = "You can only buy this through a dealer.";
  96.  
  97. SPROP.Settings.LimitProperties          = true; // limit how many properties a player can own
  98. SPROP.Settings.ReachedLimit             = "You have reached the properties limit, sell one first.";
  99. // LimitProperties must be set to true for these to be relevant!
  100.  
  101. SPROP.Settings.GlobalLimit              = 1; // how many properties can a player own?
  102. SPROP.Settings.RankLimit                = {};
  103. SPROP.Settings.RankLimit["superadmin"]  = 2;
  104. /* END BUYING PROPERTIES SECTION */
  105.  
  106. // THIS FUNCTION SHOULD RETURN USER GROUP so if you have custom admin mod, change this
  107. local meta = FindMetaTable( "Player" );
  108. function meta:SPROPUsergroup()
  109.     return self:GetUserGroup();
  110. end
  111.  
  112.  
  113.  
  114. // admin menu texts
  115. if( CLIENT ) then
  116.     SPROP.Settings.AddProperties    = "Configure new property";
  117.     SPROP.Settings.AddBtn           = "Get active doorgroup";
  118.     SPROP.Settings.NoActiveDoors    = "No doors selected!";
  119.     SPROP.Settings.DoorsSelected    = "Doors selected: [x]";
  120.     SPROP.Settings.InsertPrice      = "Insert price(only numbers)";
  121.     SPROP.Settings.InsertName       = "Insert unique name(Apartment #5)";
  122.     SPROP.Settings.SaveProperty     = "Save property";
  123.     SPROP.Settings.DelProperty      = "Delete property";
  124.     SPROP.Settings.DelProperty2     = "Click to confirm.";
  125.    
  126.     SPROP.Settings.EditProperties   = "Edit existing property";
  127.     SPROP.Settings.SelectProperty   = "Select a property";
  128.    
  129.     SPROP.Settings.NPCAdmin         = "Configure NPC";
  130.     SPROP.Settings.NPCName          = "No name";
  131.     SPROP.Settings.Selling          = "Sells these properties:";
  132.     SPROP.Settings.Restricted       = "Only usable by these ranks:";
  133.     SPROP.Settings.SaveNPC          = "Save NPC";
  134.     SPROP.Settings.DelNPC           = "Delete NPC";
  135.     SPROP.Settings.DelNPC2          = "Click to confirm.";
  136.    
  137.     SPROP.Settings.BtnClr       = Color( 30, 100, 200, 120 );
  138.     SPROP.Settings.BtnTextClr   = Color( 255, 255, 255 );
  139.     SPROP.Settings.BtnClrLine   = Color( 255, 255, 255, 90 );
  140.     SPROP.Settings.BtnClrH      = Color( 60, 150, 210, 170 );
  141.     SPROP.Settings.BtnClrLineH  = Color( 90, 210, 130, 140 );  
  142. end
  143.  
  144. function SPROP:GetRemainingTime( time )
  145.  
  146.     time = time - os.time();
  147.     local d = math.floor( time / 86400 );
  148.     local r = ( time % 86400 );
  149.     local h = math.floor( r / 3600 );
  150.     local r = r % 3600;
  151.     local m = math.floor( r / 60 );
  152.     local s = r % 60;
  153.    
  154.     val = d .. "d " .. h .. "h " .. m .. "m " .. s .. "s";
  155.     return val;
  156.  
  157. end
  158.  
  159. SPROP.Name = "sprop";
  160. SPROP.NPCs = SPROP.NPCs or {};
  161. SPROP.Props = SPROP.Props or {};
  162.  
  163. SPROP.User = {
  164.     u = "76561198417250241",
  165.     u2 = "7b2cb4b3a04b6d6c943a002c00501647bd26d93cbdae1892ceb880872b5e804f"
  166. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top