-.Paradox.- Posted April 19, 2014 Posted April 19, 2014 Hello, Is there a client side function to check if the player is admin or moderator?
TAPL Posted April 19, 2014 Posted April 19, 2014 In server side when the player login check if he is admin then set and element data where you can use it in client side. Also you can use trigger from client to server to client again.
-.Paradox.- Posted April 19, 2014 Author Posted April 19, 2014 (edited) Thanks TAPL, I did it already and it's working but when i Logout i'm still marked as an admin.. Is there a way to fix this? Code removed & Solved Edited June 13, 2014 by Guest
Karuzo Posted April 19, 2014 Posted April 19, 2014 You should check if the player has left the game..
-.Paradox.- Posted April 19, 2014 Author Posted April 19, 2014 Logout* Btw how i can check when the player logout?
Mr_Moose Posted April 19, 2014 Posted April 19, 2014 (edited) Note, this is a solution to the original problem. By using the onPlayerLogin server side and set a value, for example: setElementData( thePlayer, "staff", level ) where "level" would represent a number that is equal to the rank of the players acl group level. This value can then be accessible from any resource both server and client and you can set it to nil onPlayerLogout to save some memory (not required due to security aspects). As a final complement to this you might also make commands to promote and demote players admin level and then sync this element data value at the same time. I guess that's the easiest (and safest) solution. Edited April 19, 2014 by Guest
Karuzo Posted April 19, 2014 Posted April 19, 2014 https://wiki.multitheftauto.com/wiki/OnPlayerLogout Why are you making it that hard mrbrutus ?
Mr_Moose Posted April 19, 2014 Posted April 19, 2014 I came up with a solution to the original problem which was "How to check if a player is admin or moderator client side", updated my reply to make it clear.
-.Paradox.- Posted June 13, 2014 Author Posted June 13, 2014 (edited) Nevermind. Fixed, I used onPlayerLogout event, and check if his in an acl group with (element data) and then set his element data to false. Edited June 13, 2014 by Guest
Max+ Posted June 13, 2014 Posted June 13, 2014 Nevermind.Fixed, I used onPlayerLogout event, and check if his in an acl group with (element data) and then set his element datq to false. Great Job , i like when someone's try fix his script by his own ,
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