> > > >

get_field_basetype | fakemeta | AMX X Documentation

Includes

    1. Stocks
    1. Natives
    2. Forwards
    1. Natives
    2. Stocks
    1. Natives
    2. Stocks
    1. Natives
    1. Natives
    2. Stocks
    1. Natives
    1. Natives
    2. Forwards
    3. Stocks
    1. Natives
    2. Forwards
    1. Natives
    1. Natives
    1. Natives
    2. Stocks
    1. Natives
    2. Forwards
    1. Natives
    1. Natives
    2. Forwards
    1. Natives
    2. Forwards
    1. Stocks
    1. Natives
    1. Natives
    2. Stocks
    1. Stocks
    1. Stocks
    1. Natives
    1. Natives
    2. Forwards
    3. Stocks
    1. Natives
    1. Natives
    1. Natives
    1. Natives
    2. Stocks
    1. Natives
    1. Natives
    1. Stocks
    1. Natives
    1. Natives
    1. Natives
    2. Forwards
    1. Natives
    1. Natives
    1. Natives
    1. Natives
    1. Natives
    1. Natives
    1. Natives
    2. Forwards
    1. Natives
    2. Stocks
    1. Natives
    1. Natives
    1. Natives
    2. Stocks
    1. Natives
    1. Stocks
    1. Natives
    1. Natives
    1. Natives
    1. Natives
    2. Forwards
    3. Stocks
    1. Stocks
    1. Natives
    2. Forwards
    3. Stocks
    1. Natives
    1. Natives
    2. Forwards
    3. Stocks
    1. Natives
    1. Natives
    2. Stocks
    1. Stocks

get_field_basetype

Syntax
									stock BaseFieldType:get_field_basetype(FieldType:type, type_name[] = "", maxlen = 0)
									{
     static const baseFieldTypeNames[BaseFieldType][] =
     {
          "none",
          "integer",
          "float",
          "vector",
          "entity",
          "string",
     };

     new BaseFieldType:baseType = BASEFIELD_NONE;

     switch (type)
     {
          case FIELD_INTEGER, FIELD_STRINGINT, FIELD_SHORT  , FIELD_CHARACTER,
                FIELD_CLASS  , FIELD_STRUCTURE, FIELD_POINTER, FIELD_FUNCTION,
                FIELD_BOOLEAN:
          {
               baseType = BASEFIELD_INTEGER;
          }
          case FIELD_FLOAT:
          {
               baseType = BASEFIELD_FLOAT;
          }
          case FIELD_VECTOR:
          {
               baseType = BASEFIELD_VECTOR;
          }
          case FIELD_CLASSPTR, FIELD_ENTVARS, FIELD_EDICT, FIELD_EHANDLE:
          {
               baseType = BASEFIELD_ENTITY;
          }
          case FIELD_STRINGPTR, FIELD_STRING:
          {
               baseType = BASEFIELD_STRING;
          }
     }

     if (maxlen > 0)
     {
          copy(type_name, maxlen, baseFieldTypeNames[baseType]);
     }

     return baseType;
}
								
Variable Description
type
Class member type (FIELD_* constants)
type_name
Optional buffer to store base type name in
maxlen
Maximum size of the buffer

Description
Returns the data field base type based off a specific field type.

Note
From an AMXX plugin perspective, the (C++/engine) data types can be grouped
in five base types: integer, float, vector, entity and string. This stock is
essentially for convenience and debug purpose.

Return
Base field type (BASEFIELD_* constants)
> > > >