gokalpfirat Posted June 23, 2011 Posted June 23, 2011 How can i set a marker that can only admins see?
#Paper Posted June 23, 2011 Posted June 23, 2011 Idk if u can, but u can set the script for use the marker just if u are admin My skype: skiper964 I helped you? Help me! ^^ Help me bro! ^^
gokalpfirat Posted June 23, 2011 Author Posted June 23, 2011 I know how to use marker for only admins but i want that only admins can see marker.
JR10 Posted June 23, 2011 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 ) Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
gokalpfirat Posted June 23, 2011 Author Posted June 23, 2011 But i think when i createMarker everyone sees?
JR10 Posted June 23, 2011 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. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
BinSlayer1 Posted June 23, 2011 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)
JR10 Posted June 23, 2011 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. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
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