Author Topic: Restricting the VIP-recovery of huge planes to the airport  (Read 1950 times)

Offline TwCafe

  • Honorable
  • *****
  • Posts: 3285
  • Problems with Chinese language? Feel free to pm me
  • Registered: 18/07/2013
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYears
  • Ingame: TwCafe
  • Squad: Work
Re: Restricting the VIP-recovery of huge planes to the airport
« Reply #30 on: 12 04, 2022, 02:49:04 am »
Quote
I'm wondering what the community thinks of this idea, and if you find this bad, what else can we do to stop them?
To prevent abusing, I'm supporting this idea. I find this the best way.
TAIWAN No.1
08.12.2021 Added as Chinese Translator | 14.02.2022 Add as Discussion Moderator
08.21.2023 Add as Assistant Head State Official | 10.05.2022 Add as Senior Community Member
20.07.2023 Awarded as Honorable
Ex. MI6 Co-FounderEx. DRN_Backup Founder | Ex. DRN Honorable

Offline Dokt0R

  • Donator L3
  • *****
  • Posts: 1458
  • Registered: 18/07/2013
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYears
  • Group: SAS
Re: Restricting the VIP-recovery of huge planes to the airport
« Reply #31 on: 12 04, 2022, 02:51:10 am »
22 P votes. This can be marked as a High Priority.

Offline gq

  • Regular Community Member
  • ***
  • Posts: 647
  • Registered: 12/11/2019
    YearsYearsYearsYears
  • Group: 1O X TheHive
Re: [Brian]Restricting the VIP-recovery of huge planes to the airport
« Reply #32 on: 12 04, 2022, 10:57:00 pm »
This Idea will stop the spawn abusing , positive .

Offline Brian

  • Administrator
  • ******
  • Posts: 3781
  • Registered: 18/12/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: [Arran]Restricting the VIP-recovery of huge planes to the airport
« Reply #33 on: 14 05, 2022, 05:14:17 pm »
So I just realised it's easier if Arran adds this to /recover script:
Code: Lua
  1. local bigPlanes = {[592]=1,[577]=1,[511]=1,[553]=1,[519]=1,}
  2. local airportFields = {
  3.         -- topLeftCornerX, topLeftCornerY, bottomRightCornerX, bottomRightCornerY, minZ
  4.         {1849.9268, -2177.2434, 2105.4604, -2645.4067, 12}, -- LS part 1
  5.         {1364.8882, -2405.4661, 1849.9268, -2645.4067, 12}, -- LS part 2
  6.         {-1755.4451, 110.7408, -1155.4495, -683.6896, 13}, -- SF
  7.         {-166.5637, 2555.2102, 433.8534, 2421.8647, 15}, -- Bone County
  8.         {1337.4885, 1863.3904, 1564.6772, 1702.9753, 10}, -- LV part 1
  9.         {1263.3662, 1697.2644, 1637.2993, 1143.6764, 10}, -- LV part 2 
  10. }
  11.  
  12. local x,y,z = getElementPosition(plr)
  13. local m = getElementModel(veh)
  14. if (bigPlanes[m]) then
  15.         local recoverInAirport = false
  16.         for i, pos in ipairs(airportFields) do
  17.                 if (x > pos[1] and x < pos[3] and y < pos[2] and y > pos[4] and z > pos[5] and z < (pos[5] + 10)) then
  18.                         recoverInAirport = true
  19.                         break
  20.                 end
  21.         end
  22.         if (not recoverInAirport) then
  23.                 exports.CIThelp:opc("You cannot recover a big plane in this area.", plr, 255, 0, 0)
  24.                 return false
  25.         end
  26. end
  27.  
  28.  

I made this code server-side as I guess it's the only way to get recovered element model

Offline Arran

  • Administrator
  • ******
  • Posts: 5619
  • Registered: 20/11/2010
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
  • Ingame: [CIT]Arran
Re: [Arran]Restricting the VIP-recovery of huge planes to the airport
« Reply #34 on: 16 05, 2022, 05:54:42 pm »
- Large planes can now only be recovered at airports. (Ptole + Brian)
Proof You Are so Much More Than What You Realise
Authority is not truth. Truth is authority.