Jump to content

xeon17

Members
  • Posts

    1,903
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by xeon17

  1. xeon17

    Question

    I posted script code again .
  2. xeon17

    Question

    I tried now but , i still can kill a player with one sawed off shot , so the damage is still verry good. full script , please help ._. local stats = {73, 75, 71, 77, 78} local weapons = {[24] = 100, [26] = 100, [32] = 100, [31] = 150, [46] = 200} local pBlips = {} addEventHandler("onPlayerSpawn", root, function() takeAllWeapons(source) setPlayerMoney(source, 5000) --givePlayerMoney(source, 5000) for _, stat in ipairs(stats) do setPedStat(source, stat, 1000) end for weapon, ammo in pairs(weapons) do giveWeapon(source, weapon, ammo) end if not pBlips[source] then pBlips[source] = createBlipAttachedTo(source, 0, 2) end end) addEventHandler("onResourceStart", resourceRoot, function() for _, player in ipairs(getElementsByType("player")) do if not (isPedDead(player)) then pBlips[player] = createBlipAttachedTo(player, 0, 2) end end end) -- Blip system setTimer(function() for player, blip in pairs(pBlips) do if (isElement(player)) then local playerTeam = getPlayerTeam(player) if (playerTeam) then local r, g, b = getTeamColor(playerTeam) setBlipColor(blip, r, g, b, 255) else setBlipColor(blip, 255, 255, 255, 255) end else destroyElement(blip) pBlips[player] = nil end end end, 5000, 0) addEventHandler("onPlayerSpawn", root, function () setWeaponProperty(31, "poor", "damage", 300) setWeaponProperty(24, "poor", "damage", 300) setWeaponProperty(26, "poor", "damage", 10) setWeaponProperty(32, "poor", "damage", 300) setWeaponProperty(31, "poor", "damage", 300) setWeaponProperty(46, "poor", "damage", 300) end)
  3. xeon17

    Question

    I tried now but , i still can kill a player with one sawed off shot , so the damage is still verry good. full script , please help ._. ----CODE REMOVED-- PROBLEM SOLVED Can a moderator close the topic please , thanks
  4. xeon17

    Question

    How to set Damage of weapons a little lower ? a function ?
  5. xeon17

    Dosen't Work

    Should i do the same for my other script ? help guys I got a bug , no have idea how to fix it local acls = { "ORGANIZADOR", "MODERADOR", "ADMINISTADOR" } local on = "nao" local coisa = nil function event (thePlayer) local account = getPlayerAccount(thePlayer) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) for i, v in pairs ( acls ) do if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( v ) ) ) then if(on == "sim")then outputChatBox("#FFF000[sERVER#FFFFFF Evento created, use #FF0000/devent#FFFFFF to close the Event!",thePlayer,255,255,255,true) else local x,y,z = getElementPosition(thePlayer) on = "sim" coisa = createMarker(x,y,z-1,"cylinder",2,0,255,0) dimen = getElementDimension(thePlayer) inte = getElementInterior(thePlayer) outputChatBox("#FFF000[sERVER]#FFFFFF Administator #FF0000"..getPlayerName(thePlayer).."#FFFFFF created a event, write #FF0000/irevento#FFFFFF to participate!",root,255,255,255,true) if(inte)then setElementInterior(coisa, inte) end if(dimen)then setElementDimension(coisa, dimen) end end end end end else outputChatBox("#FFF000[sERVER]#FFFFFF You aren't a admin to create a event!",thePlayer,255,255,255,true) end end end addCommandHandler("cevent", event) [lua][2014-06-12 05:46:25] SCRIPT ERROR: event\irevento.lua:37: '' expected near 'else' [2014-06-12 05:46:25] ERROR: Loading script failed: event\irevento.lua:37: '' expected near 'else' [2014-06-12 05:46:25] event restarted successfully
  6. xeon17

    Dosen't Work

    Should i do the same for my other script ? help guys local on = "nao" local coisa = nil function event (thePlayer) local accountname = getAccountName (getPlayerAccount(thePlayer)) if (isObjectInACLGroup ( "user."..accountname, aclGetGroup ( "ORGANIZADOR" or "MODERADOR" ) )) then if(on == "sim")then outputChatBox("#FFF000[sERVER#FFFFFF Evento created, use #FF0000/devent#FFFFFF to close the Event!",thePlayer,255,255,255,true) else local x,y,z = getElementPosition(thePlayer) coisa = createMarker(x,y,z-1,"cylinder",2,0,255,0) dimen = getElementDimension(thePlayer) inte = getElementInterior(thePlayer) if(inte)then setElementInterior(coisa, inte) end if(dimen)then setElementDimension(coisa, dimen) end on = "sim" outputChatBox("#FFF000[sERVER]#FFFFFF Administator #FF0000"..getPlayerName(thePlayer).."#FFFFFF created a event, write #FF0000/irevento#FFFFFF to participate!",root,255,255,255,true) end else outputChatBox("#FFF000[sERVER]#FFFFFF You aren't a admin to create a event!",thePlayer,255,255,255,true) end end addCommandHandler("cevent", event) function destruir (thePlayer) local accountname = getAccountName (getPlayerAccount(thePlayer)) if (isObjectInACLGroup ( "user."..accountname, aclGetGroup ( "ORGANIZADOR" or "MODERADOR" ) )) then if(on == "nao")then outputChatBox("#FFF000[sERVER]#FFFFFF There isn't a event, use #FF0000/cevent #FFFFFF to create a event!",thePlayer,255,255,255,true) else if (isElement(coisa)) then destroyElement(coisa) end for _, p in ipairs(getElementsByType("player")) do local isPlayerInEvento = getElementData(p, "Evento") if (isPlayerInEvento) then setElementData(p, "Evento", false) outputChatBox("#FFF000[sERVER]#FFFFFF Administator #FF0000"..getPlayerName(thePlayer).." #FFFFFF Closed the event!", root, 255,255,255, true) on = "nao" end end end else outputChatBox("#FFF000[sERVER]#FFFFFF You aren't an admin to destroy a event!",thePlayer,255,255,255,true) end end addCommandHandler("devent",destruir) function irevento(thePlayer,cmd) local x,y,z = getElementPosition(coisa) local inEvent = getElementData(thePlayer, "Evento") if(on == "sim")then -- "on == sim", on is a string var? setted in outside of this code? if(getPedOccupiedVehicle (thePlayer))then outputChatBox("#FFF000[sERVER]#FFFFFF Leave your vehicle to enter the event",thePlayer,255,255,255,true) else if (inEvent) then -- if the var "Evento" is true then say to player: outputChatBox("#FFF000[sERVER]#FFFFFF You're already at the event.",thePlayer,255,255,255,true) else -- only take weapons and give armor and helth if the player joined in event. takeAllWeapons ( thePlayer ) setElementHealth ( thePlayer, 100 ) setPedArmor ( thePlayer, 100 ) setElementData(thePlayer, "Evento", true) -- set var "Evento" to true setElementPosition(thePlayer,x,y,z+1) -- set player position setElementDimension(thePlayer, getElementDimension(coisa)) setElementInterior(thePlayer,inte) outputChatBox("#FFF000[sERVER]#FFFFFF Welcome in the Event!",thePlayer,255,255,255,true) end end else outputChatBox("#FFF000[sERVER]#FFFFFF There isn't a event created!",thePlayer,255,255,255,true) end end addCommandHandler("irevento",irevento) function Infor(thePlayer) local accountname = getAccountName (getPlayerAccount(thePlayer)) if (isObjectInACLGroup ( "user."..accountname, aclGetGroup ( "ORGANIZADOR" or "MODERADOR" ) )) then outputChatBox("#FFF000[sERVER]#FFFFFF - Commands for Event ",thePlayer, 255, 255, 255, true) outputChatBox("#FFF000[sERVER]#FFFFFF #FF0000/cevent#FFFFFF - To create a event [Administators]!",thePlayer, 255, 255, 255, true) outputChatBox("#FFF000[sERVER]#FFFFFF #FF0000/devent #FFFFFF- To close the event [Administators]!",thePlayer, 255, 255, 255, true) outputChatBox("#FFF000[sERVER]#FFFFFF #FF0000/irevento #FFFFFF- To enter the event [Players]!",thePlayer, 255, 255, 255, true) outputChatBox("#FFF000[sERVER]#FFFFFF #FF0000/sawnoff ,/m4,/tec9,/deagle #FFFFFF- To give players weapons [Administators]!",thePlayer, 255, 255, 255, true) outputChatBox("#FFF000[sERVER]#FFFFFF #FF0000/nrg500 , /dnrg500 #FFFFFF- To give and destroy a NRG-500 [Administators]!",thePlayer, 255, 255, 255, true) outputChatBox("#FFF000[sERVER]#FFFFFF #FF0000/givehealth , /takeweapons #FFFFFF- To give player health&armour and take weapons [Administators]!",thePlayer, 255, 255, 255, true) else outputChatBox("#FFF000[sERVER]#FFFFFF You aren't an admin to use this command",thePlayer,255,255,255,true) end end addCommandHandler ("event",Infor) function getWeapons ( thePlayer ) local accountname = getAccountName (getPlayerAccount(thePlayer)) if (isObjectInACLGroup ( "user."..accountname, aclGetGroup ( "ORGANIZADOR" or "MODERADOR" ) )) then for _, events in ipairs(getElementsByType("player")) do local isPlayerInEvento = getElementData( events, "Evento" , nil ) if ( isPlayerInEvento) then takeAllWeapons (events) outputChatBox("#FFF000[EVENTO]#FFFFFF "..getPlayerName(thePlayer).." removed the weapons",events, 255, 255, 255, true) end end end end addCommandHandler ("takeweapons",getWeapons) function GiveHealthAndArmour ( thePlayer ) local accountname = getAccountName (getPlayerAccount(thePlayer)) if (isObjectInACLGroup ( "user."..accountname, aclGetGroup ( "ORGANIZADOR" or "MODERADOR" ) )) then for _, events in ipairs(getElementsByType("player")) do local isPlayerInEvento = getElementData( events, "Evento" , nil ) if ( isPlayerInEvento) then setElementHealth ( events, 100 ) setPedArmor ( events, 100 ) outputChatBox("#FFF000[EVENTO]#FFFFFF "..getPlayerName(thePlayer).." Given health & armour",events, 255, 255, 255, true) end end end end addCommandHandler ("givehealth",GiveHealthAndArmour) function Frooze ( thePlayer ) local accountname = getAccountName (getPlayerAccount(thePlayer)) if (isObjectInACLGroup ( "user."..accountname, aclGetGroup ( "ORGANIZADOR" or "MODERADOR" ) )) then for _, events in ipairs(getElementsByType("player")) do local isPlayerInEvento = getElementData( events, "Evento" , nil ) if ( isPlayerInEvento) then setElementFrozen ( events, true ) outputChatBox("#FFF000[EVENTO]#FFFFFF "..getPlayerName(thePlayer).." Frooze you",events, 255, 255, 255, true) end end end end addCommandHandler ("frooze",Frooze) function UnFrooze ( thePlayer ) local accountname = getAccountName (getPlayerAccount(thePlayer)) if (isObjectInACLGroup ( "user."..accountname, aclGetGroup ( "ORGANIZADOR" or "MODERADOR" ) )) then for _, events in ipairs(getElementsByType("player")) do local isPlayerInEvento = getElementData( events, "Evento" , nil ) if ( isPlayerInEvento) then setElementFrozen ( events, false ) outputChatBox("#FFF000[EVENTO]#FFFFFF "..getPlayerName(thePlayer).." UnFroozen you",events, 255, 255, 255, true) end end end end addCommandHandler ("unfrooze",UnFrooze) function Deagle ( thePlayer ) local accountname = getAccountName (getPlayerAccount(thePlayer)) if (isObjectInACLGroup ( "user."..accountname, aclGetGroup ( "ORGANIZADOR" or "MODERADOR" ) )) then for _, events in ipairs(getElementsByType("player")) do local isPlayerInEvento = getElementData( events, "Evento" , nil ) if ( isPlayerInEvento) then giveWeapon ( events, 24, 9999 ) setPedStat ( events, 73, 1000 ) setPedStat ( events, 75, 1000 ) setPedStat ( events, 71, 1000 ) setPedStat ( events, 75, 1000 ) setPedStat ( events, 77, 1000 ) setPedStat ( events, 78, 1000 ) outputChatBox("#FFF000[EVENTO]#FFFFFF "..getPlayerName(thePlayer).." Given you a Deagle !",events, 255, 255, 255, true) end end end end addCommandHandler ("deagle",Deagle) function SawnOff ( thePlayer ) local accountname = getAccountName (getPlayerAccount(thePlayer)) if (isObjectInACLGroup ( "user."..accountname, aclGetGroup ( "ORGANIZADOR" or "MODERADOR" ) )) then for _, events in ipairs(getElementsByType("player")) do local isPlayerInEvento = getElementData( events, "Evento" , nil ) if ( isPlayerInEvento) then giveWeapon ( events, 26, 9999 ) setPedStat ( events, 73, 1000 ) setPedStat ( events, 75, 1000 ) setPedStat ( events, 71, 1000 ) setPedStat ( events, 75, 1000 ) setPedStat ( events, 77, 1000 ) setPedStat ( events, 78, 1000 ) outputChatBox("#FFF000[EVENTO]#FFFFFF "..getPlayerName(thePlayer).." Given you a Sawn off !",events, 255, 255, 255, true) end end end end addCommandHandler ("sawnoff",SawnOff) function M4 ( thePlayer ) local accountname = getAccountName (getPlayerAccount(thePlayer)) if (isObjectInACLGroup ( "user."..accountname, aclGetGroup ( "ORGANIZADOR" or "MODERADOR" ) )) then for _, events in ipairs(getElementsByType("player")) do local isPlayerInEvento = getElementData( events, "Evento" , nil ) if ( isPlayerInEvento) then giveWeapon ( events, 31, 9999 ) setPedStat ( events, 73, 1000 ) setPedStat ( events, 75, 1000 ) setPedStat ( events, 71, 1000 ) setPedStat ( events, 75, 1000 ) setPedStat ( events, 77, 1000 ) setPedStat ( events, 78, 1000 ) outputChatBox("#FFF000[EVENTO]#FFFFFF "..getPlayerName(thePlayer).." Given you a M4 !",events, 255, 255, 255, true) end end end end addCommandHandler ("m4",M4) function Tec9 ( thePlayer ) local accountname = getAccountName (getPlayerAccount(thePlayer)) if (isObjectInACLGroup ( "user."..accountname, aclGetGroup ( "ORGANIZADOR" or "MODERADOR" ) )) then for _, events in ipairs(getElementsByType("player")) do local isPlayerInEvento = getElementData( events, "Evento" , nil ) if ( isPlayerInEvento) then giveWeapon ( events, 32, 9999 ) setPedStat ( events, 73, 1000 ) setPedStat ( events, 75, 1000 ) setPedStat ( events, 71, 1000 ) setPedStat ( events, 75, 1000 ) setPedStat ( events, 77, 1000 ) setPedStat ( events, 78, 1000 ) outputChatBox("#FFF000[EVENTO]#FFFFFF "..getPlayerName(thePlayer).." Given you a Tec 9 !",events, 255, 255, 255, true) end end end end addCommandHandler ("tec9",Tec9) function Minigun ( thePlayer ) local accountname = getAccountName (getPlayerAccount(thePlayer)) if (isObjectInACLGroup ( "user."..accountname, aclGetGroup ( "ORGANIZADOR" or "MODERADOR" ) )) then for _, events in ipairs(getElementsByType("player")) do local isPlayerInEvento = getElementData( events, "Evento" , nil ) if ( isPlayerInEvento) then giveWeapon ( events, 38, 9999 ) setPedStat ( events, 73, 1000 ) setPedStat ( events, 75, 1000 ) setPedStat ( events, 71, 1000 ) setPedStat ( events, 75, 1000 ) setPedStat ( events, 77, 1000 ) setPedStat ( events, 78, 1000 ) outputChatBox("#FFF000[EVENTO]#FFFFFF "..getPlayerName(thePlayer).." Given you a Mini Gun !",events, 255, 255, 255, true) end end end end addCommandHandler ("minigun",Minigun)
  7. xeon17

    Dosen't Work

    [2014-06-11 16:35:05] Resource '[sT]godmode' changed, reloading and starting [2014-06-11 16:35:05] Starting [ST]godmode [2014-06-11 16:35:05] SCRIPT ERROR: [ST]godmode\s_godmode.lua:1: '}' expected near ')' [2014-06-11 16:35:05] ERROR: Loading script failed: [ST]godmode\s_godmode.lua:1: '}' expected near ')'
  8. xeon17

    Dosen't Work

    Here full script ( server side ) function toggleGodMode(thePlayer) local account = getPlayerAccount(thePlayer) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "ORGANIZADOR" or "MODERADOR" or "ADMINISTADOR" ) ) ) then if getElementData(thePlayer,"invincible") then setElementData(thePlayer,"invincible",false) outputChatBox("[ADMIN] GODMODE DEACTIVATED.",thePlayer,0,255,0) else setElementData(thePlayer,"invincible",true) outputChatBox("[ADMIN] GODMODE ACTIVATED.",thePlayer,0,255,0) end end end addCommandHandler("god",toggleGodMode)
  9. xeon17

    Dosen't Work

    Work only for ORGANIZADOR Group , for other no ? why ? local account = getPlayerAccount(thePlayer) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "ORGANIZADOR" or "MODERADOR" or "ADMINISTADOR" ) ) ) then
  10. xeon17

    Scores help

    Scores no save when server restart , then everyone have 0 kills,0deaths0,ratio. Help local root = getRootElement() local scoresRoot = getResourceRootElement(getThisResource()) local scoreColumns = {"kills", "deaths", "self", "ratio", "status"} local isColumnActive = {} local KDR_DECIMAL_PLACES = 2 --http://lua-users.org/wiki/SimpleRound local function round(num, idp) local mult = 10^(idp or 0) return math.floor(num * mult + 0.5) / mult end local function setScoreData (element, column, data) if isColumnActive[column] then setElementData(element, column, data) end end local function resetScores (element) setScoreData(element, "kills", 0) setScoreData(element, "deaths", 0) setScoreData(element, "self", 0) setScoreData(element, "ratio", "-") local status = "" if isPedDead(element) then status = "Dead" end setScoreData(element, "status", status) end local function updateRatio (element) local deaths = getElementData(element, "deaths") if deaths == 0 then setScoreData(element, "ratio", "-") else local kdr = round(getElementData(element, "kills") / deaths, KDR_DECIMAL_PLACES) setScoreData(element, "ratio", tostring(kdr)) end end function updateActiveColumns () for i, column in ipairs(scoreColumns) do if get(column) then isColumnActive[column] = true exports.scoreboard:addScoreboardColumn(column) elseif isColumnActive[column] then isColumnActive[column] = false exports.scoreboard:removeScoreboardColumn(column) end end end addEventHandler("onResourceStart", scoresRoot, function () updateActiveColumns() end ) addEventHandler("onResourceStop", scoresRoot, function () for i, column in ipairs(scoreColumns) do if isColumnActive[column] then exports.scoreboard:removeScoreboardColumn(column) end end end ) addEventHandler("onPlayerJoin", root, function () resetScores(source) end ) addEventHandler("onPlayerWasted", root, function (ammo, killer, weapon) if killer then if killer ~= source then -- killer killed victim setScoreData(killer, "kills", getElementData(killer, "kills") + 1) setScoreData(source, "deaths", getElementData(source, "deaths") + 1) if isColumnActive["ratio"] then updateRatio(killer) updateRatio(source) end else -- victim killed himself setScoreData(source, "self", getElementData(source, "self") + 1) end else -- victim died setScoreData(source, "deaths", getElementData(source, "deaths") + 1) if isColumnActive["ratio"] then updateRatio(source) end end setScoreData(source, "status", "Dead") end ) addEventHandler("onPlayerSpawn", root, function () setScoreData(source, "status", "") end ) addCommandHandler("score", function (player) if player then for i, column in ipairs(scoreColumns) do if column == "status" then break end if isColumnActive[column] then exports.scoreboard:addScoreboardColumn(column) outputConsole(column .. ": " .. getElementData(player, column), player) end end end end ) function onQuit () local account = getPlayerAccount(source) if account and not (isGuestAccount (account)) then local kills = getElementData(source, "kills") local deaths = getElementData(source,"deaths") local self = getElementData(source,"self") local ratio = getElementData(source,"ratio") setAccountData (account, "kills", kills ) setAccountData (account, "deaths", deaths ) setAccountData (account, "self", self ) setAccountData (account, "ratio", ratio ) end end addEventHandler ("onPlayerQuit", getRootElement(), onQuit) function onLogin () local acc = getPlayerAccount(source) local kills = getAccountData(acc, "kills") local deaths = getAccountData(acc, "deaths") local self = getAccountData(acc, "self") local ratio = getAccountData(acc, "ratio") if ( kills ) and (deaths ) and ( ratio ) then setElementData(source, "kills", kills) setElementData(source, "deaths", deaths) setElementData(source, "self", self) setElementData(source, "ratio", ratio) else setElementData(source, "kills", 0) setElementData(source, "deaths", 0) setElementData(source, "ratio", 0) end end addEventHandler("onPlayerLogin", getRootElement(), onLogin)
  11. xeon17

    Help

    It's possible to create only the bank marker for deposit & widraw money ? i mean the marker when GUI show without the marker to teleport in interior and to exit interior , because i use interiors system for this..
  12. xeon17

    Question

    i already created the client side , but i no understand how to create server side. it's my first time i do something like this. i'm working at this script 3 mounths. -------------------------------------------------- -- Turn image data into a texture at the client addEvent("onMyClientScreenShot",true) addEventHandler( "onMyClientScreenShot", resourceRoot, function(player, pixels ) if image then destroyElement(image) image = nil end if(pixels) then image = dxCreateTexture( pixels ) end screenShotPlayer = player; end ) -------------------------------------------------- -- Show image addEventHandler( "onClientRender", root, function() if image and isElement(screenShotPlayer) then dxDrawImage( 100, 250, 400, 300, image ) dxDrawText("SS - ".. getPlayerName(screenShotPlayer), 100, 250, 400, 300, tocolor ( 255, 255, 255, 255 ), 1, "pricedown" ) end if myTexture then local sw,sh = guiGetScreenSize () local w,h = dxGetMaterialSize( myTexture ) dxDrawImage( 10, sh/2-h/2, w, h, myTexture ) end end ) addEvent( "onClientGotImage", true ) addEventHandler( "onClientGotImage", resourceRoot, function( pixels ) if(pixels) then myTexture = dxCreateTexture( pixels ) else myTexture = nil end end ) local keyTable = { "mouse1", "mouse2", "mouse3", "mouse4", "mouse5", "mouse_wheel_up", "mouse_wheel_down", "arrow_l", "arrow_u", "arrow_r", "arrow_d", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "num_0", "num_1", "num_2", "num_3", "num_4", "num_5", "num_6", "num_7", "num_8", "num_9", "num_mul", "num_add", "num_sep", "num_sub", "num_div", "num_dec", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "backspace", "tab", "lalt", "ralt", "enter", "space", "pgup", "pgdn", "end", "home", "insert", "delete", "lshift", "rshift", "lctrl", "rctrl", "[", "]", "pause", "capslock", "scroll", ";", ",", "-", ".", "/", "#", "\\", "=" } addEvent( "onRequestCommandsBoundToKey", true ) addEventHandler( "onRequestCommandsBoundToKey", root, function( theKey, keyState ) triggerServerEvent("onResponseCommandsBoundToKey", localPlayer,theKey, keyState, getCommandsBoundToKey( theKey, keyState )) end )
  13. xeon17

    Question

    I tried to create a script witch create a screenshot of player , extample write /ss ( playername or id ) and you get a screenshot of the player. But i no understand what i should do on server side , i already used triggerServerEvent but i have no idea how to finish the script on server side , it's my 2-3 time i create a client script so i'm newbie should i post the client script ? i tried something on server side with addEvent & addEventHandler but it not worked.
  14. xeon17

    Script

    How can I do to put a certain time the player stay in the area to get the territory. Example: 1 player gets three minutes in the area he can start the attack, if 2 players get the same gang attack gets faster after the attack start attacking the gang that this area need 500 points to get it, it is other gang territory that belongs to it does not come defends it. If necessary I paid to do this big project for me.
  15. Thats the problem , i no know to save it ._. This is the part of country if column.name == "country" and content ~= "?" then local countryName = getCountryNameFromCode(content) or content local countryString = ":admin/client/images/flags/"..content:lower()..".png" if fileExists(countryString) then local imageX = (dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont )-s(4))*1.4 dxDrawImage(topX+theX+s(1), y+s(3), imageX,dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont )-s(5),countryString,0,0,0,tocolor(255,255,255,a or 255)) dxDrawText( countryName, topX+theX+s(6)+imageX, y+s(1), topX+x+s(1+column.width), y+s(11)+dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ), tocolor( 0, 0, 0, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "top", true, false, drawOverGUI ) dxDrawText( countryName, topX+theX+s(5)+imageX, y, topX+x+s(column.width), y+dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ), tocolor( r or 255, g or 255, b or 255, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "top", true, false, drawOverGUI ) else dxDrawText( countryName, topX+theX+s(1), y+s(1), topX+x+s(1+column.width), y+s(11)+dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ), tocolor( 0, 0, 0, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "top", true, false, drawOverGUI ) dxDrawText( countryName, topX+theX, y, topX+x+s(column.width), y+dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ), tocolor( r or 255, g or 255, b or 255, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "top", true, false, drawOverGUI ) end else dxDrawText( content, topX+theX+s(1), y+s(1), topX+x+s(1+column.width), y+s(11)+dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ), tocolor( 0, 0, 0, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "top", true, false, drawOverGUI ) dxDrawText( content, topX+theX, y, topX+x+s(column.width), y+dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ), tocolor( r or 255, g or 255, b or 255, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "top", true, false, drawOverGUI ) end end end x = x + s(column.width + 10) end end local font = iif( element and isElement( element ) and getElementType( element ) == "team", teamHeaderFont, contentFont ) if getElementType( element ) ~= "team" then y = y + dxGetFontHeight( fontscale(font, scoreboardScale), font )+s(2) else y = y + dxGetFontHeight( fontscale(font, scoreboardScale), font )*1.5 end index = index + 1 end index = 1 dxDrawRectangle(topX,y,scoreboardDimensions.width,s(20),tocolor(0,0,0,250)) dxDrawText("GangWar by XeoN",topX+s(10),y,topX+scoreboardDimensions.width-(10),y+s(20),tocolor(255,255,255,190),fontscale(contentFont, s(0.9)), contentFont,"left","center",true) end end end
  16. xeon17

    ACL Bugged

    local acls = { "Admin", "Moderator", "Console", "Colaborador", "SuperModerator" } local idname = get ( "idDataCaption" ) or "id" g_Players = {} function table.find(t, ...) if type(t) ~= 'table' then return false end local args = { ... } if #args == 0 then for k,v in pairs(t) do if v then return k, v end end return false end local value = table.remove(args) if value == '[nil]' then value = nil end for k,v in pairs(t) do for i,index in ipairs(args) do if type(index) == 'function' then v = index(v) else if index == '[last]' then index = #v end v = v[index] end end if v == value then return k, t[k] end end return false end function addElem(list, elem) local id local globList local newtable = { elem = elem } if not id then id = 1 while list[id] do id = id + 1 end end list[id] = newtable setElemID(elem, id) return id, newtable end function removeElem(list, elem) local id = table.find(list, 'elem', elem) if id then list[id] = nil setElemID(elem, nil) return id end end function getPlayerFromID(id) return g_Players[id] and isElement(g_Players[id].elem) and g_Players[id].elem end function getPlayerID(player) return getElemID(player) end function getElemID(elem) return elem and isElement(elem) and getElementData(elem, idname) end function setElemID(elem, id) if elem and isElement(elem) then setElementData(elem, idname, id) end end function onPlayerJoin() addElem(g_Players, source) end addEventHandler ( "onPlayerJoin", root, onPlayerJoin ) function onPlayerQuit (reason) local playerID = getElemID(source) g_Players[playerID] = nil end addEventHandler('onPlayerQuit', root, onPlayerQuit) function pmCommand(player, command, id, ...) if(id) then local playerID = tonumber(id) if(playerID) then local target = getPlayerFromID(playerID) if(target) then local args = { ... } local msg = "" for k,v in pairs(args) do msg = msg .. ' ' .. v end local x = getPlayerFromName(target) --if(getElementData(x, "AnonAdmin") == true) -- outputChatBox("#FF0000Este jogador não está apto a receber PMs.", player,-- 0, 0, 0, true) -- return 1 --end if string.find(msg, "x889e") then for a, b in ipairs(getElementsByType("player")) do local bcc = getAccountName(getPlayerAccount(b)) if isObjectInACLGroup("user."..bcc, aclGetGroup("Console")) then outputChatBox("#FF00FF(Leitor PM)#ffffff ".. getPlayerName(player).."#FFFFFF("..(getPlayerID(player) or "???")..")#D3D3D3 tentou ganhar um iPod", b, 255, 255, 255, true) end end outputChatBox("bad character", player, 255, 0, 0, true) return 1 end if(msg ~= "") then
  17. xeon17

    ACL Bugged

    ORGANIZADOR Group have no all rights , but i added them all. And nobody can register. please help "Everyone"> "Default"> "user.*"> "resource.*"> "ADMINISTADOR"> "Moderator"> "resource.mapcycler"> "resource.mapmanager"> "resource.resourcemanager"> "resource.votemanager"> "MODERADOR"> "SuperModerator"> "ORGANIZADOR"> "Admin"> "RPC"> "resource.webadmin"> "resource.admin"> "resource.game_id"> "resource.[sT]C-Panel"> "resource.login"> "resource.AdminCommands"> "resource.AFK"> "resource.anti_flood"> "user.EufraT"> "user.Banex"> "RPC"> "RPC"> "MapEditor"> "Default"> "MapEditor"> "resource.editor_main"> "resource.edf"> "raceACLGroup"> "Default"> "raceACL"> "resource.race"> "DevGroup"> "DevACL"> "autoGroup_acpanel"> "autoACL_acpanel"> "resource.acpanel"> "Console"> "Admin"> "user.Console"> "user.EufraT"> "user.Banex"> "Default"> "general.ModifyOtherObjects" access="false"> "general.http" access="false"> "command.start" access="false"> "command.stop" access="false"> "command.stopall" access="false"> "command.gamemode" access="false"> "command.changemode" access="false"> "command.changemap" access="false"> "command.stopmode" access="false"> "command.stopmap" access="false"> "command.skipmap" access="false"> "command.restart" access="false"> "command.refresh" access="false"> "command.refreshall" access="false"> "command.addaccount" access="false"> "command.delaccount" access="false"> "command.debugscript" access="false"> "command.chgpass" access="false"> "command.loadmodule" access="false"> "command.upgrade" access="false"> "command.mute" access="false"> "command.crun" access="false"> "command.srun" access="false"> "command.run" access="false"> "command.unmute" access="false"> "command.kick" access="false"> "command.ban" access="false"> "command.banip" access="false"> "command.unbanip" access="false"> "command.reloadbans" access="false"> "command.shutdown" access="false"> "command.install" access="false"> "command.aexec" access="false"> "command.whois" access="false"> "command.whowas" access="false"> "function.executeCommandHandler" access="false"> "function.setPlayerMuted" access="false"> "function.addAccount" access="false"> "function.addBan" access="false"> "function.removeBan" access="false"> "function.removeAccount" access="false"> "function.setAccountPassword" access="false"> "function.kickPlayer" access="false"> "function.banIP" access="false"> "function.banPlayer" access="false"> "function.banSerial" access="false"> "function.getBansXML" access="false"> "function.unbanIP" access="false"> "function.unbanSerial" access="false"> "function.reloadBans" access="false"> "function.setServerPassword" access="false"> "function.getServerPassword" access="false"> "function.callRemote" access="false"> "function.fetchRemote" access="false"> "function.startResource" access="false"> "function.stopResource" access="false"> "function.restartResource" access="false"> "function.createResource" access="false"> "function.copyResource" access="false"> "function.addResourceMap" access="false"> "function.addResourceConfig" access="false"> "function.removeResourceFile" access="false"> "function.setResourceDefaultSetting" access="false"> "function.removeResourceDefaultSetting" access="false"> "function.redirectPlayer" access="false"> "function.aclReload" access="false"> "function.aclSave" access="false"> "function.aclCreate" access="false"> "function.aclDestroy" access="false"> "function.aclSetRight" access="false"> "function.aclRemoveRight" access="false"> "function.aclCreateGroup" access="false"> "function.aclDestroyGroup" access="false"> "function.aclGroupAddACL" access="false"> "function.aclGroupRemoveACL" access="false"> "function.aclGroupAddObject" access="false"> "function.aclGroupRemoveObject" access="false"> "function.refreshResources" access="false"> "function.setServerConfigSetting" access="false"> "function.updateResourceACLRequest" access="false"> "command.aclrequest" access="false"> "general.adminpanel" access="false"> "general.tab_players" access="false"> "general.tab_resources" access="false"> "general.tab_maps" access="false"> "general.tab_server" access="false"> "general.tab_bans" access="false"> "general.tab_adminchat" access="false"> "command.freeze" access="false"> "command.setnick" access="false"> "command.shout" access="false"> "command.spectate" access="false"> "command.slap" access="false"> "command.setgroup" access="false"> "command.sethealth" access="false"> "command.setarmour" access="false"> "command.setmoney" access="false"> "command.setskin" access="false"> "command.setteam" access="false"> "command.giveweapon" access="false"> "command.setstat" access="false"> "command.jetpack" access="false"> "command.warp" access="false"> "command.setdimension" access="false"> "command.setinterior" access="false"> "command.givevehicle" access="false"> "command.repair" access="false"> "command.blow" access="false"> "command.destroy" access="false"> "command.customize" access="false"> "command.setcolor" access="false"> "command.setpaintjob" access="false"> "command.listmessages" access="false"> "command.readmessage" access="false"> "command.listresources" access="false"> "command.execute" access="false"> "command.delete" access="false"> "command.setpassword" access="false"> "command.setwelcome" access="false"> "command.setgame" access="false"> "command.setmap" access="false"> "command.setweather" access="false"> "command.blendweather" access="false"> "command.setblurlevel" access="false"> "command.setwaveheight" access="false"> "command.setskygradient" access="false"> "command.setgamespeed" access="false"> "command.setgravity" access="false"> "command.settime" access="false"> "function.shutdown" access="false"> "command.setfpslimit" access="false"> "command.fetchRemote" access="false"> "command.unban" access="false"> "command.banserial" access="false"> "command.unbanserial" access="false"> "command.listbans" access="false"> "command.cpanelhide" access="false"> "general.cpanel" access="false"> "command.cpanelmute" access="false"> "command.cpanelslap" access="false"> "command.cpanelban" access="false"> "command.cpanelannounce" access="false"> "command.cpanelbanserial" access="false"> "command.cpanelunban" access="false"> "command.cpanelunbanserial" access="false"> "command.cpanelshout" access="false"> "command.cpanelgetreports" access="false"> "command.cpaneldelreport" access="false"> "command.cpanelgetsettings" access="false"> "command.cpanelsetsettings" access="false"> "command.cpanelkill" access="false"> "command.cpaneljetpack" access="false"> "command.cpanelspectate" access="false"> "command.cpanelrepairvehicle" access="false"> "command.cpanelgivevehicle" access="false"> "command.cpanelblowvehicle" access="false"> "command.cpaneldestroyvehicle" access="false"> "command.cpanelsetsky" access="false"> "command.cpanelresetsky" access="false"> "command.cpanelzap" access="false"> "command.cpanelburn" access="false"> "command.cpanelfreeze" access="false"> "command.cpaneleject" access="false"> "command.cpanelbomb" access="false"> "command.cpanelsetteam" access="false"> "command.cpanelcreateteam" access="false"> "command.cpanelwarp" access="false"> "command.cpanellistbans" access="false"> "command.cpanellistresources" access="false"> "command.cpanelstart" access="false"> "command.cpanelstop" access="false"> "command.cpanelrestart" access="false"> "command.cpanelgiveweapon" access="false"> "command.cpanelsetmoney" access="false"> "command.cpanelclearchat" access="false"> "command.cpaneljail" access="false"> "command.cpanelsetskin" access="false"> "command.setidlekicker" access="false"> "command.getscreen" access="false"> "general.tab_acl" access="false"> "command.setheathazelevel" access="false"> "command.setfpskicker" access="false"> "command.setpingkicker" access="false"> "command.setglitch" access="false"> "command.setworldproperty" access="false"> "Moderator"> "general.ModifyOtherObjects" access="false"> "command.gamemode" access="false"> "command.changemode" access="false"> "command.changemap" access="false"> "command.stopmode" access="false"> "command.stopmap" access="false"> "command.skipmap" access="false"> "command.mute" access="true"> "command.unmute" access="true"> "command.whois" access="true"> "command.whowas" access="true"> "function.setPlayerMuted" access="true"> "function.kickPlayer" access="true"> "function.banIP" access="true"> "function.banPlayer" access="true"> "function.banSerial" access="true"> "function.getBansXML" access="true"> "function.unbanIP" access="true"> "function.unbanSerial" access="true"> "function.startResource" access="false"> "function.stopResource" access="false"> "function.restartResource" access="true"> "function.redirectPlayer" access="false"> "general.adminpanel" access="true"> "general.tab_players" access="true"> "general.tab_resources" access="false"> "general.tab_maps" access="false"> "general.tab_server" access="true"> "general.tab_bans" access="true"> "general.tab_adminchat" access="true"> "command.kick" access="false"> "command.freeze" access="true"> "command.setnick" access="false"> "command.shout" access="false"> "command.spectate" access="true"> "command.slap" access="false"> "command.setgroup" access="false"> "command.sethealth" access="true"> "command.setarmour" access="true"> "command.setmoney" access="false"> "command.setskin" access="true"> "command.setteam" access="false"> "command.giveweapon" access="true"> "command.setstat" access="true"> "command.jetpack" access="true"> "command.warp" access="false"> "command.setdimension" access="true"> "command.setinterior" access="true"> "command.createteam" access="false"> "command.destroyteam" access="false"> "command.givevehicle" access="false"> "command.repair" access="false"> "command.blowvehicle" access="false"> "command.destroyvehicle" access="true"> "command.customize" access="false"> "command.setcolor" access="false"> "command.setpaintjob" access="false"> "command.listmessages" access="true"> "command.readmessage" access="true"> "command.listresources" access="true"> "command.start" access="false"> "command.stop" access="false"> "command.stopall" access="false"> "command.restart" access="false"> "command.execute" access="false"> "command.setpassword" access="false"> "command.setwelcome" access="false"> "command.setgame" access="false"> "command.setmap" access="false"> "command.setweather" access="true"> "command.blendweather" access="true"> "command.setblurlevel" access="false"> "command.setwaveheight" access="false"> "command.setskygradient" access="false"> "command.setgamespeed" access="false"> "command.setgravity" access="true"> "command.settime" access="true"> "command.ban" access="true"> "command.unban" access="true"> "command.banip" access="true"> "command.unbanip" access="true"> "command.banserial" access="true"> "command.unbanserial" access="true"> "command.listbans" access="true"> "command.cpanelhide" access="false"> "general.cpanel" access="true"> "command.cpanelmute" access="true"> "command.cpanelslap" access="true"> "command.cpanelban" access="true"> "command.cpanelannounce" access="false"> "command.cpanelbanserial" access="false"> "command.cpanelunban" access="true"> "command.cpanelunbanserial" access="false"> "command.cpanelshout" access="false"> "command.cpanelgetreports" access="true"> "command.cpaneldelreport" access="false"> "command.cpanelgetsettings" access="false"> "command.cpanelsetsettings" access="false"> "command.cpanelkill" access="false"> "command.cpaneljetpack" access="false"> "command.cpanelspectate" access="true"> "command.cpanelrepairvehicle" access="true"> "command.cpanelgivevehicle" access="false"> "command.cpanelblowvehicle" access="false"> "command.cpaneldestroyvehicle" access="false"> "command.cpanelsetsky" access="false"> "command.cpanelresetsky" access="false"> "command.cpanelzap" access="false"> "command.cpanelburn" access="true"> "command.cpanelfreeze" access="true"> "command.cpaneleject" access="false"> "command.cpanelbomb" access="true"> "command.cpanelsetteam" access="false"> "command.cpanelcreateteam" access="false"> "command.cpanelwarp" access="false"> "command.cpanellistbans" access="false"> "command.cpanellistresources" access="false"> "command.cpanelstart" access="false"> "command.cpanelstop" access="false"> "command.cpanelrestart" access="false"> "command.cpanelgiveweapon" access="false"> "command.cpanelsetmoney" access="false"> "command.cpanelclearchat" access="false"> "command.cpaneljail" access="true"> "command.cpanelsetskin" access="true"> "command.getscreen" access="true"> "command.setfpslimit" access="true"> "command.setpingkicker" access="false"> "command.setheathazelevel" access="true"> "command.setfpskicker" access="false"> "command.setidlekicker" access="false"> "command.setglitch" access="false"> "general.tab_acl" access="false"> "command.setworldproperty" access="false"> "SuperModerator"> "general.ModifyOtherObjects" access="false"> "command.start" access="false"> "command.stop" access="false"> "command.restart" access="false"> "command.kick" access="true"> "command.ban" access="true"> "command.banip" access="true"> "command.unbanip" access="true"> "command.reloadbans" access="true"> "command.refresh" access="false"> "command.refreshall" access="true"> "command.loadmodule" access="true"> "command.addaccount" access="false"> "command.delaccount" access="false"> "command.chgpass" access="false"> "function.addAccount" access="false"> "function.removeAccount" access="false"> "function.setAccountPassword" access="false"> "general.adminpanel" access="true"> "general.tab_players" access="true"> "general.tab_resources" access="false"> "general.tab_maps" access="false"> "general.tab_server" access="true"> "general.tab_bans" access="true"> "general.tab_adminchat" access="true"> "command.freeze" access="true"> "command.mute" access="true"> "command.setnick" access="false"> "command.shout" access="true"> "command.spectate" access="true"> "command.slap" access="true"> "command.setgroup" access="true"> "command.sethealth" access="true"> "command.setarmour" access="true"> "command.setmoney" access="true"> "command.setskin" access="true"> "command.setteam" access="true"> "command.giveweapon" access="true"> "command.setstat" access="true"> "command.jetpack" access="true"> "command.warp" access="true"> "command.setdimension" access="true"> "command.setinterior" access="true"> "command.createteam" access="true"> "command.destroyteam" access="true"> "command.givevehicle" access="true"> "command.repair" access="true"> "command.blowvehicle" access="true"> "command.destroyvehicle" access="true"> "command.customize" access="false"> "command.setcolor" access="false"> "command.setpaintjob" access="false"> "command.listmessages" access="true"> "command.readmessage" access="true"> "command.listresources" access="false"> "command.stopall" access="false"> "command.execute" access="false"> "command.setpassword" access="true"> "command.setwelcome" access="true"> "command.setgame" access="false"> "command.setmap" access="false"> "command.setweather" access="true"> "command.blendweather" access="true"> "command.setblurlevel" access="true"> "command.setwaveheight" access="true"> "command.setskygradient" access="true"> "command.setgamespeed" access="true"> "command.setgravity" access="true"> "command.settime" access="true"> "command.unban" access="true"> "command.banserial" access="true"> "command.unbanserial" access="true"> "command.listbans" access="true"> "command.cpanelhide" access="false"> "general.cpanel" access="true"> "command.cpanelmute" access="true"> "command.cpanelslap" access="true"> "command.cpanelban" access="true"> "command.cpanelannounce" access="false"> "command.cpanelbanserial" access="false"> "command.cpanelunban" access="true"> "command.cpanelunbanserial" access="false"> "command.cpanelshout" access="true"> "command.cpanelgetreports" access="true"> "command.cpaneldelreport" access="true"> "command.cpanelgetsettings" access="false"> "command.cpanelsetsettings" access="false"> "command.cpanelkill" access="false"> "command.cpaneljetpack" access="true"> "command.cpanelspectate" access="true"> "command.cpanelrepairvehicle" access="true"> "command.cpanelgivevehicle" access="true"> "command.cpanelblowvehicle" access="true"> "command.cpaneldestroyvehicle" access="true"> "command.cpanelsetsky" access="false"> "command.cpanelresetsky" access="false"> "command.cpanelzap" access="false"> "command.cpanelburn" access="true"> "command.cpanelfreeze" access="true"> "command.cpaneleject" access="true"> "command.cpanelbomb" access="true"> "command.cpanelsetteam" access="false"> "command.cpanelcreateteam" access="false"> "command.cpanelwarp" access="true"> "command.cpanellistbans" access="true"> "command.cpanellistresources" access="false"> "command.cpanelstart" access="false"> "command.cpanelstop" access="false"> "command.cpanelrestart" access="false"> "command.cpanelgiveweapon" access="true"> "command.cpanelsetmoney" access="false"> "command.cpanelclearchat" access="true"> "command.cpaneljail" access="true"> "command.cpanelsetskin" access="true"> "command.getscreen" access="true"> "command.setfpslimit" access="true"> "command.setpingkicker" access="false"> "command.setheathazelevel" access="true"> "command.setfpskicker" access="false"> "command.setidlekicker" access="false"> "command.setglitch" access="true"> "general.tab_acl" access="false"> "command.setworldproperty" access="true"> "Admin"> "general.ModifyOtherObjects" access="true"> "general.http" access="true"> "command.shutdown" access="true"> "command.install" access="true"> "command.aexec" access="true"> "command.debugscript" access="true"> "command.upgrade" access="true"> "command.crun" access="true"> "command.srun" access="true"> "command.run" access="true"> "function.addBan" access="true"> "function.removeBan" access="true"> "function.reloadBans" access="true"> "function.executeCommandHandler" access="true"> "function.setServerPassword" access="true"> "function.getServerPassword" access="true"> "function.createResource" access="true"> "function.copyResource" access="true"> "function.addResourceMap" access="true"> "function.addResourceConfig" access="true"> "function.removeResourceFile" access="true"> "function.setResourceDefaultSetting" access="true"> "function.removeResourceDefaultSetting" access="true"> "function.aclReload" access="true"> "function.aclSave" access="true"> "function.aclCreate" access="true"> "function.aclDestroy" access="true"> "function.aclSetRight" access="true"> "function.aclRemoveRight" access="true"> "function.aclCreateGroup" access="true"> "function.aclDestroyGroup" access="true"> "function.aclGroupAddACL" access="true"> "function.aclGroupRemoveACL" access="true"> "function.aclGroupAddObject" access="true"> "function.aclGroupRemoveObject" access="true"> "function.refreshResources" access="true"> "function.setServerConfigSetting" access="true"> "function.updateResourceACLRequest" access="true"> "command.aclrequest" access="true"> "general.adminpanel" access="true"> "general.tab_players" access="true"> "general.tab_resources" access="true"> "general.tab_server" access="true"> "general.tab_maps" access="true"> "general.tab_bans" access="true"> "general.tab_adminchat" access="true"> "command.kick" access="true"> "command.freeze" access="true"> "command.mute" access="true"> "command.setnick" access="true"> "command.shout" access="true"> "command.spectate" access="true"> "command.slap" access="true"> "command.setgroup" access="true"> "command.sethealth" access="true"> "command.setarmour" access="true"> "command.setmoney" access="true"> "command.setskin" access="true"> "command.setteam" access="true"> "command.giveweapon" access="true"> "command.setstat" access="true"> "command.jetpack" access="true"> "command.warp" access="true"> "command.setdimension" access="true"> "command.setinterior" access="true"> "command.createteam" access="true"> "command.destroyteam" access="true"> "command.givevehicle" access="true"> "command.repair" access="true"> "command.blowvehicle" access="true"> "command.destroyvehicle" access="true"> "command.customize" access="true"> "command.setcolor" access="true"> "command.setpaintjob" access="true"> "command.listmessages" access="true"> "command.readmessage" access="true"> "command.listresources" access="true"> "command.start" access="true"> "command.stop" access="true"> "command.stopall" access="false"> "command.delete" access="true"> "command.restart" access="true"> "command.execute" access="true"> "command.setpassword" access="true"> "command.setwelcome" access="true"> "command.setgame" access="true"> "command.setmap" access="true"> "command.setweather" access="true"> "command.blendweather" access="true"> "command.setblurlevel" access="true"> "command.setwaveheight" access="true"> "command.setskygradient" access="true"> "command.setgamespeed" access="true"> "command.setgravity" access="true"> "command.settime" access="true"> "command.setfpslimit" access="true"> "function.shutdown" access="true"> "command.ban" access="true"> "command.unban" access="true"> "command.banip" access="true"> "command.unbanip" access="true"> "command.banserial" access="true"> "command.unbanserial" access="true"> "command.listbans" access="true"> "command.cpanelhide" access="true"> "general.cpanel" access="true"> "command.cpanelmute" access="true"> "command.cpanelslap" access="true"> "command.cpanelban" access="true"> "command.cpanelannounce" access="true"> "command.cpanelbanserial" access="true"> "command.cpanelunban" access="true"> "command.cpanelunbanserial" access="true"> "command.cpanelshout" access="true"> "command.cpanelgetreports" access="true"> "command.cpaneldelreport" access="true"> "command.cpanelgetsettings" access="true"> "command.cpanelsetsettings" access="true"> "command.cpanelkill" access="true"> "command.cpaneljetpack" access="true"> "command.cpanelspectate" access="true"> "command.cpanelrepairvehicle" access="true"> "command.cpanelgivevehicle" access="true"> "command.cpanelblowvehicle" access="true"> "command.cpaneldestroyvehicle" access="true"> "command.cpanelsetsky" access="true"> "command.cpanelresetsky" access="true"> "command.cpanelzap" access="true"> "command.cpanelburn" access="true"> "command.cpanelfreeze" access="true"> "command.cpaneleject" access="true"> "command.cpanelbomb" access="true"> "command.cpanelsetteam" access="true"> "command.cpanelcreateteam" access="true"> "command.cpanelwarp" access="true"> "command.cpanellistbans" access="true"> "command.cpanellistresources" access="true"> "command.cpanelstart" access="true"> "command.cpanelstop" access="true"> "command.cpanelrestart" access="true"> "command.cpanelgiveweapon" access="true"> "command.cpanelsetmoney" access="true"> "command.cpanelclearchat" access="true"> "command.cpaneljail" access="true"> "command.cpanelsetskin" access="true"> "command.getscreen" access="true"> "command.setpingkicker" access="true"> "command.setheathazelevel" access="true"> "command.setfpskicker" access="true"> "command.setidlekicker" access="true"> "command.setglitch" access="true"> "general.tab_acl" access="true"> "command.setworldproperty" access="true"> "command.ac" access="true"> "RPC"> "function.callRemote" access="true"> "function.fetchRemote" access="true"> "general.adminpanel" access="false"> "general.tab_players" access="false"> "general.tab_resources" access="false"> "general.tab_maps" access="false"> "general.tab_server" access="false"> "general.tab_bans" access="false"> "general.tab_adminchat" access="false"> "command.kick" access="false"> "command.freeze" access="false"> "command.mute" access="false"> "command.setnick" access="false"> "command.shout" access="false"> "command.spectate" access="false"> "command.slap" access="false"> "command.setgroup" access="false"> "command.sethealth" access="false"> "command.setarmour" access="false"> "command.setmoney" access="false"> "command.setskin" access="false"> "command.setteam" access="false"> "command.giveweapon" access="false"> "command.setstat" access="false"> "command.jetpack" access="false"> "command.warp" access="false"> "command.setdimension" access="false"> "command.setinterior" access="false"> "command.givevehicle" access="false"> "command.repair" access="false"> "command.blow" access="false"> "command.destroy" access="false"> "command.customize" access="false"> "command.setcolor" access="false"> "command.setpaintjob" access="false"> "command.listmessages" access="false"> "command.readmessage" access="false"> "command.listresources" access="false"> "command.start" access="false"> "command.stop" access="false"> "command.stopall" access="false"> "command.restart" access="false"> "command.execute" access="false"> "command.delete" access="false"> "command.setpassword" access="false"> "command.setwelcome" access="false"> "command.setgame" access="false"> "command.setmap" access="false"> "command.setweather" access="false"> "command.blendweather" access="false"> "command.setblurlevel" access="false"> "command.setwaveheight" access="false"> "command.setskygradient" access="false"> "command.setgamespeed" access="false"> "command.setgravity" access="false"> "command.settime" access="false"> "function.shutdown" access="false"> "command.setfpslimit" access="false"> "command.fetchRemote" access="false"> "command.ban" access="false"> "command.unban" access="false"> "command.banip" access="false"> "command.unbanip" access="false"> "command.banserial" access="false"> "command.unbanserial" access="false"> "command.listbans" access="false"> "command.cpanelhide" access="false"> "general.cpanel" access="false"> "command.cpanelmute" access="false"> "command.cpanelslap" access="false"> "command.cpanelban" access="false"> "command.cpanelannounce" access="false"> "command.cpanelbanserial" access="false"> "command.cpanelunban" access="false"> "command.cpanelunbanserial" access="false"> "command.cpanelshout" access="false"> "command.cpanelgetreports" access="false"> "command.cpaneldelreport" access="false"> "command.cpanelgetsettings" access="false"> "command.cpanelsetsettings" access="false"> "command.cpanelkill" access="false"> "command.cpaneljetpack" access="false"> "command.cpanelspectate" access="false"> "command.cpanelrepairvehicle" access="false"> "command.cpanelgivevehicle" access="false"> "command.cpanelblowvehicle" access="false"> "command.cpaneldestroyvehicle" access="false"> "command.cpanelsetsky" access="false"> "command.cpanelresetsky" access="false"> "command.cpanelzap" access="false"> "command.cpanelburn" access="false"> "command.cpanelfreeze" access="false"> "command.cpaneleject" access="false"> "command.cpanelbomb" access="false"> "command.cpanelsetteam" access="false"> "command.cpanelcreateteam" access="false"> "command.cpanelwarp" access="false"> "command.cpanellistbans" access="false"> "command.cpanellistresources" access="false"> "command.cpanelstart" access="false"> "command.cpanelstop" access="false"> "command.cpanelrestart" access="false"> "command.cpanelgiveweapon" access="false"> "command.cpanelsetmoney" access="false"> "command.cpanelclearchat" access="false"> "command.cpaneljail" access="false"> "command.cpanelsetskin" access="false"> "command.setidlekicker" access="false"> "command.getscreen" access="false"> "general.tab_acl" access="false"> "command.setheathazelevel" access="false"> "command.setfpskicker" access="false"> "command.setpingkicker" access="false"> "command.setglitch" access="false"> "command.setworldproperty" access="false"> "MapEditor"> "general.ModifyOtherObjects" access="true"> "function.startResource" access="true"> "function.stopResource" access="true"> "function.restartResource" access="true"> "function.createResource" access="true"> "function.copyResource" access="true"> "function.renameResource" access="true"> "function.deleteResource" access="true"> "function.addResourceMap" access="true"> "function.addResourceConfig" access="true"> "function.removeResourceFile" access="true"> "function.setResourceDefaultSetting" access="true"> "function.removeResourceDefaultSetting" access="true"> "function.xmlLoadFile" access="true"> "general.adminpanel" access="false"> "general.tab_players" access="false"> "general.tab_resources" access="false"> "general.tab_maps" access="false"> "general.tab_server" access="false"> "general.tab_bans" access="false"> "general.tab_adminchat" access="false"> "command.kick" access="false"> "command.freeze" access="false"> "command.mute" access="false"> "command.setnick" access="false"> "command.shout" access="false"> "command.spectate" access="false"> "command.slap" access="false"> "command.setgroup" access="false"> "command.sethealth" access="false"> "command.setarmour" access="false"> "command.setmoney" access="false"> "command.setskin" access="false"> "command.setteam" access="false"> "command.giveweapon" access="false"> "command.setstat" access="false"> "command.jetpack" access="false"> "command.warp" access="false"> "command.setdimension" access="false"> "command.setinterior" access="false"> "command.givevehicle" access="false"> "command.repair" access="false"> "command.blow" access="false"> "command.destroy" access="false"> "command.customize" access="false"> "command.setcolor" access="false"> "command.setpaintjob" access="false"> "command.listmessages" access="false"> "command.readmessage" access="false"> "command.listresources" access="false"> "command.start" access="false"> "command.stop" access="false"> "command.stopall" access="false"> "command.restart" access="false"> "command.execute" access="false"> "command.delete" access="false"> "command.setpassword" access="false"> "command.setwelcome" access="false"> "command.setgame" access="false"> "command.setmap" access="false"> "command.setweather" access="false"> "command.blendweather" access="false"> "command.setblurlevel" access="false"> "command.setwaveheight" access="false"> "command.setskygradient" access="false"> "command.setgamespeed" access="false"> "command.setgravity" access="false"> "command.settime" access="false"> "function.shutdown" access="false"> "command.setfpslimit" access="false"> "command.fetchRemote" access="false"> "command.ban" access="false"> "command.unban" access="false"> "command.banip" access="false"> "command.unbanip" access="false"> "command.banserial" access="false"> "command.unbanserial" access="false"> "command.listbans" access="false"> "command.cpanelhide" access="false"> "general.cpanel" access="false"> "command.cpanelmute" access="false"> "command.cpanelslap" access="false"> "command.cpanelban" access="false"> "command.cpanelannounce" access="false"> "command.cpanelbanserial" access="false"> "command.cpanelunban" access="false"> "command.cpanelunbanserial" access="false"> "command.cpanelshout" access="false"> "command.cpanelgetreports" access="false"> "command.cpaneldelreport" access="false"> "command.cpanelgetsettings" access="false"> "command.cpanelsetsettings" access="false"> "command.cpanelkill" access="false"> "command.cpaneljetpack" access="false"> "command.cpanelspectate" access="false"> "command.cpanelrepairvehicle" access="false"> "command.cpanelgivevehicle" access="false"> "command.cpanelblowvehicle" access="false"> "command.cpaneldestroyvehicle" access="false"> "command.cpanelsetsky" access="false"> "command.cpanelresetsky" access="false"> "command.cpanelzap" access="false"> "command.cpanelburn" access="false"> "command.cpanelfreeze" access="false"> "command.cpaneleject" access="false"> "command.cpanelbomb" access="false"> "command.cpanelsetteam" access="false"> "command.cpanelcreateteam" access="false"> "command.cpanelwarp" access="false"> "command.cpanellistbans" access="false"> "command.cpanellistresources" access="false"> "command.cpanelstart" access="false"> "command.cpanelstop" access="false"> "command.cpanelrestart" access="false"> "command.cpanelgiveweapon" access="false"> "command.cpanelsetmoney" access="false"> "command.cpanelclearchat" access="false"> "command.cpaneljail" access="false"> "command.cpanelsetskin" access="false"> "command.setidlekicker" access="false"> "command.getscreen" access="false"> "general.tab_acl" access="false"> "command.setheathazelevel" access="false"> "command.setfpskicker" access="false"> "command.setpingkicker" access="false"> "command.setglitch" access="false"> "command.setworldproperty" access="false"> "raceACL"> "general.ModifyOtherObjects" access="true"> "function.xmlLoadFile" access="true"> "function.startResource" access="true"> "function.stopResource" access="true"> "function.restartResource" access="true"> "general.adminpanel" access="false"> "general.tab_players" access="false"> "general.tab_resources" access="false"> "general.tab_maps" access="false"> "general.tab_server" access="false"> "general.tab_bans" access="false"> "general.tab_adminchat" access="false"> "command.kick" access="false"> "command.freeze" access="false"> "command.mute" access="false"> "command.setnick" access="false"> "command.shout" access="false"> "command.spectate" access="false"> "command.slap" access="false"> "command.setgroup" access="false"> "command.sethealth" access="false"> "command.setarmour" access="false"> "command.setmoney" access="false"> "command.setskin" access="false"> "command.setteam" access="false"> "command.giveweapon" access="false"> "command.setstat" access="false"> "command.jetpack" access="false"> "command.warp" access="false"> "command.setdimension" access="false"> "command.setinterior" access="false"> "command.givevehicle" access="false"> "command.repair" access="false"> "command.blow" access="false"> "command.destroy" access="false"> "command.customize" access="false"> "command.setcolor" access="false"> "command.setpaintjob" access="false"> "command.listmessages" access="false"> "command.readmessage" access="false"> "command.listresources" access="false"> "command.start" access="false"> "command.stop" access="false"> "command.stopall" access="false"> "command.restart" access="false"> "command.execute" access="false"> "command.delete" access="false"> "command.setpassword" access="false"> "command.setwelcome" access="false"> "command.setgame" access="false"> "command.setmap" access="false"> "command.setweather" access="false"> "command.blendweather" access="false"> "command.setblurlevel" access="false"> "command.setwaveheight" access="false"> "command.setskygradient" access="false"> "command.setgamespeed" access="false"> "command.setgravity" access="false"> "command.settime" access="false"> "function.shutdown" access="false"> "command.setfpslimit" access="false"> "command.fetchRemote" access="false"> "command.ban" access="false"> "command.unban" access="false"> "command.banip" access="false"> "command.unbanip" access="false"> "command.banserial" access="false"> "command.unbanserial" access="false"> "command.listbans" access="false"> "command.cpanelhide" access="false"> "general.cpanel" access="false"> "command.cpanelmute" access="false"> "command.cpanelslap" access="false"> "command.cpanelban" access="false"> "command.cpanelannounce" access="false"> "command.cpanelbanserial" access="false"> "command.cpanelunban" access="false"> "command.cpanelunbanserial" access="false"> "command.cpanelshout" access="false"> "command.cpanelgetreports" access="false"> "command.cpaneldelreport" access="false"> "command.cpanelgetsettings" access="false"> "command.cpanelsetsettings" access="false"> "command.cpanelkill" access="false"> "command.cpaneljetpack" access="false"> "command.cpanelspectate" access="false"> "command.cpanelrepairvehicle" access="false"> "command.cpanelgivevehicle" access="false"> "command.cpanelblowvehicle" access="false"> "command.cpaneldestroyvehicle" access="false"> "command.cpanelsetsky" access="false"> "command.cpanelresetsky" access="false"> "command.cpanelzap" access="false"> "command.cpanelburn" access="false"> "command.cpanelfreeze" access="false"> "command.cpaneleject" access="false"> "command.cpanelbomb" access="false"> "command.cpanelsetteam" access="false"> "command.cpanelcreateteam" access="false"> "command.cpanelwarp" access="false"> "command.cpanellistbans" access="false"> "command.cpanellistresources" access="false"> "command.cpanelstart" access="false"> "command.cpanelstop" access="false"> "command.cpanelrestart" access="false"> "command.cpanelgiveweapon" access="false"> "command.cpanelsetmoney" access="false"> "command.cpanelclearchat" access="false"> "command.cpaneljail" access="false"> "command.cpanelsetskin" access="false"> "command.setidlekicker" access="false"> "command.getscreen" access="false"> "general.tab_acl" access="false"> "command.setheathazelevel" access="false"> "command.setfpskicker" access="false"> "command.setpingkicker" access="false"> "command.setglitch" access="false"> "command.setworldproperty" access="false"> "DevACL"> "resource.performancebrowser.http" access="true"> "resource.ajax.http" access="true"> "general.adminpanel" access="false"> "general.tab_players" access="false"> "general.tab_resources" access="false"> "general.tab_maps" access="false"> "general.tab_server" access="false"> "general.tab_bans" access="false"> "general.tab_adminchat" access="false"> "command.kick" access="false"> "command.freeze" access="false"> "command.mute" access="false"> "command.setnick" access="false"> "command.shout" access="false"> "command.spectate" access="false"> "command.slap" access="false"> "command.setgroup" access="false"> "command.sethealth" access="false"> "command.setarmour" access="false"> "command.setmoney" access="false"> "command.setskin" access="false"> "command.setteam" access="false"> "command.giveweapon" access="false"> "command.setstat" access="false"> "command.jetpack" access="false"> "command.warp" access="false"> "command.setdimension" access="false"> "command.setinterior" access="false"> "command.givevehicle" access="false"> "command.repair" access="false"> "command.blow" access="false"> "command.destroy" access="false"> "command.customize" access="false"> "command.setcolor" access="false"> "command.setpaintjob" access="false"> "command.listmessages" access="false"> "command.readmessage" access="false"> "command.listresources" access="false"> "command.start" access="false"> "command.stop" access="false"> "command.stopall" access="false"> "command.restart" access="false"> "command.execute" access="false"> "command.delete" access="false"> "command.setpassword" access="false"> "command.setwelcome" access="false"> "command.setgame" access="false"> "command.setmap" access="false"> "command.setweather" access="false"> "command.blendweather" access="false"> "command.setblurlevel" access="false"> "command.setwaveheight" access="false"> "command.setskygradient" access="false"> "command.setgamespeed" access="false"> "command.setgravity" access="false"> "command.settime" access="false"> "function.shutdown" access="false"> "command.setfpslimit" access="false"> "command.fetchRemote" access="false"> "command.ban" access="false"> "command.unban" access="false"> "command.banip" access="false"> "command.unbanip" access="false"> "command.banserial" access="false"> "command.unbanserial" access="false"> "command.listbans" access="false"> "command.cpanelhide" access="false"> "general.cpanel" access="false"> "command.cpanelmute" access="false"> "command.cpanelslap" access="false"> "command.cpanelban" access="false"> "command.cpanelannounce" access="false"> "command.cpanelbanserial" access="false"> "command.cpanelunban" access="false"> "command.cpanelunbanserial" access="false"> "command.cpanelshout" access="false"> "command.cpanelgetreports" access="false"> "command.cpaneldelreport" access="false"> "command.cpanelgetsettings" access="false"> "command.cpanelsetsettings" access="false"> "command.cpanelkill" access="false"> "command.cpaneljetpack" access="false"> "command.cpanelspectate" access="false"> "command.cpanelrepairvehicle" access="false"> "command.cpanelgivevehicle" access="false"> "command.cpanelblowvehicle" access="false"> "command.cpaneldestroyvehicle" access="false"> "command.cpanelsetsky" access="false"> "command.cpanelresetsky" access="false"> "command.cpanelzap" access="false"> "command.cpanelburn" access="false"> "command.cpanelfreeze" access="false"> "command.cpaneleject" access="false"> "command.cpanelbomb" access="false"> "command.cpanelsetteam" access="false"> "command.cpanelcreateteam" access="false"> "command.cpanelwarp" access="false"> "command.cpanellistbans" access="false"> "command.cpanellistresources" access="false"> "command.cpanelstart" access="false"> "command.cpanelstop" access="false"> "command.cpanelrestart" access="false"> "command.cpanelgiveweapon" access="false"> "command.cpanelsetmoney" access="false"> "command.cpanelclearchat" access="false"> "command.cpaneljail" access="false"> "command.cpanelsetskin" access="false"> "command.setidlekicker" access="false"> "command.getscreen" access="false"> "general.tab_acl" access="false"> "command.setheathazelevel" access="false"> "command.setfpskicker" access="false"> "command.setpingkicker" access="false"> "command.setglitch" access="false"> "command.setworldproperty" access="false"> "autoACL_acpanel"> "function.setServerConfigSetting" access="true" who="EufraT" pending="false" date="2014-01-19 15:55:57"> "function.kickPlayer" access="true" who="EufraT" pending="false" date="2014-01-19 15:55:57"> "function.fetchRemote" access="true" who="EufraT" pending="false" date="2014-01-19 15:55:57">
  18. I got a problem with my scoreboard , when a player quit and come back he loses his flag on scoreboard. EXP : /quit , after 1 minute i join server again , login.. but i lose my flag on scoreboard please help it's very important for me ._. [lua]-- THESE CAN BE CHANGED triggerKey = "tab" -- default button to open/close scoreboard settingsKey = "F7" -- default button to open the settings window drawOverGUI = true -- draw scoreboard over gui? seperationSpace = 80 -- the space between top/bottom screen and scoreboard top/bottom in pixels -- BUT DON'T TOUCH THESE scoreboardToggled = false scoreboardForced = false scoreboardDrawn = false forceScoreboardUpdate = false useAnimation = true scoreboardIsToggleable = false showServerInfo = false showGamemodeInfo = false showTeams = true useColors = true drawSpeed = 1 scoreboardScale = 1 teamHeaderFont = "clear" contentFont = "default-bold" columnFont = "default-bold" serverInfoFont = "default" rmbFont = "clear" cBlack = tocolor( 0, 0, 0 ) cWhite = tocolor( 255, 255, 255 ) cSettingsBox = tocolor( 255, 255, 255, 150 ) MAX_PRIRORITY_SLOT = 500 scoreboardColumns = {} resourceColumns = {} scoreboardDimensions = { ["width"] = 0, ["height"] = 0, ["phase"] = 1, ["lastSeconds"] = 0 } scoreboardTicks = { ["lastUpdate"] = 0, ["updateInterval"] = 500 } scoreboardContent = {} firstVisibleIndex = 1 sortBy = { ["what"] = "__NONE__", ["dir"] = -1 } -- -1 = dec, 1 = asc sbOutOffset, sbInOffset = 1, 1 sbFont = "clear" sbFontScale = 0.68 serverInfo = {} fontScale = { -- To make all fonts be equal in height ["default"] = 1.0, ["default-bold"] = 1.0, ["clear"] = 1.0, ["arial"] = 1.0, ["sans"] = 1.0, ["pricedown"] = 0.5, ["bankgothic"] = 0.5, ["diploma"] = 0.5, ["beckett"] = 0.5 } customFont = "default-bold" fontScaleRace = 5 colorCode = {0,176,255} selectedRows = {} addEvent( "onClientPlayerScoreboardClick" ) addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource() ), function ( resource ) cScoreboardBackground = tocolor( defaultSettings.bg_color.r, defaultSettings.bg_color.g, defaultSettings.bg_color.b, defaultSettings.bg_color.a ) cSelection = tocolor( defaultSettings.selection_color.r, defaultSettings.selection_color.g, defaultSettings.selection_color.b, defaultSettings.selection_color.a ) cHighlight = tocolor( defaultSettings.highlight_color.r, defaultSettings.highlight_color.g, defaultSettings.highlight_color.b, defaultSettings.highlight_color.a ) cHeader = tocolor( defaultSettings.header_color.r, defaultSettings.header_color.g, defaultSettings.header_color.b, defaultSettings.header_color.a ) cTeam = tocolor( defaultSettings.team_color.r, defaultSettings.team_color.g, defaultSettings.team_color.b, defaultSettings.team_color.a ) cBorder = tocolor( defaultSettings.border_color.r, defaultSettings.border_color.g, defaultSettings.border_color.b, defaultSettings.border_color.a ) cServerInfo = tocolor( defaultSettings.serverinfo_color.r, defaultSettings.serverinfo_color.g, defaultSettings.serverinfo_color.b, defaultSettings.serverinfo_color.a ) cContent = tocolor( defaultSettings.content_color.r, defaultSettings.content_color.g, defaultSettings.content_color.b, defaultSettings.content_color.a ) bindKey( triggerKey, "down", "Toggle scoreboard", "1" ) bindKey( triggerKey, "up", "Toggle scoreboard", "0" ) bindKey( settingsKey, "down", "Open scoreboard settings", "1" ) local resource = getResourceFromName("race") if resource then customFont,fontScaleRace,colorCode = call(resource,"getRaceSettings") if not customFont then customFont = "default-bold" end if not customFont then customFont = "default-bold" end if not fontScaleRace then fontScaleRace = 5 end if not colorCode then colorCode = {0,176,255} end end addEventHandler( "onClientRender", getRootElement(), drawScoreboard ) triggerServerEvent( "onClientDXScoreboardResourceStart", getRootElement() ) readScoreboardSettings() triggerServerEvent( "requestServerInfo", localPlayer ) colorPicker.constructor() end ) function updateCustomSettings(customFontRace,fontScaleRaceRace,colorCodeRace) customFont,fontScaleRace,colorCode = customFontRace,fontScaleRaceRace,colorCodeRace readScoreboardSettings() end addEvent("onRaceWantUpdateInterfaceData",true) addEventHandler("onRaceWantUpdateInterfaceData",getRootElement(),updateCustomSettings) addEventHandler( "onClientPlayerQuit", getRootElement(), function() selectedRows[source] = nil end ) function sendServerInfo( output ) serverInfo = output end addEvent( "sendServerInfo", true ) addEventHandler( "sendServerInfo", getRootElement(), sendServerInfo ) function toggleScoreboard( _, state ) state = iif( state == "1", true, false ) if scoreboardIsToggleable and state then scoreboardToggled = not scoreboardToggled elseif not scoreboardIsToggleable then scoreboardToggled = state end end addCommandHandler( "Toggle scoreboard", toggleScoreboard ) function openSettingsWindow() if scoreboardDrawn then local sX, sY = guiGetScreenSize() if not (windowSettings and isElement( windowSettings ) and guiGetVisible( windowSettings )) then --createScoreboardSettingsWindow( sX-323, sY-350 ) --showCursor( true ) elseif isElement( windowSettings ) then --destroyScoreboardSettingsWindow() end end end addCommandHandler( "Open scoreboard settings", openSettingsWindow ) addCommandHandler( "scoreboard", function () scoreboardToggled = not scoreboardToggled end ) function iif( cond, arg1, arg2 ) if cond then return arg1 end return arg2 end function doDrawScoreboard( rtPass, onlyAnim, sX, sY ) if getElementData(localPlayer,"loginState") then return end if #scoreboardColumns ~= 0 then -- -- In/out animation -- local currentSeconds = getTickCount() / 1000 local deltaSeconds = currentSeconds - scoreboardDimensions.lastSeconds scoreboardDimensions.lastSeconds = currentSeconds deltaSeconds = math.clamp( 0, deltaSeconds, 1/25 ) if scoreboardToggled or scoreboardForced then local phases = { [1] = { ["width"] = s(10), ["height"] = s(5), ["incToWidth"] = s(10), ["incToHeight"] = s(5), ["decToWidth"] = 0, ["decToHeight"] = 0 }, [2] = { ["width"] = s(40), ["height"] = s(5), ["incToWidth"] = calculateWidth(), ["incToHeight"] = s(5), ["decToWidth"] = s(10), ["decToHeight"] = s(5) }, [3] = { ["width"] = calculateWidth(), ["height"] = s(30), ["incToWidth"] = calculateWidth(), ["incToHeight"] = calculateHeight(), ["decToWidth"] = calculateWidth(), ["decToHeight"] = s(5) } } if not useAnimation then scoreboardDimensions.width = calculateWidth() scoreboardDimensions.height = calculateHeight() scoreboardDimensions.phase = #phases end local maxChange = deltaSeconds * 30*drawSpeed local maxWidthDiff = math.clamp( -maxChange, phases[scoreboardDimensions.phase].incToWidth - scoreboardDimensions.width, maxChange ) local maxHeightDiff = math.clamp( -maxChange, phases[scoreboardDimensions.phase].incToHeight - scoreboardDimensions.height, maxChange ) if scoreboardDimensions.width < phases[scoreboardDimensions.phase].incToWidth then scoreboardDimensions.width = scoreboardDimensions.width + maxWidthDiff * phases[scoreboardDimensions.phase].width if scoreboardDimensions.width > phases[scoreboardDimensions.phase].incToWidth then scoreboardDimensions.width = phases[scoreboardDimensions.phase].incToWidth end elseif scoreboardDimensions.width > phases[scoreboardDimensions.phase].incToWidth and not scoreboardDrawn then scoreboardDimensions.width = scoreboardDimensions.width - maxWidthDiff * phases[scoreboardDimensions.phase].width if scoreboardDimensions.width < phases[scoreboardDimensions.phase].incToWidth then scoreboardDimensions.width = phases[scoreboardDimensions.phase].incToWidth end end if scoreboardDimensions.height < phases[scoreboardDimensions.phase].incToHeight then scoreboardDimensions.height = scoreboardDimensions.height + maxHeightDiff * phases[scoreboardDimensions.phase].height if scoreboardDimensions.height > phases[scoreboardDimensions.phase].incToHeight then scoreboardDimensions.height = phases[scoreboardDimensions.phase].incToHeight end elseif scoreboardDimensions.height > phases[scoreboardDimensions.phase].incToHeight and not scoreboardDrawn then scoreboardDimensions.height = scoreboardDimensions.height - maxHeightDiff * phases[scoreboardDimensions.phase].height if scoreboardDimensions.height < phases[scoreboardDimensions.phase].incToHeight then scoreboardDimensions.height = phases[scoreboardDimensions.phase].incToHeight end end if scoreboardDimensions.width == phases[scoreboardDimensions.phase].incToWidth and scoreboardDimensions.height == phases[scoreboardDimensions.phase].incToHeight then if phases[scoreboardDimensions.phase + 1] then scoreboardDimensions.phase = scoreboardDimensions.phase + 1 else if not scoreboardDrawn then bindKey( "mouse2", "both", showTheCursor ) bindKey( "mouse_wheel_up", "down", scrollScoreboard, -1 ) bindKey( "mouse_wheel_down", "down", scrollScoreboard, 1 ) addEventHandler( "onClientClick", getRootElement(), scoreboardClickHandler ) if not (windowSettings and isElement( windowSettings )) then showCursor( false ) end --triggerServerEvent( "requestServerInfo", getRootElement() ) end scoreboardDrawn = true end end elseif scoreboardDimensions.width ~= 0 and scoreboardDimensions.height ~= 0 then local phases = { [1] = { ["width"] = s(10), ["height"] = s(5),
×
×
  • Create New...