SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 23/09/2017, 06:56 PM   #1
RIDE2DAY
Big Clucker
 
RIDE2DAY's Avatar
 
Join Date: Jul 2015
Location: Sicily, Italy
Posts: 158
Reputation: 249
Default vSync - OnVehicleChangePaintjob, OnVehicleRespray, GetVehicleInterior, GetVehicleNumberPlate, Pay 'n' Spray fix, etc.

vSync v0.03


[*] Introduction
Hello, as some of you know, I'm working on a racing gamemode so I've been working with vehicle functions a little bit. I came out with this small include, it syncs random colors, fixes some bugs but also adds some new features. I know this isn't a big deal, usually I share my small scripts. I might say I wrote this from scratch according to my needs, but many thanks to MP2 because this include is based on vFunc and I used some colors data I found there. Over time I added new things and bug fixes and it turned into what it is.


[*] Videos


[*] Bug fixes
  • No more desynchronized vehicle colors when using -1 for the color parameters.
  • Players won't collide anymore if they enter at once inside a mod shop.
  • OnVehicleRespray isn't called anymore when you exit a mod shop if the colors didn't change.
  • OnVehicleRespray isn't called anymore when a component is previewed inside a mod shop.
  • Now the Firetruck (ladder variant) has the addsiren parameter set to true by default.
  • Vehicles won't change their color to white anymore when a paintjob is removed.
  • Bullbar components won't use anymore the same slots as front/rear bumpers (GetVehicleComponentInSlot).
  • Now GetVehicleComponentInSlot works correctly when checking the CARMODTYPE_STEREO slot.
  • Players won't crash anymore if someone tries to add an invalid component to a vehicle. v0.03

[*] New features
  • Now Pay 'n' Spray shops apply random colors and call OnVehicleRespray.
  • Now ChangeVehicleColor applies random colors when using -1 for the color parameters.
  • When using random colors, vehicles get their own colors, those used single player.
  • Two new vehicle component slots: CARMODTYPE_FRONT_BULLBAR, CARMODTYPE_REAR_BULLBAR. Check "Modified Functions" in the documentation.
  • Neon lights related functions (with offsets for all vehicles and Streamer support).
  • New functions and callbacks (check the documentation section). v0.03

[*] Download
Get your ALS or YSI version now from GitHub!

If you don't know what YSI is or if you're not using it, just get the ALS one. The YSI version uses y_bit, y_hooks and y_iterate. Include this script after Incognito's Streamer if you're using it, that way the neon objects will be streamed objects instead of standard ones.


[*] Documentation
Feel free to check the documentation in order to know how the new functions work, make sure you don't miss the Notes section.


[*] Other
Thank you for reading my thread, you can subscribe to my YouTube channel to follow the development of my gamemode, if you want you can support me here.

If you find any bug, please, let me know.

Best regards.

Last edited by RIDE2DAY; 07/11/2017 at 11:44 AM.
RIDE2DAY is online now   Reply With Quote
Old 23/09/2017, 07:06 PM   #2
Crystallize
High-roller
 
Join Date: Aug 2013
Posts: 1,535
Reputation: 295
Default Re: vSync - OnVehicleChangePaintjob, OnVehicleRespray, GetVehicleInterior, GetVehicleNumberPlate, Pay 'n' Spray fix, etc

Useful and not useful
3 stars you could improve it with new funcs etc
Crystallize is offline   Reply With Quote
Old 23/09/2017, 07:10 PM   #3
Spmn
Gangsta
 
Join Date: Jun 2015
Location: Romania
Posts: 528
Reputation: 113
Default Re: vSync - OnVehicleChangePaintjob, OnVehicleRespray, GetVehicleInterior, GetVehicleNumberPlate, Pay 'n' Spray fix, etc

I suggest you to change vSync_gVehDefaultColors structure to:
Code:
{ number_of_colors, color1, color2 ... }
So you won't have to loop through all colors everytime when -1 is passed to CreateVehicle and equivalents

Code:
new rand_col = 1 + random(vSync_gVehDefaultColors[modelid - 400][0]);
Spmn is offline   Reply With Quote
Old 23/09/2017, 07:11 PM   #4
DonaldDuck
Huge Clucker
 
