View Full Version : Advanced player detection
swepwn
10-27-2012, 10:59 PM
I would like Advanced player detection implanted in xeno. This would make you write the name you want the alarm to go off to, lets say you know some ppl that usually go to your spawn, or people who you know go to your spawn to lure monsters. This will make it easier to have the player detected alarm on without it going off everytime you go to dp.
Thanks
//Swepwn
Shadow Wolf
10-27-2012, 11:05 PM
That would actually be very usefull.
SIGNED.
~ Shadow Wolf
Spectrus
10-27-2012, 11:46 PM
Didn't test it.
local playerList = {"Spectrus", "Eternal Oblivion", "DarkstaR"}
local whiteList = true --if true, playerList will not trigger alarm and all other players will, if false, any name on playerList will trigger alarm but other players won't.
registerEventListener(TIMER_TICK, "onTick")
function onTick()
for i = CREATURES_LOW, CREATURES_HIGH do
local c = Creature.GetFromIndex(i)
if c:isOnScreen() and c:isPlayer() then
if (not whiteList and table.find(playerList, c:Name())) or (whiteList and not table.find(playerList, c:Name())) then
alert()
return
end
end
end
end
BradooDeletion
10-28-2012, 09:04 AM
Spectrus you legend ;)
Spectrus
10-28-2012, 09:32 AM
Spectrus you legend ;)
Thanks for reminding me about this. Needed a quick edit, had GetByIndex instead of GetFromIndex, it works now. Make sure to include your name on whiteList. :cool:
swepwn
10-28-2012, 11:28 AM
Wow thanks spec! Do i just implant this at the end/beginning of the original lua, or do i make a separate lua just for the player detection?
mo_rateb
11-24-2015, 09:30 PM
Didn't test it.
local playerList = {"Spectrus", "Eternal Oblivion", "DarkstaR"}
local whiteList = true --if true, playerList will not trigger alarm and all other players will, if false, any name on playerList will trigger alarm but other players won't.
registerEventListener(TIMER_TICK, "onTick")
function onTick()
for i = CREATURES_LOW, CREATURES_HIGH do
local c = Creature.GetFromIndex(i)
if c:isOnScreen() and c:isPlayer() then
if (not whiteList and table.find(playerList, c:Name())) or (whiteList and not table.find(playerList, c:Name())) then
alert()
return
end
end
end
end
when i use it it just keeps alerting tho no one is there
Elvang
11-25-2015, 08:53 PM
when i use it it just keeps alerting tho no one is there
Add your name to the whitelist.
Whiplash
11-28-2015, 12:13 AM
It would be handy to be able to enable/disable the player detected alarm when not in spawn.
I imagine it qould be quite simple
While inspawn
Enable player detection alarm
When leaving spawn, disable
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.