Probably would make sense to change it when the [PS] player enters a vehicle?
like
addEventHandler ( "onPlayerVehicleEnter", getRootElement(), function ( vehicle )
local name = getClientName ( source )
if ( not string.find ( name, "[PS]" ) ) then
return
end
local theVehicle = getVehicleName ( vehicle )
if ( theVehicle == "Sultan" ) then
setVehiclePaintjob ( vehicle, 1 )
elseif ( theVehicle == "Elegy" ) then
setVehiclePaintjob ( vehicle, 1 )
elseif ( theVehicle == "Jester" ) then
setVehiclePaintjob ( vehicle, 0 )
elseif ( theVehicle == "Blade" ) then
setVehiclePaintjob ( vehicle, 2 )
elseif ( theVehicle == "Broadway" ) then
setVehiclePaintjob ( vehicle, 1 )
elseif ( theVehicle == "Remington" ) then
setVehiclePaintjob ( vehicle, 2 )
elseif ( theVehicle == "Slamvan" ) then
setVehiclePaintjob ( vehicle, 0 )
elseif ( theVehicle == "Savanna" ) then
setVehiclePaintjob ( vehicle, 2 )
elseif ( theVehicle == "Stratum" ) then
setVehiclePaintjob ( vehicle, 1 )
elseif ( theVehicle == "Tornado" ) then
setVehiclePaintjob ( vehicle, 2 )
elseif ( theVehicle == "Uranus" ) then
setVehiclePaintjob ( vehicle, 2 )
elseif ( theVehicle == "Flash" ) then
setVehiclePaintjob ( vehicle, 2 )
end
end )
i'd use vehicle IDs and stick them in a table instead though