micheal1230 Posted May 26, 2012 Share Posted May 26, 2012 function makemeAdmin(thePlayer, commandName, who, rank) if not (who) then outputChatBox("SYNTAX: /" .. commandName .. " [Player Partial Name/ID] [Rank]", thePlayer, 255, 194, 14) else local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, who) if (targetPlayer) then local username = getPlayerName(thePlayer) local accountID = getElementData(targetPlayer, "gameaccountid") exports['anticheat-system']:changeProtectedElementDataEx(targetPlayer, "adminlevel", tonumber(rank)) rank = tonumber(rank) if (rank<1337) then exports['anticheat-system']:changeProtectedElementDataEx(targetPlayer, "hiddenadmin", 0) end local query = mysql:query_free("UPDATE accounts SET admin='" .. mysql:escape_string(tonumber(rank)) .. "', hiddenadmin='0' WHERE id='" .. mysql:escape_string(accountID) .. "'") outputChatBox("You set " .. targetPlayerName .. "'s Admin rank to " .. rank .. ".", thePlayer, 0, 255, 0) local hiddenAdmin = getElementData(thePlayer, "hiddenadmin") -- Fix for scoreboard & nametags local targetAdminTitle = exports.global:getPlayerAdminTitle(targetPlayer) if (rank>0) or (rank==-999999999) then exports['anticheat-system']:changeProtectedElementDataEx(targetPlayer, "adminduty", 1) else exports['anticheat-system']:changeProtectedElementDataEx(targetPlayer, "adminduty", 0) end mysql:query_free("UPDATE accounts SET adminduty=" .. mysql:escape_string(getElementData(targetPlayer, "adminduty")) .. " WHERE id = " .. mysql:escape_string(getElementData(targetPlayer, "gameaccountid")) ) exports.global:updateNametagColor(targetPlayer) if (hiddenAdmin==0) then local adminTitle = exports.global:getPlayerAdminTitle(thePlayer) outputChatBox(adminTitle .. " " .. username .. " set your admin rank to " .. rank .. ".", targetPlayer, 255, 194, 14) else outputChatBox("Hidden admin set your admin rank to " .. rank .. ".", targetPlayer, 255, 194, 14) end end end end end addCommandHandler("makemeadmin", makemeAdmin, false, false) Link to comment
Guest Guest4401 Posted May 26, 2012 Share Posted May 26, 2012 How many times are you going to ask the same thing again and again? viewtopic.php?f=91&t=43676 viewtopic.php?f=91&t=43655 Link to comment
Cyandie Posted May 26, 2012 Share Posted May 26, 2012 This guy should stop using vgScripts and make his own GameMode(If he can). Link to comment
micheal1230 Posted May 26, 2012 Author Share Posted May 26, 2012 This guy should stop using vgScripts and make his own GameMode(If he can). Hey You stupid stop jumping into things this is the shodown script i could just type that up that doesnt mean its from vG Nub Link to comment
Cyandie Posted May 26, 2012 Share Posted May 26, 2012 ShoDown is Valhalla... it's just edits of the vgscript I downloaded the code and the vg 3.0.2 code I looked into the Global and Account System also SQL and many resources they do have valhalla scripts in there the new scripts by the owner are self made but only a few. 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