A way to check wich vehicle you are using?

Hey, i need a way to Check wich vehicle i am using by vehiclescript, model or by name or class…

Is it possible?

[lua]
if( pl:InVehicle( ) ) then

local entity = pl:GetVehicle( );

local class = entity:GetClass( );
local model = entity:GetModel( );

-- do your stuff here

end
[/lua]

[editline]01:01PM[/editline]

ninja’d

Like that?

[lua]local function FueledCars ( player, vehicle )

if player:InVehicle() then
local class = player:GetVehicle():GetClass();
local model = player:GetVehicle():GetModel();
if(class == “prop_vehicle_jeep”) and (model == “models/shelby/shelby.mdl”) then

player: do your shit[/lua]

edit:Nope doesn’t work,Help please

elaborate on how it doesn’t work

[lua]local function FueledCars ( player, vehicle )

if player:InVehicle() then
local class = player:GetVehicle():GetClass();
local model = player:GetVehicle():GetModel();
if(class == “prop_vehicle_jeep” and model == “models/shelby/shelby.mdl”) then

player:SetColor( 255,255,255,0 )

end
end
end[/lua]

player don’t get the color when i’m in the shelby

Why would FueledCars ever get called?

because player position is bugued with fueled cars mod, i’m trying to fix this with lua…

My idea?! Hide the real player from view and add snpc who take the model of the player(driver)…

I meant in the code. I don’t see anything calling it.

it’s because,it’s in autorun

Lua doesn’t work like that. You need to put a hook in there.

to be precise i add this in the vehicle upgrade mod script…