SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 23/09/2017, 05:56 PM   #1
RIDE2DAY
Huge Clucker
 
RIDE2DAY's Avatar
 
Join Date: Jul 2015
Location: Modena, Italy
Posts: 219
Reputation: 375
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, if you want to support what I do you might buy me a coffe! Subscribe to my ******* channel if you wish to follow the development of my gamemode.

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

Best regards.

Last edited by RIDE2DAY; 17/12/2017 at 03:18 PM.
RIDE2DAY is offline   Reply With Quote
Old 23/09/2017, 06:06 PM   #2
Crystallize
Banned
 
Join Date: Aug 2013
Posts: 1,595
Reputation: 314
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, 06:10 PM   #3
Spmn
Gangsta
 
Join Date: Jun 2015
Location: Romania
Posts: 540
Reputation: 131
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, 06:11 PM   #4
DonaldDuck
Banned
 
Join Date: Jun 2017
Location: Phillipines
Posts: 361
Reputation: 91
Default Re: vSync - OnVehicleChangePaintjob, OnVehicleRespray, GetVehicleInterior, GetVehicleNumberPlate, Pay 'n' Spray fix, etc

another awesome release.
DonaldDuck is offline   Reply With Quote
Old 26/09/2017, 03:23 AM   #5
crukk11
Huge Clucker
 
crukk11's Avatar
 
Join Date: Jan 2017
Location: Malaysia
Posts: 315
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, 08:13 PM   #6
PT
Godfather
 
PT's Avatar
 
Join Date: Nov 2012
Location: Portugal
Posts: 7,200
Reputation: 775
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..."


CVU vai voltar e.e


http://steamcommunity.com/id/pt_player/
PT is offline   Reply With Quote
Old 27/09/2017, 09:24 PM   #7
cuber
Gangsta
 
cuber's Avatar
 
Join Date: Oct 2016
Location: KS.
Posts: 767
Reputation: 137
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, 11:58 AM   #8
Zeth
Gangsta
 
Zeth's Avatar
 
Join Date: Feb 2017
Location: Titan
Posts: 503
Reputation: 114
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
__________________
server.one-rp.com
Zeth is offline   Reply With Quote
Old 07/11/2017, 12:17 PM   #9
Widoh
Little Clucker
 
Join Date: Oct 2017
Posts: 22
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, 03:57 PM   #10
Kar
High-roller
 
Kar's Avatar
 
Join Date: May 2010
Location: Black Asylum
Posts: 3,184
Reputation: 506
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 offline   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 06:24 PM
[Request] GetVehicleNumberPlate datahans Server Support 1 07/02/2015 05:45 PM
[Include] GetVehicleNumberPlate [DOG]irinel1996 Includes 15 14/05/2014 08:29 AM
[Include] OnVehicleRespray for pay 'n' spray MP2 Includes 13 30/07/2012 12:08 PM
Uh - GetVehicleInterior? CrucixTM Help Archive 2 18/10/2010 10:05 PM


All times are GMT. The time now is 04:42 PM.


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