[Include] GetVehicleColor - 0.3.7 Update
#1

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(playeridvehicleidispassenger)
{
    new 
color_1color_2string[100];
    
    new 
color GetVehicleColor(vehicleidcolor_1color_2);
    
    
format(stringsizeof(string), "You entering in vehicle %d with color %d and color %d."vehicleidcolor_1color_2);
    
    
SendClientMessage(playerid, -1string);
    
    return 
1;

Download: Pastebin

Remember to put #include "GetVehicleColor" in your input's list.
Reply
#2

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?
Reply
#3

It was obsolete. I updated it.
Reply
#4

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.
Reply
#5

Okay, great work then for people who need this.
Reply
#6

Where is the ALS hooking for ChangeVehicleColor?

Also, if you use CreateVehicle with both colors set to -1, will GetVehicleColor return the correct color?
Reply
#7

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.
Reply
#8

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.
Reply
#9

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.
Reply
#10

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(playeridvehicleidispassenger)
{
    new 
color_1color_2string[100];
    
    new 
color GetVehicleColor(vehicleidcolor_1color_2);
    
    
format(stringsizeof(string), "You entering in vehicle %d with color %d and color %d."vehicleidcolor_1color_2);
    
    
SendClientMessage(playerid, -1string);
    
    return 
1;

Download: Pastebin

Remember to put #include "GetVehicleColor" in your input's list.
Thank you! It worked (i think).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)