Comparing strings or comparing partial strings

How would I compare a partial of one string to a full string like

if(ent:GetClass()==“prop_vehicle”) then


normally ent:GetClass() if it were a vehicle would return more then just prop_vehicle usually prop_vehicle_airboat and jeep how can I compare it to just prop_vehicle and it still be true if it is a prop_vehicle_jeep or something along those lines.

if(ent:GetClass()=="prop_vehicle_*") then

I think that works.

Yeah thats exactly what I tried, but it did not work for some reason.

if string.find(ents:GetClass(), "prop_vehicle") then

Try that.

Ahh, thanks alot that worked.

No problem.