Et-win Posted July 5, 2014 Share Posted July 5, 2014 I did. And if you look in that code before this one, you would know e.e Link to comment
Et-win Posted July 5, 2014 Share Posted July 5, 2014 I said throw some random outputChatBoxes into the code to see where it stops or it does even start. Link to comment
Resto Posted July 5, 2014 Author Share Posted July 5, 2014 Omg .. this is so difficult to do this in order to be able to give only Admin, SuperModerator??? I do not want no other positions only that .. function fixall(tPlayer, tCommand) if (eventName == "startFixAllPlayers") then tPlayer = source end accountname = getAccountName (getPlayerAccount(tPlayer)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ("Admin") ) then if isPedInVehicle(tPlayer) then for i,player in ipairs(getElementsByType("player")) do fixVehicle(getPedOccupiedVehicle(player)) end setTimer(outputChatBox,50,1,"Bla Bla Bla",getRootElement(),171,205,239,true) end else outputChatBox("Bla Bla Bla",source, 255, 0, 0, true) end end addEvent("startFixAllPlayers", true) addEventHandler("startFixAllPlayers", getRootElement(), fixall) function restoreAllBlood_CMD(thePlayer, theCMD) if (eventName == "startBloodAllPlayers") then thePlayer = source end local accountName = getAccountName(getPlayerAccount(thePlayer)) if(accountName) then if(isObjectInACLGroup("user."..accountName, aclGetGroup("Admin"))) then local alivePlayers = getAlivePlayers(); if(alivePlayers ~= false) then for key, value in ipairs(alivePlayers) do setElementData(value, "blood", 12000); outputChatBox("Bla Bla Bla", value, 0, 255, 0); end end else outputChatBox("Bla Bla Bla", thePlayer, 255, 0, 0); end end end addEvent("startBloodAllPlayers", true) addEventHandler("startBloodAllPlayers", getRootElement(), restoreAllBlood_CMD) Link to comment
Et-win Posted July 5, 2014 Share Posted July 5, 2014 It should work, but it doesn't. So why would we throw some outputChatBoxes into it? Right, to check where it stops in order to find any bugs or not working stuff. function fixall(tPlayer, tCommand) outputChatBox("Test1") if (eventName == "startFixAllPlayers") then tPlayer = source end accountname = getAccountName (getPlayerAccount(tPlayer)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ("Admin") ) then if isPedInVehicle(tPlayer) then for i,player in ipairs(getElementsByType("player")) do fixVehicle(getPedOccupiedVehicle(player)) outputChatBox("Test4") end setTimer(outputChatBox,50,1,"Bla Bla Bla",getRootElement(),171,205,239,true) outputChatBox("Test5") else outputChatBox("Test3") end else outputChatBox("Bla Bla Bla",source, 255, 0, 0, true) outputChatBox("Test2") end end addEvent("startFixAllPlayers", true) addEventHandler("startFixAllPlayers", getRootElement(), fixall) function restoreAllBlood_CMD(thePlayer, theCMD) outputChatBox("Test7") if (eventName == "startBloodAllPlayers") then thePlayer = source end local accountName = getAccountName(getPlayerAccount(thePlayer)) if(accountName) then if(isObjectInACLGroup("user."..accountName, aclGetGroup("Admin"))) then local alivePlayers = getAlivePlayers(); if(alivePlayers ~= false) then for key, value in ipairs(alivePlayers) do setElementData(value, "blood", 12000); outputChatBox("Bla Bla Bla", value, 0, 255, 0); outputChatBox("Test12") end outputChatBox("Test11") else outputChatBox("Test10") end else outputChatBox("Bla Bla Bla", thePlayer, 255, 0, 0); outputChatBox("Test9") end else outputChatBox("Test8") end end addEvent("startBloodAllPlayers", true) addEventHandler("startBloodAllPlayers", getRootElement(), restoreAllBlood_CMD) Now run it. What does it output? Also check debugscript, because I already guess it's again the buttons. Link to comment
Resto Posted July 5, 2014 Author Share Posted July 5, 2014 I just wanted to edit this ... for _, aclGroups in ipairs ( { 'Admin', 'SuperModerator' } ) do if isObjectInACLGroup ( ... , aclGetGroup ( aclGroups ) ) then -- Do something else -- Do something else end end Link to comment
Et-win Posted July 5, 2014 Share Posted July 5, 2014 Be more specific next time then -.- Link to comment
Resto Posted July 5, 2014 Author Share Posted July 5, 2014 However, but how do I put it there? Link to comment
Resto Posted July 7, 2014 Author Share Posted July 7, 2014 And it could not be done please so that no "Admin", "SuperModerator", "Moderator" but just so you allow it in the admin panel and it will no longer be able to use .. Now I got it in the Script .. if isObjectInACLGroup ("user." .. accountname, aclGetGroup ("Admin")) then 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