This might work for testing if the player is on a mount (untested):
Code:
if(GetBuffSlotFromType(SE_SummonHorse) != -1) {
// We are on a mount ... your code here
}
GetBuffSlotFromType looks at the buff slots for a spell with the given effect and returns a slot number if such a buff is on the player, or -1 otherwise.
zone/spdat.h has all the Spell Effect types you can use.
Another way (probably more efficient) could be:
Code:
if(GetHorseId()) {
// We are on a mount
}