Jump to content

Need Help Please


illestiraqi

Recommended Posts

Posted

In my server the skin Staff Boy and Staff Girl is for everyone, I need a script that will make skin id 211, 217 restricted to users in the Admin acl team and Super Moderators please.

Posted

You can also use the event: onElementModelChange to set back to his old skin if he get's one of these restricted skins.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

You can try to make it, then you can post here what you tried and we can help you.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
Just try and i'll help you .

I'm Sorry I can't Im toooooooo horrible I can't even make 1 Script of my own!

Also theres another script I need witch will be 5x harder than this one

Posted

-- Server Side ( = 
addEventHandler("onPlayerLogin",root, 
function () 
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then 
   setElementModel(source,id) 
elseif isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("SuperModerator")) then 
   setElementModel(source,id) 
   end 
end 
) 
  

  

Posted
-- Server Side ( = 
addEventHandler("onPlayerLogin",root, 
function () 
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then 
   setElementModel(source,id) 
elseif isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("SuperModerator")) then 
   setElementModel(source,id) 
   end 
end 
) 
  

I see

setElementModel(source,id) 

where the id is thats where I put the model id correct? If so how do I put 2? is it

setElementModel(source,211, 217) 

what i just did is that correct?

Posted

No, setElementModel has two arguments only: the element, the model.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
-- Server Side ( = 
addEventHandler("onPlayerLogin",root, 
function () 
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then 
   setElementModel(source,math.random ( 211, 217 )) 
elseif isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("SuperModerator")) then 
   setElementModel(source,math.random ( 211, 217 )) 
   end 
end 
) 
  

Is that correct? Am I done now?

Posted
  
addEventHandler("onPlayerLogin",root, 
function () 
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin"))  or isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("SuperModerator")) then 
   setElementModel(source,math.random ( 211, 217 )) 
   end 
end 
) 

Would be better

Posted

I tried this and fails. When I go to freeroam>skins>workers>staff girl, and boy lets me take it when im not staff... please fix

  
addEventHandler("onPlayerLogin",root, 
function () 
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin"))  or isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("SuperModerator")) then 
   setElementModel(source,math.random ( 211, 217 )) 
   end 
end 
) 

Posted
I tried this and fails. When I go to freeroam>skins>workers>staff girl, and boy lets me take it when im not staff... please fix
  
addEventHandler("onPlayerLogin",root, 
function () 
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin"))  or isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("SuperModerator")) then 
   setElementModel(source,math.random ( 211, 217 )) 
   end 
end 
) 

That's why you need to use: onElementModelChange.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
I tried this and fails. When I go to freeroam>skins>workers>staff girl, and boy lets me take it when im not staff... please fix
  
addEventHandler("onPlayerLogin",root, 
function () 
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin"))  or isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("SuperModerator")) then 
   setElementModel(source,math.random ( 211, 217 )) 
   end 
end 
) 

That's why you need to use: onElementModelChange.

Can you please do that Idk how :(

Posted

Can't you try to do it?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

If you say that, and you don't want to try, then I suggest you to don't even come to this section, because here we help you with your problems, we don't make it for you because you don't want to try to do it.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
If you say that, and you don't want to try, then I suggest you to don't even come to this section, because here we help you with your problems, we don't make it for you because you don't want to try to do it.

I'm with Solid Snake +1

  

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