Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local whitelist = {
- "Aleksander Puszkin",
- "Smiec Aa",
- "FriendName3",
- }
- local function isInWhitelist(playerName)
- local selfName = getSelfName()
- for _, name in ipairs(whitelist) do
- if playerName == name then
- return true
- end
- if selfName ~= nil and playerName == selfName then
- return true
- end
- end
- return false
- end
- local function checkForPlayers()
- local creatures = getCreaturesMultiFloor()
- for _, creature in ipairs(creatures) do
- local playerName = getCreatureName(creature)
- if isPlayer(creature) and playerName and not isInWhitelist(playerName) then
- playSound("playerOnScreen.wav")
- break
- end
- end
- end
- autoRun(100, checkForPlayers)
Advertisement
Add Comment
Please, Sign In to add comment