SA-MP Forums Archive
How do i see the Vehicle Colors? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How do i see the Vehicle Colors? (/showthread.php?tid=578067)



How do i see the Vehicle Colors? - Kypros - 16.06.2015

PHP код:
CreateStaticVehicle(VEHICLE_TYPE_LAW_ENFOREMENT,4902251.6560052443.16699210.9476270.281860, -1, -1); 
How do I see in this code the vehicle color?


Re: How do i see the Vehicle Colors? - bgedition - 16.06.2015

Can you show us the code for CreateStaticVehicle


Re: How do i see the Vehicle Colors? - RajatPawar - 16.06.2015

I'm pretty sure that's AddStaticVehicle. Even if it's a modified version, I guess that the last two parameters (-1 and -1) are the two colors. -1 will randomize them. (Color IDs)


Re: How do i see the Vehicle Colors? - Kypros - 16.06.2015

well I found this:


PHP код:
stock CreateStaticVehicle(type,modelid,Float:X,Float:Y,Float:Z,Float:A,ColorOne,ColorTwo)
{
    
CurrentVehicleId ++;
    if (
CurrentVehicleId MAX_VEHICLES)
    {
        
printf("Too Many Vehicleid's Ignoring Vehicleid %d",CurrentVehicleId);
        return 
1;
    }
    new 
string[256];
    
AddStaticVehicleEx(modelid,X,Y,Z,A,ColorOne,ColorTwo,300);
    
CarInfo[CurrentVehicleId][cType] = type;
    
CarInfo[CurrentVehicleId][cModel] = modelid;
    
CarInfo[CurrentVehicleId][cLocationX] = X;
    
CarInfo[CurrentVehicleId][cLocationY] = Y;
    
CarInfo[CurrentVehicleId][cLocationZ] = Z;
    
CarInfo[CurrentVehicleId][cLocationA] = A;
    
CarInfo[CurrentVehicleId][cColorOne] = ColorOne;
    
CarInfo[CurrentVehicleId][cColorTwo] = ColorTwo;
    
CarInfo[CurrentVehicleId][cLocationI] = 0;
    
CarInfo[CurrentVehicleId][cLocationW] = 0;
    
format(stringsizeof(string), "Not Owned");
    
strmid(CarInfo[CurrentVehicleId][cOwner], string0strlen(string), 256);
    
CarInfo[CurrentVehicleId][cOwned] = -1;
    
CarInfo[CurrentVehicleId][cLock] = 0;
    
CarInfo[CurrentVehicleId][cValue] = 0;
    
CarInfo[CurrentVehicleId][cSellable] = 0;
    
CarInfo[CurrentVehicleId][cSold] = 0;
    
CarInfo[CurrentVehicleId][cSpawnTime] = 0;
    return 
1;

Does this show the color?


Re: How do i see the Vehicle Colors? - bgedition - 16.06.2015

As RajatPawar the last two parameters are the colors. And what are you meaning with this 'show color'?


Re: How do i see the Vehicle Colors? - Kypros - 16.06.2015

Well does this shows the place which creates the vehicle color.


Re: How do i see the Vehicle Colors? - bgedition - 16.06.2015

Yep bro.


Re: How do i see the Vehicle Colors? - Kypros - 16.06.2015

Well can you mark me the place which shows which colors are on the cars?


Re: How do i see the Vehicle Colors? - DarkLored - 16.06.2015

its in this this line
look at ColorOne and ColorTwo
AddStaticVehicleEx(modelid,X,Y,Z,A,ColorOne,ColorT wo,300);


Re: How do i see the Vehicle Colors? - Kypros - 16.06.2015

Kk,
but which color is ColorOne, ColorTwo?