Jump to content

#Chris

Members
  • Posts

    10
  • Joined

  • Last visited

Posts posted by #Chris

  1. Van egy Aduty scriptem és ha adminszolgálatba vagyok a nevem ugyan úgy marad, azt szeretném hogy 

    /adminnev parancsal be lehessem állítani a nevem

    és akkor a chatbox-ba azt írja ki hogy pl Chris Lafayet a nevem és akkor ne azt írja ki hogy "Chris Lafayet Adminszolgálatba lépett" hanem "Chris Adminszolgálatba lépett

    az infobox oké, az jó megvan. /aduty is csak az adminnév kellene

    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    function giveblood (thePlayer)
    local account = getAccountName ( getPlayerAccount ( thePlayer ) )
            if isObjectInACLGroup("user." .. account, aclGetGroup("Admin", "Admin[1]", "Admin[2]", "Admin[3]", "Admin[4]", "Admin[5]", "FoAdmin", "SzuperAdmin", "Modeller", "Designer", "Fejleszto", "Rendszergazda", "Tulajdonos")) then
           
            end          
            outputChatBox ("#7cc576[AdminDuty]#32b3ef"..getPlayerName(thePlayer).."#ffffff adminszolgálatba lépett",root,255,255,255,true)
        setElementData(thePlayer, "blood",999999999)
    end
    addCommandHandler("aduty", giveblood)
     
    function bloodback(thePlayer)
    local account = getAccountName ( getPlayerAccount ( thePlayer ) )
            if isObjectInACLGroup("user." .. account, aclGetGroup("Admin", "Admin[1]", "Admin[2]", "Admin[3]", "Admin[4]", "Admin[5]", "FoAdmin", "SzuperAdmin", "Modeller", "Designer", "Fejleszto", "Rendszergazda", "Tulajdonos")) then
     
            end
            outputChatBox ("#7cc576[AdminDuty]#32b3ef"..getPlayerName(thePlayer).."#ffffff kilépett adminszolgálatból",root,255,255,255,true)
        setElementData(thePlayer, "blood",12000)
    end
    addCommandHandler("oduty", bloodback)

    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------És ha kilépekk akkor változzon vissza a nevem:/ ----------------

  2. Sziasztok ez egy Adminjail script de valami baj lehet vele

    Quote
    1.     jailx, jaily, jailz = 1516, -1462, 10 -- You can change to custom cordinates. 
    2.     jailInterior = 0 
    3.     jailDimension = 0 
    4.       
    5.     releaseX, releaseY, releaseZ = 1546, -1675, 14 -- the release cordinates of the jail 
    6.     releaseInterior = 0-- The interior that they will be released to 
    7.     releaseDimension= 0 -- The dimension that they will be released to. 
    8.       
    9.     function onPlayerJail(player,command,player2,timer,reason) 
    10.         timer = timer -- I just do this incase, for the timer function. 
    11.         local chat = outputChatBox -- Lets define "chat" to "outputChatBox" just to save some time 
    12.         prisoner = getPlayerFromName(player2) -- This will get the player who you wan tto jail. 
    13.      if  isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup(""FoAdmin","SzuperAdmin","Fejleszto","Tulajdonos")) then 
    14.             if (timer) then 
    15.                 if (prisoner) then -- if "player2" is a valid player then 
    16.                     --- Here Is Where Most of the coding will take place. --- 
    17.                     setElementPosition(prisoner,jailx, jaily, jailz) -- Take them to jail 
    18.                     setElementInterior(prisoner,jailInterior) -- If they where in an interior, set them to your jails interior 
    19.                     setElementDimension(prisoner,jailDimension) -- set them to the jail dimension (opsional) 
    20.                     chat("#d75959[AdminJail]:#7cc576 "..getPlayerName(player).." #ffffffbebörtönözte#7cc576 "..player2.." #32b3ef"..timer.." #7cc576percre",root,255,0,0) 
    21.                     chat("#d75959[AdminJail] #7cc576Indok:#ffffff"..reason,root,255,0,0) 
    22.                     jailTimer = ( -- Set the timer, of the player to be released. 
    23.                         function () 
    24.                             chat("Jail: "..player2.." has been released from jail.",255,255,0) 
    25.                             setElementPosition(prisoner,releaseX, releaseY, releaseZ)-- Set their position when they get released 
    26.                             SetElementDimension(prisoner,releaseDimension) -- set they dimensioon to the release dimension 
    27.                             setElementInterior(prisoner,releaseInterior) -- set their interior to the defined release interior 
    28.                      *******   end, 1000, 1 ) -- Will convert the timer into miliseconds. 
    29.                     ) -- End the timer function 
    30.                 else 
    31.                     chat("#d75959[AdminJail]:#7cc576 "..player2.."#ffffff Nem érvényes játékos",player,255,0,0) 
    32.                 end 
    33.             else 
    34.                 chat("#d75959[AdminJail]:#ffffff /"..command.." [NÉV] [IDŐ] [INDOK]",player,255,0,0) -- If they didn't enter a time, then outputChatBox that message. 
    35.             end 
    36.         else -- And if their not in the admin ACL 
    37.             chat("#d75959[AdminJail]:#ffffffTe nem vagy Admin!.",player,255,0,0) -- this is really going to do: outputChatBox("Jail: Your not an admin.",player,255,0,0) 
    38.         end 
    39.     end 
    40.     addCommandHandler("ajail",onPlayerJail) 

    A piros csillag a hiba

  3. Sziasztok, Próbáltam egy Adminchat scriptet átt alakítani, de nem sikerült tehát letörölte, az van hogy van ACL admin rangok

    Tulajdonos,Fejlesztő,SzuperAdmin,FőAdmin,Admin5,Admin4,Admin3,Admin2,Admin1, csak ennyi és az kellene hogy amilyen rangon vagyok akkor azt írja ki infoboxba a /a parancsra hogy

     

    Tuladjonos vagyok [Adminchat]: Tulajdonos Chris: Szép napot

    Fejlesztő vagyok[Adminchat]: Fejlesztő Chris: Szép napot

    SzuperAdmin vagyok [Adminchat]: SzuperAdmin Chris: Szép napot

    FőAdmin vagyok [Adminchat]: FőAdmin Chris: Szép napot

  4.  

    Yeah and when the infobox is símán only it is then then switches on, does not come out already then if I start the script, I would like it if somebody enters Bejelentkezik copies it out from above successfully then hints?

  5. Sziasztok megtaláltam neten azt a scriptet amit multkor @ChrisT Kirakott, hát gondoltam megkérdezem hogy használlhatom-e. Azt mondta persze nyugodtan, hát én használnám is ha jó lenne

    CLIENT

    Quote

    function onJoin()
             setPedArmor(source, 100)
             local playerName = getPlayerName(source)
             triggerEvent("createInfoBox", localPlayer, "Sikeresen Bejelentkeztél", "success")
    end
    addEventHandler("onPlayerJoin", root, onJoin)

    SERVER

    Quote

    local screen = {}
    screen.x, screen.y = guiGetScreenSize()
    local anims, builtins = {}, {"Linear", "InQuad", "OutQuad", "InOutQuad", "OutInQuad", "InElastic", "OutElastic", "InOutElastic", "OutInElastic", "InBack", "OutBack", "InOutBack", "OutInBack", "InBounce", "OutBounce", "InOutBounce", "OutInBounce", "SineCurve", "CosineCurve"}


    local itypes = {
        alert = "alert.png",
        info = "info.png",
        success = "success.png",
        warning = "warning.png",
        ban = "ban.png",
    }

    local itypes2 = {"alert","info","success","warning","ban"}

    local font = dxCreateFont("helveticaneue.otf",10)

    local messages = {}

    local infobox = {}
    infobox.w = 200
    infobox.h = 33
    infobox.y = 10
    infobox.x = screen.x/2 - infobox.w/2


    function createInfoBox(message,itype)
        local id = #messages+1
        table.insert(messages,id,{
            id = id,
            message = message,
            itype = itype,
            x = infobox.x,
            y = infobox.y,
            w = infobox.h,
            h = infobox.h,
            dWidth = infobox.h + dxGetTextWidth(message,1,font) + 10,
            opacity = 0, -- 0-1 eső érték
            animState = false,
            })

        createAnimation(0,1,4,300,function(animation) messages[id].opacity = animation end,function()
            createAnimation(infobox.h,messages[id].dWidth,4,300,function(animation) messages[id].w = animation end,function()
                setTimer(function()
                    createAnimation(messages[id].dWidth,infobox.h,4,300,function(animation) messages[id].w = animation end,function()
                        createAnimation(1,0,4,300,function(animation) messages[id].opacity = animation end,function()
                            messages[id] = nil
                        end)
                    end)
                end,2000,1)
            end)
        end)
    end

    function renderInfoBox()
        local i = 0
        for _,v in pairs(messages) do
            v.x = screen.x/2 - v.w/2
            -- Szöveg háttere
            dxDrawRectangle(v.x,v.y + i*v.h + i*10,v.w,v.h,tocolor(0,0,0,170*v.opacity))
            -- Ikon háttere
            dxDrawRectangle(v.x,v.y + i*v.h + i*10,v.h,v.h,tocolor(0,0,0,170*v.opacity))
            --
            dxDrawImage(v.x + v.h/2 - (v.h-10)/2,v.y + i*v.h + i*10 + v.h/2 - (v.h-10)/2,v.h - 10,v.h - 10,itypes[v.itype],0,0,0,tocolor(255,255,255,255*v.opacity))

            -- Szöveg
            dxDrawText(v.message,
                v.x + v.h + 5,
                v.y + i*v.h + i*10 + v.h/2 - dxGetFontHeight(1,font)/2,
                v.x+v.w,
                v.y + i*v.h + i*10 +v.h,
                tocolor(255,255,255,255*v.opacity),1,font,"left","top",true)

            i = i + 1
        end
    end
    addEventHandler("onClientRender",root,renderInfoBox)

    function table.find(t, v)
        for k, a in ipairs(t) do
            if a == v then
                return k
            end
        end
        return false
    end

    function createAnimation(f, t, easing, duration, onChange, onEnd)
        assert(type(f) == "number", "Bad argument @ 'animate' [expected number at argument 1, got "..type(f).."]")
        assert(type(t) == "number", "Bad argument @ 'animate' [expected number at argument 2, got "..type(t).."]")
        assert(type(easing) == "string" or (type(easing) == "number" and (easing >= 1 or easing <= #builtins)), "Bad argument @ 'animate' [Invalid easing at argument 3]")
        assert(type(duration) == "number", "Bad argument @ 'animate' [expected function at argument 4, got "..type(duration).."]")
        assert(type(onChange) == "function", "Bad argument @ 'animate' [expected function at argument 5, got "..type(onChange).."]")
        table.insert(anims, {from = f, to = t, easing = table.find(builtins, easing) and easing or builtins[easing], duration = duration, start = getTickCount( ), onChange = onChange, onEnd = onEnd})
        return #anims
    end

    function destroyAnimation(a)
        if anims[a] then
            table.remove(anims, a)
        end
    end

    addEventHandler("onClientRender", root, function( )
        local now = getTickCount( )
        for k,v in ipairs(anims) do
            v.onChange(interpolateBetween(v.from, 0, 0, v.to, 0, 0, (now - v.start) / v.duration, v.easing))
            if now >= v.start+v.duration then
                if type(v.onEnd) == "function" then
                    v.onEnd( )
                end
                table.remove(anims, k)
            end
        end
    end)
          ----------------------------------Ami alul van azt én írtam oda---------------- 
            triggerEvent("createInfoBox", localPlayer, "Sikeresen Bejelentkeztél", "success")
            addEvent("createInfoBox", true)
            addEventHandler("createInfoBox", root, createInfoBox)
            

    Jah és amikor csak símán az infobox van akkor az akkor kapcsol be, ha beindítom a scriptet, utána már nem jön elő, azt szeretném ha valaki belép akkor azt írja ki felül "Sikeresen Bejelentkeztél" tippek?

×
×
  • Create New...