SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 07/11/2017, 05:37 PM   #11
RIDE2DAY
Big Clucker
 
RIDE2DAY's Avatar
 
Join Date: Jul 2015
Location: Sicily, Italy
Posts: 147
Reputation: 244
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 online now   Reply With Quote
Old 07/11/2017, 08:26 PM   #12
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Ottawa, Canada
Posts: 1,689
Reputation: 671
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 online now   Reply With Quote
Old 07/11/2017, 09:16 PM   #13
Kar
High-roller
 
Kar's Avatar
 
Join Date: May 2010
Location: Black Asylum
Posts: 3,152
Reputation: 450
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, 11:12 PM   #14
RIDE2DAY
Big Clucker
 
RIDE2DAY's Avatar
 
Join Date: Jul 2015
Location: Sicily, Italy
Posts: 147
Reputation: 244
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 online now   Reply With Quote
Old 08/11/2017, 11:32 AM   #15
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Ottawa, Canada
Posts: 1,689
Reputation: 671
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 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 02:22 AM.


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