Jump to content

[SOLVED]Admin Skin


quality

Recommended Posts

Posted (edited)

Hi guys. I have made a simple admin team and want to make a perm skin for admin. I've tried in different ways, i don't know how exactly how to make it. as I am still learning programming.

below is the script and the last part is the one im struggling, you will notice. whenever i spawn i do not get the skin 217.

function createAdminTeamOnStart (Admin) 
    AdminTeam = createTeam ( "Admin", 192, 192, 192 )-- ccreate and name 
end 
addEventHandler("onResourceStart", resourceRoot, createAdminTeamOnStart) -- add an event handler 
  
function setAdminTeam() 
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then -- if he is admin 
   setPlayerTeam(source, AdminTeam) -- set him to admin team 
    
   end 
   end 
addEventHandler("onPlayerLogin",getRootElement(),setAdminTeam) -- add an event handler 
  
function nametagColorChange() 
   if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then 
               setPlayerNametagColor(source, 192, 192, 192) 
            end 
      end 
addEventHandler("onPlayerLogin", getRootElement(), nametagColorChange) 
  
function spawnPlayer() 
 if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then 
    local x = -1656 
    local y = -425 
    local z = 15 
    spawnPlayer(source, x, y, z) 
    setElementModel(player, 217) 
end 
end 
addEventHandler("onPlayerLogin", getRootElement(), spawnPlayer) 

Edited by Guest
Posted
    function createAdminTeamOnStart (Admin) 
        AdminTeam = createTeam ( "Admin", 192, 192, 192 )-- ccreate and name 
    end 
    addEventHandler("onResourceStart", resourceRoot, createAdminTeamOnStart) -- add an event handler 
      
    function setAdminTeam() 
    if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then -- if he is admin 
       setPlayerTeam(source, AdminTeam) -- set him to admin team 
       setPlayerNametagColor(source, 192, 192, 192) 
       spawnPlayer(source, -1656, -425, 15) 
       setElementModel(source, 217) 
       end 
       end 
    addEventHandler("onPlayerLogin",getRootElement(),setAdminTeam) -- add an event handler 
      

Posted
    function createAdminTeamOnStart (Admin) 
        AdminTeam = createTeam ( "Admin", 192, 192, 192 )-- ccreate and name 
    end 
    addEventHandler("onResourceStart", resourceRoot, createAdminTeamOnStart) -- add an event handler 
      
    function setAdminTeam() 
    if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then -- if he is admin 
       setPlayerTeam(source, AdminTeam) -- set him to admin team 
       setPlayerNametagColor(source, 192, 192, 192) 
       spawnPlayer(source, -1656, -425, 15) 
       setElementModel(source, 217) 
       end 
       end 
    addEventHandler("onPlayerLogin",getRootElement(),setAdminTeam) -- add an event handler 
      

Thanks man! appreciate you answered so fast! Works fine and its more compact, appreciate.

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