DonOmar Posted July 17, 2016 Share Posted July 17, 2016 hello guys today, i'am asking for improving my code to make enable using the command with just a Group in acl ! i made it but it failed here is the code. Amount = { }; Amount.RED = { 255, 0, 0 }; Amount.BLUE = { 1, 1, 1 }; Amount.PINK = { 2, 2, 2 }; Amount.BLACK = { 0, 0, 0 }; function clr (player,command,color) local vehicle = getPedOccupiedVehicle(player) if color and vehicle then if ( not Amount [ tostring ( color ):upper ( ) ] ) then return false; end local r, g, b = unpack ( Amount [ tostring ( color ):upper() ] ); setVehicleColor(vehicle, r, g, b ); end end addCommandHandler("color", clr) Link to comment
1LoL1 Posted July 17, 2016 Share Posted July 17, 2016 heeeeelp please Amount = { }; Amount.RED = { 255, 0, 0 }; Amount.BLUE = { 1, 1, 1 }; Amount.PINK = { 2, 2, 2 }; Amount.BLACK = { 0, 0, 0 }; function clr (player,command,color) local vehicle = getPedOccupiedVehicle(player) if color and vehicle then if ( not Amount [ tostring ( color ):upper ( ) ] ) then return false; end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Admin")) then local r, g, b = unpack ( Amount [ tostring ( color ):upper() ] ); setVehicleColor(vehicle, r, g, b ); else outputChatBox("text", player, 255, 255, 255, true) end end end addCommandHandler("color", clr) 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