SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 07/11/2017, 04:37 PM   #11
RIDE2DAY
Huge Clucker
 
RIDE2DAY's Avatar
 
Join Date: Jul 2015
Location: Modena, Italy
Posts: 219
Reputation: 362
Default Re: vSync - OnVehicleChangePaintjob, OnVehicleRespray, GetVehicleInterior, GetVehicleNumberPlate, Pay 'n' Spray fix, etc

Quote:
Originally Posted by Kar View Post
are you sure 1123 and 1125 are front bullbars?

I swear they were rear
Nice find, yes, 1125 affects the back side also. Even so, Remington's bullbars use the same "GTA slot", so we can't use two of those three components (1100, 1123, 1125) at once. For example, if 1125 is installed and we add 1100 the 1125 one would be removed automatically, that's just how GTA works.

In my opinion, in terms of programming, it wouldn't make too much sense to add 1125 to both slots (front and rear) because they would store the same component. And the rear slot should be cleared also whenever the front fullbar changes, just unuseful code in my opinion.
RIDE2DAY is offline   Reply With Quote
Old 07/11/2017, 07:26 PM   #12
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Canada
Posts: 1,723
Reputation: 780
Default Re: vSync - OnVehicleChangePaintjob, OnVehicleRespray, GetVehicleInterior, GetVehicleNumberPlate, Pay 'n' Spray fix, etc

GetVehicleWeihht should be GetVehicleMass because weight is dynamic (mass + passengers weight).

Quote:
from samp wiki (OnVehicleRespray)

Watch out, the name is ambiguous, Pay 'n' Spray shops don't call this callback.
You have to implement a detection method for this, probably under OnPlayerUpdate. I did this in vehicleplus.inc if i am not mistaken.
__________________
Gammix is offline   Reply With Quote
Old 07/11/2017, 08:16 PM   #13
Kar
High-roller
 
Kar's Avatar
 
Join Date: May 2010
Location: Black Asylum
Posts: 3,199
Reputation: 494
Default Re: vSync - OnVehicleChangePaintjob, OnVehicleRespray, GetVehicleInterior, GetVehicleNumberPlate, Pay 'n' Spray fix, etc

Quote:
Originally Posted by RIDE2DAY View Post
Nice find, yes, 1125 affects the back side also. Even so, Remington's bullbars use the same "GTA slot", so we can't use two of those three components (1100, 1123, 1125) at once. For example, if 1125 is installed and we add 1100 the 1125 one would be removed automatically, that's just how GTA works.

In my opinion, in terms of programming, it wouldn't make too much sense to add 1125 to both slots (front and rear) because they would store the same component. And the rear slot should be cleared also whenever the front fullbar changes, just unuseful code in my opinion.
Well we found the issues and sorted it.

Great stuff to know.
Kar is offline   Reply With Quote
Old 07/11/2017, 10:12 PM   #14
RIDE2DAY
Huge Clucker
 
RIDE2DAY's Avatar
 
Join Date: Jul 2015
Location: Modena, Italy
Posts: 219
Reputation: 362
Default Re: vSync - OnVehicleChangePaintjob, OnVehicleRespray, GetVehicleInterior, GetVehicleNumberPlate, Pay 'n' Spray fix, etc

Quote:
Originally Posted by Gammix View Post
GetVehicleWeihht should be GetVehicleMass because weight is dynamic (mass + passengers weight).


You have to implement a detection method for this, probably under OnPlayerUpdate. I did this in vehicleplus.inc if i am not mistaken.
You're totally right about the weight issue, I'm going to change it. The funny fact is that I used "mass" as variable name! On the other hand, this include calls OnVehicleRespray when Pay 'n' Spray shops are used and applies random colors also.

Thanks for pointing that out.
RIDE2DAY is offline   Reply With Quote
Old 08/11/2017, 10:32 AM   #15
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Canada
Posts: 1,723
Reputation: 780
Default Re: vSync - OnVehicleChangePaintjob, OnVehicleRespray, GetVehicleInterior, GetVehicleNumberPlate, Pay 'n' Spray fix, etc

Quote:
Originally Posted by RIDE2DAY View Post
You're totally right about the weight issue, I'm going to change it. The funny fact is that I used "mass" as variable name! On the other hand, this include calls OnVehicleRespray when Pay 'n' Spray shops are used and applies random colors also.

Thanks for pointing that out.
Oh i see it now, you had the OnPlayerUpdate part for OnVehicleRespray already. I use my phone most of the time when i am at work so yeah, i missed that part lol!


EDIT: Another thing, instead of using "CallLocalFunction", call the function directly in case of custom functions, since defualt samp ones like "OnVehicleRespray" are declared no matter you define them (public) or not.

Example:
PHP Code:
// replace this
CallLocalFunction("OnVehicleCreated""i"vehicleid);

// to
#if defined OnVehicleCreated
    
OnVehicleCreated(vehicleid);
#endif

// and for decleration
#if defined OnVehicleCreated
    
forward OnVehicleCreated(vehicleid);
#endif 
__________________
Gammix is offline   Reply With Quote
Old 25/12/2017, 03:52 PM   #16
rfr
Banned
 
Join Date: Nov 2017
Posts: 309
Reputation: 43
Default Re: vSync - OnVehicleChangePaintjob, OnVehicleRespray, GetVehicleInterior, GetVehicleNumberPlate, Pay 'n' Spray fix, etc

wow cool
rfr is offline   Reply With Quote
Old 25/12/2017, 06:10 PM   #17
Florin48
Little Clucker
 
Join Date: Nov 2015
Posts: 21
Reputation: 1
Default Re: vSync - OnVehicleChangePaintjob, OnVehicleRespray, GetVehicleInterior, GetVehicleNumberPlate, Pay 'n' Spray fix, etc

Frumoasa melodia din video
Florin48 is offline   Reply With Quote
Old 13/02/2018, 09:21 AM   #18
~Error
Big Clucker
 
~Error's Avatar
 
Join Date: Nov 2011
Location: Kongeriket Norge
Posts: 79
Reputation: 5
Default Re: vSync - OnVehicleChangePaintjob, OnVehicleRespray, GetVehicleInterior, GetVehicleNumberPlate, Pay 'n' Spray fix, etc

There is expression bug in AddVehicleComponent


fix it =)
__________________
Viva La PAWN!
~Error is offline   Reply With Quote
Old 13/02/2018, 01:23 PM   #19
RIDE2DAY
Huge Clucker
 
RIDE2DAY's Avatar
 
Join Date: Jul 2015
Location: Modena, Italy
Posts: 219
Reputation: 362
Default Re: vSync - OnVehicleChangePaintjob, OnVehicleRespray, GetVehicleInterior, GetVehicleNumberPlate, Pay 'n' Spray fix, etc

@~Error: thank you for reporting that, fixed.
RIDE2DAY 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 11:37 AM.


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