SA-MP Forums Archive
[HELP] getting vehicle paintjob - 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: [HELP] getting vehicle paintjob (/showthread.php?tid=560808)



[HELP] getting vehicle paintjob - Luca12 - 30.01.2015

Hello. Is there a way to make in some command getting vehicle paintjob. Thanks

Like GetVehiclePaintjob or something.


Re: [HELP] getting vehicle paintjob - CalvinC - 30.01.2015

I don't think such feature exists.
But you can use OnVehiclePaintjob to save information about the vehicle and paintjob, and then get it later.


Re: [HELP] getting vehicle paintjob - Luca12 - 30.01.2015

How can I do that ? Thanks


Re: [HELP] getting vehicle paintjob - CalvinC - 30.01.2015

To save it, you need a saving system, like y_ini, MySQL, SQLite or such.
Here's just a simple server variable that'll hold paint job ID's of all vehicles.
pawn Код:
Paintjob[MAX_VEHICLES];
pawn Код:
public OnVehiclePaintJob(playerid, vehicleid, paintjobid)
{
    Paintjob[vehicleid] = paintjobid;
    return 1;
}
Then you can get paint jobs from the Paintjob variable.


Re: [HELP] getting vehicle paintjob - DVA - 24.02.2015

form wiki about OnVehiclePaintJob: This is called when a paintjob is viewed in modshops (before a player actually pays for it).