gokalpfirat Posted June 23, 2011 Share Posted June 23, 2011 How can i set a marker that can only admins see? Link to comment
#Paper Posted June 23, 2011 Share Posted June 23, 2011 Idk if u can, but u can set the script for use the marker just if u are admin Link to comment
gokalpfirat Posted June 23, 2011 Author Share Posted June 23, 2011 I know how to use marker for only admins but i want that only admins can see marker. Link to comment
JR10 Posted June 23, 2011 Share Posted June 23, 2011 trigger a client event for the admin that will create the marker example: --server side addEventHandler('onPlayerJoin', root, function() --if isPlayerAdmin then check if the player admin your way triggerClientEvent(source, 'showMarker', source) --end end ) --client side addEvent('showMarker', true) addEventHandler('showMarker', root, function() createMarker(--arguments) end ) Link to comment
gokalpfirat Posted June 23, 2011 Author Share Posted June 23, 2011 But i think when i createMarker everyone sees? Link to comment
JR10 Posted June 23, 2011 Share Posted June 23, 2011 No because it's client sided and you will make an event for it and you will trigger it server side for the admin only if you did it right only the admins will see it. Link to comment
BinSlayer1 Posted June 23, 2011 Share Posted June 23, 2011 no need for client/server triggering use createMarker() to create it and afterwards use this function: https://wiki.multitheftauto.com/wiki/SetElementVisibleTo First, you have to use this function to set the marker invisible to everyone Afterwards, you will use this function to set it visible only to the admin (whom you will detect with https://wiki.multitheftauto.com/wiki/Has ... rmissionTo (everything serverside) Link to comment
JR10 Posted June 23, 2011 Share Posted June 23, 2011 You are right but i prefer client event. because Can an element only be visible to one element (and its children) at a time? If so, do we need clearElementVisibleTo? If not, surely we need to remove the root element before using this function? So i just prefer using client scripts. 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