Talon_BR Posted July 25, 2020 Share Posted July 25, 2020 Gente, queria saber se e possivel modificar o playerblips e por para os jogadores no F11 aparecer so pra quem tiver na ACL staff Link to comment
Talon_BR Posted July 26, 2020 Author Share Posted July 26, 2020 6 hours ago, Mature said: é servidor de freeroam? é de rp ai queria por pros jogadores aparecer no F11 so pra staff Link to comment
Mature Posted July 26, 2020 Share Posted July 26, 2020 (edited) 36 minutes ago, Talon_BR said: é de rp ai queria por pros jogadores aparecer no F11 so pra staff Não testei, mas pode funcionar local blip = {} addEventHandler('onResourceStart', resourceRoot, function () local player = nil for i=1, #getElementsByType("player") do player = getElementsByType("player")[i] local x,y,z = getElementPosition(player) blip[player] = createBlipAttachedTo ( player, 0) if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(player)), aclGetGroup ("Moderator")) or isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(player)), aclGetGroup ("SuperModerator")) or isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(player)), aclGetGroup ("Admin")) or isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(player)), aclGetGroup ("Console")) then setElementVisibleTo (blip[player], player, true ) else setElementVisibleTo (blip[player], player, false ) end end end) addEventHandler('onPlayerQuit', root, function () if blip[source] then destroyElement(blip[source]) end end) addEventHandler('onPlayerLogin', root, function () local x,y,z = getElementPosition(source) blip[source] = createBlipAttachedTo (source, 0) setElementVisibleTo (blip[source], root, false ) if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup ("Moderator")) or isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup ("SuperModerator")) or isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup ("Admin")) or isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup ("Console")) then local blips = nil for i=1, #getElementsByType("blip", resourceRoot) do blips = getElementsByType("blip", resourceRoot)[i] setElementVisibleTo (blips, source, true ) end end end) Edited July 26, 2020 by Mature Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now