@Dominium: There's two ways of checking that easily. You can either base it on GUID, or, by name. But players can have the same name from different realms, so the GUID check is the most safe way to do it, unless you don't normally do Dungeons/LFR/Cross-Realm stuff. But again, the chance of someone having the same name as you is pretty slim.
Way 1: GUID
Code:
local playerGUID = tonumber(UnitGUID("player"):sub(6,10), 16)
local party1GUID = tonumber(UnitGUID("party1"):sub(6,10), 16)
if IsInGroup() then
if playerGUID == party1GUID then return false
else
-- Coding here
end
end
Since GUID absolutely require a target (will return a comparing value to nil otherwise, iirc), I made an extra check to see if you're in a Party or Raid before comparing GUIDS.
Way 2:
Code:
if UnitName("player") == UnitName("party1") then return false
else
-- Coding here
end
This is simply checking your character name against the character name of the first person in your party. Nothing more to say about it. Returns false if your name is the same name as the first person in party/raid.
The same goes for the GUID. Returns false if you're the same person.