Vehicle Subtypes
#4

Quote:
Originally Posted by MassDivide
View Post
/dl shows subtypes.
How does that help him? He wants to detect it in the script.

Here's the new version of my 'vFunc' include (not yet released): http://pastebin.com/T00ubRyw

There are two functions:

pawn Code:
GetVehicleModelType(modelid);
GetVehicleType(vehicleid);
These are the defines:

pawn Code:
#define VTYPE_ROAD 0
#define VTYPE_BIKE 1
#define VTYPE_PLANE 2
#define VTYPE_HELI 3
#define VTYPE_BOAT 4
#define VTYPE_TRAIN 5

// Or use VEHICLE_TYPE_x such as VEHICLE_TYPE_ROAD
Although, it's not perfect. For a start, VTYPE_TRAILER is missing. I will fix this before I release it (unless I forget).

The main 'problem' is that there are sub-sub types, for example VTYPE_ROAD has the sub-types truck, van, car etc. and I didn't want to have those as main categories as action that would be taken on them in a script likely wants to simply know whether they're a road vehicle or not, as opposed to a truck/van/car.

RC vehicles also missing. Meh.
Reply


Messages In This Thread
Vehicle Subtypes - by CoaPsyFactor - 10.01.2013, 00:38
Re: Vehicle Subtypes - by LarzI - 10.01.2013, 01:06
Re: Vehicle Subtypes - by MassDivide - 10.05.2013, 01:21
Re: Vehicle Subtypes - by MP2 - 10.05.2013, 03:57
Re: Vehicle Subtypes - by BGTrucker - 19.04.2015, 17:12
Re: Vehicle Subtypes - by Mencent - 19.04.2015, 17:17

Forum Jump:


Users browsing this thread: 1 Guest(s)