Jump to content

[HELP] Roleplay User Colors


Recommended Posts

I custom added the line below for other admin ranks to have different colors and supposed this doesn't work for level 5, any problems because this is a basic script to me and my scripter also said its fine but it isnt working any helps?

I customly added this:

    elseif isPlayerAdmin(thePlayer) and getElementData(thePlayer, "adminduty") == 1 and getElementData(thePlayer, "hiddenadmin") == 0 and getPlayerAdminLevel(thePlayer) == 5 then -- Admin duty 
        setPlayerNametagColor(thePlayer, 0, 255, 0) 

Link to comment
elseif isPlayerAdmin(thePlayer) and getElementData(thePlayer, "adminduty") == 1 and getElementData(thePlayer, "hiddenadmin") == 0 then -- Admin duty 
 if getPlayerAdminLevel(thePlayer) == 5 then 
        setPlayerNametagColor(thePlayer, 0, 255, 0) 
 else 
  setPlayerNametagColor(thePlayer, 255, 255, 0) 
end 

Edited by Guest
Link to comment

They could be custom variables, for example;

local accName = getAccountName(getPlayerAccount(source)) 
local isAdmin = isObjectInACLGroup("user."..accName, aclGetGroup("Admin")) 

Then you could use it like this;

function whatever() 
if(isAdmin == true) then 
--whatever 
end 

Link to comment
elseif isPlayerAdmin(thePlayer) and getElementData(thePlayer, "adminduty") == 1 and getElementData(thePlayer, "hiddenadmin") == 0 then -- Admin duty

if getPlayerAdminLevel(thePlayer) == 5 then

setPlayerNametagColor(thePlayer, 0, 255, 0)

else

setPlayerNametagColor(thePlayer, 255, 255, 0)

end

Can this be put into a Lua because i dont understand this.

Link to comment

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...