Code:
local buffmessage = "#buffme"
function OnChat(event, plr, message, type, language)
if (message == Buffmessage) then
if (plr:IsGm()) then
plr:CastSpell(38688)
plr:CastSpell(45743)
plr:CastSpell(41105)
plr:CastSpell(56525)
plr:CastSpell(26393)
plr:SendBroadcastMessage("Enjoy your GameMaster Buffs!")
else
plr:CastSpell(48162)
plr:CastSpell(42995)
plr:CastSpell(58499)
plr:CastSpell(43046)
plr:CastSpell(25472)
plr:SendBroadcastMessage("Enjoy your Buffs!")
end
return 0
end
end
RegisterServerHook(16, "OnChat")
i wanna make it so when someone types #buffme then it will check if they are a gm and if they are then it will give them one set of buffs. and if they are not a gm then it will give them another set of buffs.
i tried doing it on my own and i just wanna know where i went wrong in the code because when i type #buffme in game it wont do anything but display a normal chat message.
thanks ahead of time for your help