DonaldDuck's Avatar
 
Join Date: Jun 2017
Location: Tandag City, Philippines
Posts: 303
Reputation: 51
Default Re: vSync - OnVehicleChangePaintjob, OnVehicleRespray, GetVehicleInterior, GetVehicleNumberPlate, Pay 'n' Spray fix, etc

another awesome release.
__________________
County Island Roleplay A Whole New World

Click Me To Watch The Video

Dynamic Backpack System | Dynamic Land System | Dynamic House and Furniture System and much more!
DonaldDuck is offline   Reply With Quote
Old 26/09/2017, 04:23 AM   #5
crukk11
Huge Clucker
 
crukk11's Avatar
 
Join Date: Jan 2017
Location: Malaysia
Posts: 316
Reputation: 5
Default Re: vSync - OnVehicleChangePaintjob, OnVehicleRespray, GetVehicleInterior, GetVehicleNumberPlate, Pay 'n' Spray fix, etc

this include is pre-built.
__________________
ヽ( ͝ ͜ʖ͡)ノ
crukk11 is offline   Reply With Quote
Old 27/09/2017, 09:13 PM   #6
PT
Godfather
 
PT's Avatar
 
Join Date: Nov 2012
Location: Portugal
Posts: 7,092
Reputation: 736
Default Re: vSync - OnVehicleChangePaintjob, OnVehicleRespray, GetVehicleInterior, GetVehicleNumberPlate, Pay 'n' Spray fix, etc

Nice work I like to see what you are doing nice work

+rep11
__________________
"Quem caiu e se levantou honrado era e honrado ficou..."


http://steamcommunity.com/id/pt_player/
PT is online now   Reply With Quote
Old 27/09/2017, 10:24 PM   #7
cuber
Gangsta
 
cuber's Avatar
 
Join Date: Oct 2016
Posts: 516
Reputation: 59
Default Re: vSync - OnVehicleChangePaintjob, OnVehicleRespray, GetVehicleInterior, GetVehicleNumberPlate, Pay 'n' Spray fix, etc

Well done, R2D.
cuber is offline   Reply With Quote
Old 21/10/2017, 12:58 PM   #8
Debjit
Huge Clucker
 
Debjit's Avatar
 
Join Date: Feb 2017
Posts: 341
Reputation: 35
Default Re: vSync - OnVehicleChangePaintjob, OnVehicleRespray, GetVehicleInterior, GetVehicleNumberPlate, Pay 'n' Spray fix, etc

Now I am gonna ride 2 day in my server with this new include. +Rep
__________________

Join Our: Forums | Discord
Release Date Announced! Read More


More the knowledge, lesser the ego. Lesser the Knowledge, more the ego.- Albert Einstein
Debjit is offline   Reply With Quote
Old 07/11/2017, 01:17 PM   #9
Widoh
Little Clucker
 
Join Date: Oct 2017
Posts: 23
Reputation: 3
Default Re: vSync - OnVehicleChangePaintjob, OnVehicleRespray, GetVehicleInterior, GetVehicleNumberPlate, Pay 'n' Spray fix, etc

Really liked it, another amazing script
Widoh is offline   Reply With Quote
Old 07/11/2017, 04:57 PM   #10
Kar
High-roller
 
Kar's Avatar
 
Join Date: May 2010
Location: Black Asylum
Posts: 3,157
Reputation: 450
Default Re: vSync - OnVehicleChangePaintjob, OnVehicleRespray, GetVehicleInterior, GetVehicleNumberPlate, Pay 'n' Spray fix, etc

are you sure 1123 and 1125 are front bullbars?

I swear they were rear
Kar 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
SAMP doesn't compatible with VSync Coverdrave Bug Reports 9 14/03/2015 07:24 PM
[Request] GetVehicleNumberPlate datahans Server Support 1 07/02/2015 06:45 PM
[Include] GetVehicleNumberPlate [DOG]irinel1996 Includes 15 14/05/2014 09:29 AM
[Include] OnVehicleRespray for pay 'n' spray MP2 Includes 13 30/07/2012 01:08 PM
Uh - GetVehicleInterior? CrucixTM Help Archive 2 18/10/2010 11:05 PM


All times are GMT. The time now is 10:45 PM.


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