Jump to content

Question


Recommended Posts

Posted

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.

Posted (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 by Guest
Posted (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 by Guest
Posted

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.

  • 1 month later...
Posted (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 by Guest
Posted
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 ,

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...