News:

Our server address - 51.178.185.229:7777

Main Menu

 


beckzy's mod shops filterscript

bmodshop.pwn

Filesize: 114.7kB  Views: (359)  Downloads (11)  Last Download: Mar 03, 2023, 06:37 AM 
Previous Download | Next Download
Description: beckzy's mod shops filterscript - beckzy - 02.04.2020

This is a filterscript for server side mod shops. It requires Incognito's streamer plugin for the use of dynamic checkpoints. There are pros and cons to using scripted mod shops:

Pros:
- Most land vehicles can be modded
- Front/rear bumpers AND front/rear bullbars can be applied together
- All wheels are listed for all moddable vehicles
- You can change the paintjob of Camper
- OnVehicleRespray2, OnVehiclePaintjob2, and OnVehicleMod2 are used. OnVehicleRespray2 isn't called when you view a component or when you leave a mod shop (unlike OnVehicleRespray) , and OnVehiclePaintjob2 isn't called when you view a paintjob (unlike OnVehiclePaintjob)
- As all valid components are stored for each vehicle model, OnVehicleMod filters out any invalid components added through hacks

Cons:
- You can't choose the vehicle color, though you can still Respray the vehicle to the next default color

Notes:
- OnVehicleRespray2, OnVehiclePaintjob2, and OnVehicleMod2 are called through all scripts
- You might want to move the following into an include if you're restoring paintjobs/components in other scripts:
Code:

new vpaintjob[MAX_VEHICLES] = {3, ...};
new vcompids[MAX_VEHICLES][MAX_COMPONENT_TYPES];

as well as AddVehicleComponent2, RemoveVehicleComponent2, and the vehiclemodinfo array.

- When destroying a vehicle (DestroyVehicle) you should reset the paintjob/components. Example:
Code:

vpaintjob[vehicleid-1] = 3;

for (new c = 0; c < MAX_COMPONENT_TYPES; c++)
{
   vcompids[vehicleid-1][c] = 0;
}

Edit - 03/04/2020:

- Fixed Dumper being allowed in Transfender (it isn't moddable)
- Fixed invalid components not being filtered on aircraft and trailers

Edit2 - 03/04/2020:

- Fixed entering Loco Low Co and Wheel Arch Angels setting the wrong mod shop ID

Edit - 25/04/2020:

- When the mod shop menu is destroyed pmodshopmenu is set to Menu:INVALID_MENU instead of Menu:0
- Sound ID 1055 "SOUND_SHOP_BUY_DENIED" is played with the "You don't have enough money to buy this item." text when you try to respray, buy a paint job, or buy a component without enough money
- Added a second text draw displaying "You have already bought this item!" if you try to select a one type component that you've already bought (e.g. Hydraulics) . Sound ID 1055 "SOUND_SHOP_BUY_DENIED" will also be played when this text shows

Video (thanks Deadsh0ty) - https://www.youtube.com/watch?v=VZQgn5SkWo4

Posted by: beckzy Sep 11, 2022, 09:28 PM

Rating: This download has not been rated yet.
Share


Comments (0)



Powered by EzPortal