• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

isgm = world massenge

Status
Not open for further replies.

Xaver

Respected Member
hi

i´m well when gm aktive gm on and send the world massenger etc.

Code:
local function gmon(event, player, msg, Type, lang)
            if(player:IsGM() == true)then
	    
		player:SendBroadcastMessage("bla bla bla")

        end

    end




RegisterPlayerEvent(18, gmon)
 

slp13at420

Mad Scientist
he wants a message to be sent to a player when they use the ".gm on" command
or there gm tag turned when the player sends a message

this will work fine to check when they send message
but will fire for every character every time they send a chat message:
Code:
local function gmon(event, player, msg, Type, lang) 
  
	if(player:IsGM() == true)then -- only passes true when the player's GM Tag is ON.
		player:SendBroadcastMessage("bla bla bla")
	end
end

RegisterPlayerEvent(18, gmon) -- this will fire every time the player chats

this will fire every 90 seconds a player is online and check if they have there <GM> TAG on:
Code:
local function gmon(event, delay, calls, player)
  
	if(player:IsGM() == true)then -- only passes true when the player's <GM> Tag is ON.
		player:SendBroadcastMessage("bla bla bla") 
	end
end

local function GM_check(event, player)
	player:RegisterEvent(gmon, 90000, 0) -- timed event fires every 90 seconds.
	gmon(3, 0, 0, player) -- checks when each player logs in.
end

RegisterPlayerEvent(3, GM_check) -- fire once on login

But both of these will send them the same message over and over again.

unfortunately there is no player event hook for status change i.e. gm status 0/1
 
Last edited:
Status
Not open for further replies.
Top