Hello, I need switcher for Player Detected Alarm, I mean when my character enter spawn it will alarm when player in on the screen, but when he exit spawn and go refil it won't alarm, is it possible?
Hello, I need switcher for Player Detected Alarm, I mean when my character enter spawn it will alarm when player in on the screen, but when he exit spawn and go refil it won't alarm, is it possible?
Set PLAER_ALARM to true whenever you want to switch it on and set it to false whenever you want to switch it off.
lua code:
registerNativeEventListener(WALKER_SELECTLABEL, 'onLabel')
function onLabel(name)
if (name == "startHunt") then
PLAYER_ON_SCREEN_ALARM = true
return
end
if (name == "leaveRespawn") then
PLAYER_ON_SCREEN_ALARM = false
return
end
end
--[[ DO NOT EDIT ANYTHING BELOW THIS LINE ]]--
Module.New("player-on-screen-alarm", function()
if (Creature.iPlayers()() and PLAYER_ON_SCREEN_ALARM) then
print("PLAYER ON SCREEN ALARM!")
alert()
end
end)
thanks this is really helpful the ammount of times i rush to pc to find im in dp is a lot lol
No, everything above --[[ DO NOT EDIT ANYTHING BELOW THIS LINE ]]-- is just an example how to use it. Basicially just use:
lua code:PLAYER_ON_SCREEN_ALARM = true
when you want to turn alarm on or use:
lua code:PLAYER_ON_SCREEN_ALARM = false
when you want to turn it off. If you still don't understand how to do it show me your lua and I will show you how to adapt it to your script.
Last edited by eldera; 01-15-2016 at 02:09 PM.