SA-MP Forums Archive
Car Color - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Car Color (/showthread.php?tid=112403)



Car Color - xivo - 07.12.2009

Hey i have Scripted that the Color from the cars changes, but the Colors not changes ?

Why i have at OnGameModeInit();

Код:
ChangeVehicleColor(GS1, 16, 16);
ChangeVehicleColor(GS2, 16, 16);
ChangeVehicleColor(GS3, 16, 16);
ChangeVehicleColor(GS4, 16, 16);
ChangeVehicleColor(GS5, 16, 16);
ChangeVehicleColor(GS6, 16, 16);
ChangeVehicleColor(B1, 5, 5);
ChangeVehicleColor(B2, 5, 5);
ChangeVehicleColor(B3, 5, 5);
ChangeVehicleColor(B4, 5, 5);
ChangeVehicleColor(B5, 5, 5);
ChangeVehicleColor(B6, 5, 5);
ChangeVehicleColor(B7, 5, 5);
ChangeVehicleColor(LC1, 1, 1);
ChangeVehicleColor(LC2, 1, 1);
ChangeVehicleColor(LC3, 1, 1);
ChangeVehicleColor(LC4, 1, 1);
ChangeVehicleColor(LC5, 1, 1);
ChangeVehicleColor(LC6, 1, 1);
ChangeVehicleColor(FS1, 1, 1);
ChangeVehicleColor(FS2, 1, 1);
ChangeVehicleColor(FS3, 1, 1);
ChangeVehicleColor(FS4, 1, 1);
ChangeVehicleColor(FS5, 1, 1);
ChangeVehicleColor(FS6, 1, 1);
ChangeVehicleColor(FS7, 1, 1);
ChangeVehicleColor(FS8, 1, 1);
ChangeVehicleColor(FS9, 1, 1);
ChangeVehicleColor(MEC1, 120, 120);
ChangeVehicleColor(MEC2, 120, 120);
ChangeVehicleColor(MEC3, 120, 120);
ChangeVehicleColor(MEC4, 120, 120);
ChangeVehicleColor(MEC5, 120, 120);
ChangeVehicleColor(HI1, 0, 0);
ChangeVehicleColor(HI2, 0, 0);
ChangeVehicleColor(HI3, 0, 0);
ChangeVehicleColor(HI4, 0, 0);
ChangeVehicleColor(HI5, 0, 0);
ChangeVehicleColor(HI6, 0, 0);
ChangeVehicleColor(HI7, 0, 0);



Re: Car Color - DJDhan - 07.12.2009

Well what are all those things you got in place of vehicle id?


Re: Car Color - xivo - 07.12.2009

That are The names

Код:
GS1 = AddStaticVehicle(536,2517.0540,-1672.1954,13.7488,62.9242,12,1);
GS2 = AddStaticVehicle(536,2499.7712,-1649.6044,13.2829,160.4286,26,96);
GS3 = AddStaticVehicle(536,2508.3794,-1665.8622,13.1410,13.2325,30,96);
GS4 = AddStaticVehicle(521,2480.4185,-1654.0763,12.8788,86.4936,75,13);
GS5 = AddStaticVehicle(521,2507.0122,-1677.3806,12.9509,144.4145,87,118);
GS6 = AddStaticVehicle(521,2482.7126,-1683.4697,12.9008,74.7863,92,3);
Код:
ChangeVehicleColor(GS1, 16, 16);
ChangeVehicleColor(GS2, 16, 16);
ChangeVehicleColor(GS3, 16, 16);
ChangeVehicleColor(GS4, 16, 16);
ChangeVehicleColor(GS5, 16, 16);
ChangeVehicleColor(GS6, 16, 16);



Re: Car Color - Joe Staff - 07.12.2009

AddStaticVehicle doesn't return an ID. You'd have to use CreateVehicle.


Re: Car Color - DJDhan - 08.12.2009

Yeah use Create Vehicle.

GS1=CreateVehicle(vehicletype, Float, Float:y, Float:z, Float:rotation, color1, color2, respawn_time);
:P



Re: Car Color - beckzy - 08.12.2009

Quote:
Originally Posted by Joe Staff
AddStaticVehicle doesn't return an ID. You'd have to use CreateVehicle.
Yes it does...


Re: Car Color - Joe Staff - 08.12.2009

a Quote from Wiki - AddStaticVehicle
Quote:

This function does not return a specific value, it's best to simply ignore it.




Re: Car Color - Malice - 08.12.2009

If you are going to set the vehicle colors OnGameModeInit why not do it upon creation?


Re: Car Color - xivo - 12.12.2009

Yeah but then i Become this Error !

Код:
PD1 = CreateVehicle(427,1528.9906,-1683.8423,6.0226,271.4195,0,1);
Код:
warning 202: number of arguments does not match definition



Re: Car Color - dice7 - 12.12.2009

It does return the id. The wiki is wrong