Minotaur Posted June 11, 2013 Share Posted June 11, 2013 (edited) Hello all! Im new in the forum please help me in this script this doesn't work ... Im noob in the scripting function dmg(thePlayer) local account = getPlayerAccount(thePlayer) if not account or isGuestAccount(account) then return end local accountnName = getAccountName(account) if isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Admin" ) ) or isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Moderator" ) ) then end car = getPedOccupiedVehicle ( player) if isVehicleDamageProof(car) == true then setVehicleDamageProof(car, false) else setVehicleDamageProof(car, true) end end addCommandHandler ( "damage", dmg ) I want to use this script only the admins and moderators Sorry for bad english im Hungary Edited June 11, 2013 by Guest Link to comment
Vision Posted June 11, 2013 Share Posted June 11, 2013 Try this function dmg(thePlayer) local account = getPlayerAccount(thePlayer) if not account or isGuestAccount(account) then return end local accountName = getAccountName(account) if isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Admin" ) ) or isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Moderator" ) ) then end car = getPedOccupiedVehicle (thePlayer) if isVehicleDamageProof(car) == true then setVehicleDamageProof(car, false) else setVehicleDamageProof(car, true) end end addCommandHandler ( "damage", dmg ) Link to comment
Minotaur Posted June 11, 2013 Author Share Posted June 11, 2013 THANK YOU!!!! I love you man yet it is one thing the outchatbox thing dou you know i think... for the admins:Your car is immortable for the players:you have no right to. And i thank you for your help Link to comment
blehmeh Posted June 11, 2013 Share Posted June 11, 2013 (edited) Castro's script and your original will work no matter the player is admin or not. Try this: function dmg(thePlayer) local account = getPlayerAccount(thePlayer) if not account or isGuestAccount(account) then return end local accountName = getAccountName(account) if isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Admin" ) ) or isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Moderator" ) ) then local car = getPedOccupiedVehicle (thePlayer) if isVehicleDamageProof(car) then setVehicleDamageProof(car, false) outputChatBox("Your car is mortable", thePlayer) else setVehicleDamageProof(car, true) outputChatBox("Your car is immortable", thePlayer) end else outputChatBox("You have no right to use this command.", thePlayer) end end addCommandHandler ( "damage", dmg ) Edited June 11, 2013 by Guest Link to comment
Minotaur Posted June 11, 2013 Author Share Posted June 11, 2013 I love you man! Very very thank you! 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