R1S1NG Posted March 5, 2019 Share Posted March 5, 2019 (edited) Let me know, you need to block the skin of one gang to other players yes? Like the adm? Edited March 5, 2019 by R1S1NG Link to comment
DarkBeautyDZ Posted March 6, 2019 Author Share Posted March 6, 2019 (edited) 2 hours ago, R1S1NG said: Let me know, you need to block the skin of one gang to other players yes? Like the adm? yeah so the players who have admin can select the skin , but the other players can't Edited March 6, 2019 by DarkBeautyDZ Link to comment
R1S1NG Posted March 15, 2019 Share Posted March 15, 2019 (edited) On 05/03/2019 at 21:14, DarkBeautyDZ said: yeah so the players who have admin can select the skin , but the other players can't sorry for the long time i have a script for you if the player get the skin of the staff or another group, he die and the skin exit of them. for example put in AclGetGroup the group of the acl like ("Admin") function skin ( ) if ( getElementType ( source ) == "player" ) then if ( not isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Put here the group of acl" ) ) ) then if ( getElementModel ( source ) == 11 ) then killPed ( source ) end end end end addEventHandler ( "onElementModelChange", root, skin ) Edited March 15, 2019 by R1S1NG Link to comment
Jonas^ Posted March 15, 2019 Share Posted March 15, 2019 1 hour ago, R1S1NG said: sorry for the long time i have a script for you if the player get the skin of the staff or another group, he die and the skin exit of them. for example put in AclGetGroup the group of the acl like ("Admin") function skin ( ) if ( getElementType ( source ) == "player" ) then if ( not isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Put here the group of acl" ) ) ) then if ( getElementModel ( source ) == 11 ) then killPed ( source ) end end end end addEventHandler ( "onElementModelChange", root, skin ) I think that giving kill in ped is not very efficient, because if he does not have a system that seven a random skin after death would not do anything. Link to comment
R1S1NG Posted March 15, 2019 Share Posted March 15, 2019 (edited) 14 minutes ago, Jonas^ said: I think that giving kill in ped is not very efficient, because if he does not have a system that seven a random skin after death would not do anything. the player die infinite, it's good to player know for the next time don't get this skin more function skin ( ) if ( getElementType ( source ) == "player" ) then if ( not isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Put here the group of acl" ) ) ) then if ( getElementModel ( source ) == 11 ) then killPed ( source ) setPlayerSkin(playerSource, 0) end end end end addEventHandler ( "onElementModelChange", root, skin ) or just setPlayerSkin to any skin id Edited March 15, 2019 by R1S1NG Link to comment
Mr.Loki Posted March 15, 2019 Share Posted March 15, 2019 (edited) 10 hours ago, R1S1NG said: setPlayerSkin This function is deprecated. This means that its use is discouraged and that it might not exist in future versions. Please use setElementModel instead. On 05/03/2019 at 20:14, DarkBeautyDZ said: the players who have admin can select the skin , but the other players can't local restrictedModels = { [11] = true } function skinCheck ( oldModel, newModel ) if getElementType( source ) == "player" then -- check if the new model is in the restricted table. if restrictedModels[newModel] then -- if not in the acl if not isObjectInACLGroup( "user."..getAccountName( getPlayerAccount( source ), aclGetGroup( "Admin" ))) then -- revert to the previous skin setElementModel( source, oldModel ) end end end end addEventHandler ( "onElementModelChange", root, skinCheck ) Edited March 15, 2019 by Mr.Loki Link to comment
DarkBeautyDZ Posted March 23, 2019 Author Share Posted March 23, 2019 thank you a lot Guys :3 Link to comment
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