04.12.2017, 17:09
(
Last edited by BeckzyBoi; 08/12/2017 at 02:20 PM.
)
Most of you know already that removing garage doors and re-adding them at the same position will cause your game to crash. SA-MP 0.3.8 brings AddSimpleModel. You can use AddSimpleModel to duplicate the doors then add them, and it won't crash your game! This post shows you how you can disable mod shops, PayNSprays, and bomb shops (I'll probably add other garages in the future). Unfortunately the LV bomb shop doors aren't solid and would need editing to fix that; however the LS bomb shop door is identical in size & texture to the LV bomb shop doors - so we'll be using the LS bomb shop door to close the LV bomb shops as well (you would never notice the difference anyway). Also note that El Quebrados PayNSpray and Fort Carson PayNSpray use the same object ("cxf_spraydoor1.dff", "cxrf_payspray.txd") so it only needs to be added once.
OnPlayerConnect
OnGameModeInit
I've attached all the required files and textures in a ZIP, which you'll need to extract to your models folder (wherever that may be).
If you're interested in editing the original LV bomb shop doors their names are "vgwbom1" and "vgwbom2" with TXD "vgnretail3"; however I genuinely wouldn't bother if I were you as the LS bomb shop door is identical in every way other than it is solid!
This method of closing doors can be used for any garage in the game - safe garages, burglary garages, you name it.. All you have to do is remove the original doors with RemoveBuildingForPlayer, find the DFF and TXD file (probably in gta3.img) , use AddSimpleModel to create a replica, and bob's your uncle.
OnPlayerConnect
Code:
// mod shops RemoveBuildingForPlayer(playerid, 5340, 2644.8594, -2039.2344, 14.0391, 1.0); RemoveBuildingForPlayer(playerid, 5779, 1041.3516, -1025.9297, 32.6719, 1.0); RemoveBuildingForPlayer(playerid, 10575, -2716.3516, 217.4766, 5.3828, 1.0); RemoveBuildingForPlayer(playerid, 11313, -1935.8594, 239.5313, 35.3516, 1.0); RemoveBuildingForPlayer(playerid, 9093, 2386.6563, 1043.6016, 11.5938, 1.0); // pay n sprays RemoveBuildingForPlayer(playerid, 5422, 2071.4766, -1831.4219, 14.5625, 1.0); RemoveBuildingForPlayer(playerid, 5856, 1024.9844, -1029.3516, 33.1953, 1.0); RemoveBuildingForPlayer(playerid, 6400, 488.2813, -1734.6953, 12.3906, 1.0); RemoveBuildingForPlayer(playerid, 11319, -1904.5313, 277.8984, 42.9531, 1.0); RemoveBuildingForPlayer(playerid, 9625, -2425.7266, 1027.9922, 52.2813, 1.0); RemoveBuildingForPlayer(playerid, 7891, 1968.7422, 2162.4922, 12.0938, 1.0); RemoveBuildingForPlayer(playerid, 13028, 720.0156, -462.5234, 16.8594, 1.0); RemoveBuildingForPlayer(playerid, 3294, -1420.5469, 2591.1563, 57.7422, 1.0); RemoveBuildingForPlayer(playerid, 3294, -100.0000, 1111.4141, 21.6406, 1.0); // bomb shops RemoveBuildingForPlayer(playerid, 5043, 1843.3672, -1856.3203, 13.8750, 1.0); RemoveBuildingForPlayer(playerid, 7707, 2006.0000, 2317.6016, 11.3125, 1.0); RemoveBuildingForPlayer(playerid, 7709, 2006.0000, 2303.7266, 11.3125, 1.0);
Code:
// mod shops AddSimpleModel(-1, 5340, -1001, "modlas2.dff", "lasground2_las2.txd"); AddSimpleModel(-1, 5779, -1002, "garagdoor1_lawn.dff", "garaged_lawn.txd"); AddSimpleModel(-1, 10575, -1003, "modshopdoor1_sfs.dff", "subshops_sfs.txd"); AddSimpleModel(-1, 11313, -1004, "modshopdoor_sfse.dff", "carshow_sfse.txd"); AddSimpleModel(-1, 9093, -1005, "cmdgrgdoor_lvs.dff", "vgselckupgrgdr.txd"); CreateObject(-1001, 2644.8594, -2039.2344, 14.0391, 0.0, 0.0, 270.0); CreateObject(-1002, 1041.3516, -1025.9297, 32.6719, 0.0, 0.0, 90.0); CreateObject(-1003, -2716.3516, 217.4766, 5.3828, 0.0, 0.0, 0.0); CreateObject(-1004, -1935.8594, 239.5313, 35.3516, 0.0, 0.0, 0.0); CreateObject(-1005, 2386.6563, 1043.6016, 11.5938, 0.0, 0.0, 90.0); // pay n sprays AddSimpleModel(-1, 5422, -1006, "laespraydoor1.dff", "idlewood6_lae.txd"); AddSimpleModel(-1, 5856, -1007, "lawnspraydoor1.dff", "garag3_lawn.txd"); AddSimpleModel(-1, 6400, -1008, "spraydoor_law2.dff", "beafron2_law2.txd"); AddSimpleModel(-1, 11319, -1009, "sprayshpdr2_sfse.dff", "carshow_sfse.txd"); AddSimpleModel(-1, 9625, -1010, "spdr_sfw.dff", "garage_sfw.txd"); AddSimpleModel(-1, 7891, -1011, "vgwspry1.dff", "vegasbuild.txd"); AddSimpleModel(-1, 13028, -1012, "ce_spraydoor1.dff", "ce_payspray.txd"); AddSimpleModel(-1, 3294, -1013, "cxf_spraydoor1.dff", "cxrf_payspray.txd"); CreateObject(-1006, 2071.4766, -1831.4219, 14.5625, 0.0, 0.0, 0.0); CreateObject(-1007, 1024.9844, -1029.3516, 33.1953, 0.0, 0.0, 90.0); CreateObject(-1008, 488.2813, -1734.6953, 12.3906, 0.0, 0.0, 90.0); CreateObject(-1009, -1904.5313, 277.8984, 42.9531, 0.0, 0.0, 0.0); CreateObject(-1010, -2425.7266, 1027.9922, 52.2813, 0.0, 0.0, 90.0); CreateObject(-1011, 1968.7422, 2162.4922, 12.0938, 0.0, 0.0, 0.0); CreateObject(-1012, 720.0156, -462.5234, 16.8594, 0.0, 0.0, 90.0); CreateObject(-1013, -1420.5469, 2591.1563, 57.7422, 0.0, 0.0, 90.0); CreateObject(-1013, -100.0000, 1111.4141, 21.6406, 0.0, 0.0, 270.0); // bomb shops AddSimpleModel(-1, 5043, -1014, "bombdoor_las.dff", "shopliquor_las.txd"); CreateObject(-1014, 1843.3672, -1856.3203, 13.8750, 0.0, 0.0, 0.0); CreateObject(-1014, 2006.0000, 2317.6016, 11.3125, 0.0, 0.0, 270.0); CreateObject(-1014, 2006.0000, 2303.7266, 11.3125, 0.0, 0.0, 90.0);
If you're interested in editing the original LV bomb shop doors their names are "vgwbom1" and "vgwbom2" with TXD "vgnretail3"; however I genuinely wouldn't bother if I were you as the LS bomb shop door is identical in every way other than it is solid!
This method of closing doors can be used for any garage in the game - safe garages, burglary garages, you name it.. All you have to do is remove the original doors with RemoveBuildingForPlayer, find the DFF and TXD file (probably in gta3.img) , use AddSimpleModel to create a replica, and bob's your uncle.