Cars changin collors
#1

Hello!

Of some reason the cars on my server changes colors when you exit a house, if it was blue when enter the house, the car changes to a another color when you exit. and if you see a players car is yellow and drive far away and drive back, the car have change color again. but carhealt and visible damages is still the same. is that i script bug or just a samp bug?

I have carlines like this
Код:
AddStaticVehicleEx(474,2338.3254,2.2864,26.2202,181.3236,-1,-1,900000000); //
-1,-1 is to make random colors, can it be that who bugging? it didnt to like this before.
And the autolock for house cars has stop working. and if you lock your housecar and enter a place, it is unlocked when you get out. And i think if you lock your car and a player join server, your car is unlocked for him. Even that bug i didnt have before
I think the car color changing makes the locking to bug? (when it change color it unlocks the lock).
Reply
#2

It's not realy a bug, only if you like to call it one

The vehicle's change color when they stream in.

So I'm thinking, to solve this... save the colors onvehiclespawn and load them onvehiclestreamin or so

Hope it can help you or others to solve this...

PS: just some quick thinking


Grts Riz
Reply
#3

Quote:
Originally Posted by Rizard
It's not realy a bug, only if you like to call it one

The vehicle's change color when they stream in.

So I'm thinking, to solve this... save the colors onvehiclespawn and load them onvehiclestreamin or so

Hope it can help you or others to solve this...

PS: just some quick thinking


Grts Riz
Thanks for your answer
i dont know how to make onvehiclespawn or onvehiclestreamin. And i had not this problem before, it just came of it self :S
Reply
#4

OnVehicleSpawn and OnVehicleStreamIn should be in your script already.

example (i think)
pawn Код:
new color1, color2;

OnVehicleSpawn()
{
  GetVehicleColor(vehicleid,color1,color2); (not a standart native, look it up)
}

OnVehicleStreamIn()
{
  SetVehicleColor(vehicleid,color1,color2); (same as above)
}
Kinda replying here cause we can use a more experienced scripter or debugger, just because there might be an easier solution.

Grts Riz
Reply
#5

Quote:
Originally Posted by Rizard
OnVehicleSpawn and OnVehicleStreamIn should be in your script already.

example (i think)
pawn Код:
new color1, color2;

OnVehicleSpawn()
{
  GetVehicleColor(vehicleid,color1,color2); (not a standart native, look it up)
}

OnVehicleStreamIn()
{
  SetVehicleColor(vehicleid,color1,color2); (same as above)
}
Kinda replying here cause we can use a more experienced scripter or debugger, just because there might be an easier solution.

Grts Riz
I have OnVehicleSpawn, and there i only have (never had more then that there)
Код:
  VehGas[vehicleid] = 100;
and i do not have OnVehicleStreamIn and i have never ever had it, so that means that is not the problem
Reply
#6

not looking for a problem...

I'm looking for a way to fix your problem.

if the OnVehicleStreamIn isn't there.... then you should download a new version of sa-mp server at sa-mp.com

Riz
Reply
#7

Quote:
Originally Posted by Rizard
not looking for a problem...

I'm looking for a way to fix your problem.

if the OnVehicleStreamIn isn't there.... then you should download a new version of sa-mp server at sa-mp.com

Riz
ah ok! i already have the R4 and announce, samp-server
But its weird that i never had this problem before

I have made som tests. the colors only changes when you get far away from a vehicle. Its not because you enter a interior or so, just because you got far away and the cars "respawns" in fron of you with a new color. How can i fix that? but what i can understand it must be samp who does that and not the script?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)