View Full Version : Question About Lua group check

10-28-2014, 06:22 AM
so i made a Lua script that checks the MapId of a player and if they are in a group or not.
if they are it gives Group buff and if they are not in group it gives them a Solo buff.

but the problem is if a player invites another player while in the instance they get to keep the Solo Buff while the other person gets the group buff how can i make it so when they invite and player and they accept and join the group it removes the solo buff and gives them the Group Buff(the spells are Custom made)

function Instance_Player(event, player)
if (player:GetMapId() == 189) then
if (player:IsInGroup() == true) then
player:AddAura(111151, player)
print "Test - In GROUP!"
if (player:IsInGroup() == false) then
player:AddAura(111150, player)
print "Test - Not in Group"
RegisterPlayerEvent(28, Instance_Player)

Thanks in Advance!

10-28-2014, 06:45 AM
The problem is, that you only run the script on "PLAYER_EVENT_ON_MAP_CHANGE".
You could use one of these (http://eluna.emudevs.com/Global/RegisterGroupEvent.html) to get the group buff for everyone.

10-28-2014, 06:56 AM
thank you! now to get a script working i hope lol