GetVehicleColor - 0.3.7 Update -
DarkLouis - 04.05.2015
GetVehicleColor - 0.3.7 Update
Hello. This include was written on 2011 (
Here) by Ryder.
Today I updated to 0.3.7 and changed some things.
Function(s):
GetVehicleColor(vehicleid , &color1, &color2)
vehicleid = the id of the vehicle.
color1 = the color number one - must be assigned to a variable.
color2 = the color number two - must be assigned to a variable.
Example:
PHP код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new color_1, color_2, string[100];
new color = GetVehicleColor(vehicleid, color_1, color_2);
format(string, sizeof(string), "You entering in vehicle %d with color %d and color %d.", vehicleid, color_1, color_2);
SendClientMessage(playerid, -1, string);
return 1;
}
Download: Pastebin
Remember to put
#include "GetVehicleColor" in your input's list.
Re: GetVehicleColor - 0.3.7 Update -
Admigo - 04.05.2015
Don't say its a 0.3.7 update while it has nothing to do with sa-mp 0.3.7. Only the siren has been added to the native.
Do you have permission to release this?
Re: GetVehicleColor - 0.3.7 Update -
DarkLouis - 04.05.2015
It was obsolete. I updated it.
Re: GetVehicleColor - 0.3.7 Update -
DarkLouis - 04.05.2015
There're the credits everywhere and the script is outdated but it's very usefull. So if Ryder tell me that I can't release this, I'll remove it.
Re: GetVehicleColor - 0.3.7 Update -
Admigo - 04.05.2015
Okay, great work then for people who need this.
Re: GetVehicleColor - 0.3.7 Update - Emmet_ - 04.05.2015
Where is the ALS hooking for ChangeVehicleColor?
Also, if you use CreateVehicle with both colors set to -1, will GetVehicleColor return the correct color?
Re: GetVehicleColor - 0.3.7 Update -
Puppy - 04.05.2015
Unless that is controlled by the server(which it isn't), I don't think that's possible - the colors are different for EVERYONE every time the vehicle restreams.
Re: GetVehicleColor - 0.3.7 Update - Emmet_ - 04.05.2015
It is possible if you extract the colors from carcols.dat and use that data to obtain the colors. That way, it will sync for all players.
Re: GetVehicleColor - 0.3.7 Update -
MP2 - 05.05.2015
Quote:
Originally Posted by Emmet_
It is possible if you extract the colors from carcols.dat and use that data to obtain the colors. That way, it will sync for all players.
|
I have already done that in my include:
https://sampforum.blast.hk/showthread.php?tid=339088
Don't want to 'shit' on this include, but mine supports GetVehicleColor (with random -1 colours) and a lot more.
Re: GetVehicleColor - 0.3.7 Update -
Hayden_Almeida - 22.01.2016
Quote:
Originally Posted by DarkLouis
GetVehicleColor - 0.3.7 Update
Hello. This include was written on 2011 ( Here) by Ryder.
Today I updated to 0.3.7 and changed some things.
Function(s):
GetVehicleColor(vehicleid , &color1, &color2)
vehicleid = the id of the vehicle.
color1 = the color number one - must be assigned to a variable.
color2 = the color number two - must be assigned to a variable.
Example:
PHP код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new color_1, color_2, string[100];
new color = GetVehicleColor(vehicleid, color_1, color_2);
format(string, sizeof(string), "You entering in vehicle %d with color %d and color %d.", vehicleid, color_1, color_2);
SendClientMessage(playerid, -1, string);
return 1;
}
Download: Pastebin
Remember to put #include "GetVehicleColor" in your input's list.
|
Thank you! It worked (i think).