# CreateAdvertEx

## Description

Creates an advert for revenue generation. Before calling this function you must have set your ad account details with one of the other commands such as SetAdMobDetails. Not all platforms support all ad providers so setting as many account details as possible will allow AGK to select a suitable ad for this platform.
This advert will typically be a 320x50 banner displayed somewhere around the edge of your app. Creating an ad when one already exists will replace the existing ad. This is an extended version of the CreateAdvert command that takes optional offset values for positioning the ad.

## Definition

CreateAdvertEx( type, horz, vert, test, offsetx, offsety )

void agk::CreateAdvertEx( int type, int horz, int vert, int test, float offsetx, float offsety )

## Parameters

- type - reserved, must be 0
- horz - The horizontal position of the ad, 0=left, 1=center, 2=right
- vert - The vertical postion of the ad, 0=top, 1=center, 2=bottom
- test - Set to 1 to receive a non paying test ad, 0 to receive a real ad.
- offsetx - when horz is equal to 0 or 2 this value offsets the ad from the specified edge
- offsety - when vert is equal to 0 or 2 this value offsets the ad from the specified edge