SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 02/04/2020, 10:56 PM   #1
beckzy
Beta Tester
 
Join Date: Dec 2006
Posts: 1,275
Reputation: 168
Default beckzy's mod shops

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

Download - click
__________________

Last edited by beckzy; 25/04/2020 at 08:05 PM.
beckzy is online now   Reply With Quote
Old 03/04/2020, 12:00 AM   #2
SonnyGamer
Huge Clucker
 
SonnyGamer's Avatar
 
Join Date: Jun 2017
Location: Finland
Posts: 324
Reputation: 85
Default Re: beckzy's mod shops

Nice filterscript,
I downloaded it.
__________________
Discord: SonnyGamer#6603
Server Discord: https://discord.com/invite/AQNA4ka
SonnyGamer is offline   Reply With Quote
Old 03/04/2020, 01:14 AM   #3
l0gic
Big Clucker
 
Join Date: Aug 2019
Posts: 155
Reputation: 20
Default Re: beckzy's mod shops

////
__________________
Coding experience with: PAWN, Java, Python, Javascript, PHP and SQL for about 6 years.
If I helped you, any reputation would be appreciated.
l0gic is offline   Reply With Quote
Old 03/04/2020, 03:26 AM   #4
Chaprnks
Gangsta
 
Chaprnks's Avatar
 
Join Date: Sep 2007
Location: Soviet America
Posts: 598
Reputation: 69
Default Re: beckzy's mod shops

I like the script, but I just noticed one major flaw: AFAIK, Kalcor removed CreateMenu function from SA-MP recently.. I remember reading a reply in Everything & Nothing about how its rarely used on servers or something.
__________________
Chaprnks is offline   Reply With Quote
Old 03/04/2020, 06:26 AM   #5
beckzy
Beta Tester
 
Join Date: Dec 2006
Posts: 1,275
Reputation: 168
Default Re: beckzy's mod shops

Quote:
Originally Posted by Chaprnks View Post
I like the script, but I just noticed one major flaw: AFAIK, Kalcor removed CreateMenu function from SA-MP recently.. I remember reading a reply in Everything & Nothing about how its rarely used on servers or something.
CreateMenu was patched, not removed. It still exists.

Edit - 03/04/2020:

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

Last edited by beckzy; 03/04/2020 at 10:34 AM.
beckzy is online now   Reply With Quote
Old 03/04/2020, 05:20 PM   #6
Fairuz
Huge Clucker
 
Fairuz's Avatar
 
Join Date: Sep 2015
Location: Indonesia
Posts: 443
Reputation: 64
Default Re: beckzy's mod shops

Github?
Fairuz is online now   Reply With Quote
Old 03/04/2020, 06:53 PM   #7
Mobtiesgangsa
Big Clucker
 
Mobtiesgangsa's Avatar
 
Join Date: Oct 2016
Location: The Strip
Posts: 155
Reputation: 16
Default Re: beckzy's mod shops

one question! do you have a menu editor?
__________________
WARNING IM NOT HERE
Mobtiesgangsa is offline   Reply With Quote
Old 03/04/2020, 07:25 PM   #8
beckzy
Beta Tester
 
Join Date: Dec 2006
Posts: 1,275
Reputation: 168
Default Re: beckzy's mod shops

Quote:
Originally Posted by Dice_ View Post
Github?
It's 1 file lol.

Quote:
Originally Posted by Mobtiesgangsa View Post
one question! do you have a menu editor?
No sorry. I got the menu info from main.scm to make them identical to the default mod shops.
__________________
beckzy is online now   Reply With Quote
Old 03/04/2020, 08:34 PM   #9
Symon
Gangsta
 
Symon's Avatar
 
Join Date: Apr 2019
Location: Italy
Posts: 910
Reputation: 89
Default Re: beckzy's mod shops

I don't know if this is a bug but when selecting an option from Wheel Arch Angels (tried that modshop only), such as Respray or Exaust or anything in that menu, the interior is not visible anymore aswell the vehicle. (Blank screen)

But the menu is still visibile.
Symon is offline   Reply With Quote
Old 03/04/2020, 08:57 PM   #10
beckzy
Beta Tester
 
Join Date: Dec 2006
Posts: 1,275
Reputation: 168
Default Re: beckzy's mod shops

Quote:
Originally Posted by Symon View Post
I don't know if this is a bug but when selecting an option from Wheel Arch Angels (tried that modshop only), such as Respray or Exaust or anything in that menu, the interior is not visible anymore aswell the vehicle. (Blank screen)

But the menu is still visibile.
It's fixed now, please re-download. Thanks for reporting.

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

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
__________________

Last edited by beckzy; 25/04/2020 at 08:05 PM.
beckzy is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add shops in CnR Huzaif Scripting Help 4 23/03/2019 05:25 PM
[Map] Musical shops and car shops BanhVo Maps 1 23/11/2017 01:22 PM
[FilterScript] Wheel Shops Riso135 Filterscripts 10 26/12/2011 01:01 PM
Help i want to know how to do shops like 24/7 jonas4334 Help Archive 2 10/04/2010 04:59 PM
[HELP] i need the id of the car shops of ls akis_tze Help Archive 5 19/01/2010 11:21 AM


All times are GMT. The time now is 03:32 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.