SA-MP Forums Archive
Is there a setvehiclecolour command? - 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: Is there a setvehiclecolour command? (/showthread.php?tid=160434)



Is there a setvehiclecolour command? - Jay. - 16.07.2010

Tittle says all

I've seemed to forgot about it, If there is one reply


thanks.


Re: Is there a setvehiclecolour command? - ViruZZzZ_ChiLLL - 16.07.2010

ChangeVehicleColor(vehicleid, color1, color2);


Re: Is there a setvehiclecolour command? - Jay. - 16.07.2010

Quote:
Originally Posted by ViruZZzZ_ChiLLL
Посмотреть сообщение
ChangeVehicleColor(vehicleid, color1, color2);
Thanks...


Re: Is there a setvehiclecolour command? - Joe_ - 16.07.2010

For changing a vehicles colour:

https://sampwiki.blast.hk/wiki/ChangeVehicleColor

And, this may not be relevant to you, but if you're planning on retrieving a colour of a car, it simply will not work.

You will have to make a new vehicle function, filling an array or property / gvar, with the colour arguments.

I use this in my mod.

pawn Код:
stock CreateVehicleEx(modelid, Float:x, Float:y, Float:z, Float:rotation, interior, world, colour1, colour2, respawn)
{
    new vehicleid = CreateVehicle(modelid, x, y, z, rotation, colour1, colour2, respawn);
   
    LinkVehicleToInterior(vehicleid, interior);
    SetVehicleVirtualWorld(vehicleid, world);
   
    SetGVarInt("Colour1", color1, vehicleid);
    SetGVarInt("Colour2", color2, vehicleid);
   
    return vehicleid;
}