Jump to content

مطلوب تعديل كود


ALw7sH

Recommended Posts

اسهل طريقة سورآ آول تكلم رد علي بـ موضوع :

تروح لـ جوجل تكتب :

10 minute = milliseconds

راح يظهر معك الناتج =

10 minutes = 600 000 milliseconds

عدلها عشان تشيل المسافة ^

10 minutes = 600000 milliseconds =

600000

جربها وشوف ^

تسسلمون ولله تعتبكم معاي :mrgreen:

بس ذولي خلاص فهمتهم

وفيه مشكله وحده ف المود

حطيت الوقت وضليت انتضر انتضر

وكمل الوقت الي مفروض تحتل فيها المنطقه ولا صار شي وضليت انتضر انتضر

ممكن حل؟

Link to comment
    local pArea     = createRadarArea( 2130, 630, 200, 100, 255, 255, 255, 125 ) 
    local pArea2     = createRadarArea( 2488.8793945313, 680.78289794922, 250, 130, 255, 255, 255, 125 ) 
    local pCuboid   = createColCuboid( 2133.1950683594, 633.66455078125, 10, 197.5, 92, 30 ) 
    local pCuboid2   = createColCuboid( 2486.5935058594, 678.20172119141, 9.5689830780029,  245, 133, 30 ) 
      
addEventHandler("onResourceStart",resourceRoot,function() 
    outputDebugString("Turf system by Enjoy ( manve ) |~| Has been turned on!") -- Please don't remove this =) 
end ) 
      
            addEventHandler( 
                'onColShapeHit', root, 
                function( p ) -- you should have added player param here 
                    if (getElementData(p, "gang")) then 
                      if( source == pCuboid ) then 
                        outputChatBox("------||~ INFO ~||------", p, 0,255,0) 
                        outputChatBox("Turf owners: coming soon!", p, 255,255,0) 
                        outputChatBox("Taken time: 5minutes.", p, 255,255,0) 
                        outputChatBox("Wait 5min to take turf.", p, 255,255,0) 
                        outputChatBox("------||~ END ~||------", p, 255,0,0) 
                        setRadarAreaFlashing( pArea, true ) 
                        local gangName = getElementData(p, "gang") 
                        local colors = exports.gang_system:getGangColor(gangName) 
                        local r, g, b = unpack(colors) 
                        pArea1Timer = setTimer( function() 
                        setRadarAreaColor (pArea, r, g, b, 100); 
                        givePlayerMoney( p, 4000 ); 
                        outputChatBox( "Congratulations, #FFFF00 you have taken the turf!", p, 0, 255, 0, true ); 
                        setRadarAreaFlashing( pArea, false ) 
                        end, 300000, 1 ) 
                      end 
                    else 
                        outputChatBox("Get in a group first!",p, 255, 0, 0) 
                    end 
                end 
        ) 
  
    addEventHandler( 
        'onColShapeLeave', root,    
        function( ) 
            if( source == pCuboid ) then 
                setRadarAreaFlashing( pArea, false ) 
                if isTimer( pArea1Timer ) then 
                    killTimer( pArea1Timer ) 
                end 
            end 
        end 
    ) 
     
    ----------------------------- 
    addEventHandler(  
        'onColShapeHit', root, 
        function( p ) -- you should have added player param here 
          if (getElementData(p, "gang")) then 
            if( source == pCuboid2 ) then 
                outputChatBox("------||~ INFO ~||------", p, 0,255,0) 
                outputChatBox("Turf owners: coming soon!", p, 255,255,0) 
                outputChatBox("Taken time: 5minutes.", p, 255,255,0) 
                outputChatBox("Wait 5min to take turf.", p, 255,255,0) 
                outputChatBox("------||~ END ~||------", p, 255,0,0) 
                setRadarAreaFlashing( pArea2, true ) 
                        local gangName = getElementData(p, "gang") 
                        local colors = exports.gang_system:getGangColor(gangName) 
                        local r2, g2, b2 = unpack(colors) 
                pArea2Timer = setTimer( function() 
                setRadarAreaColor (pArea2, r2, g2, b2, 100); 
                givePlayerMoney( p, 4000 ); 
                outputChatBox( "Congratulations, #FFFF00 you have taken the turf!", p, 0, 255, 0, true ); 
                setRadarAreaFlashing( pArea2, false ) 
                end, 300000, 1 ) 
            end 
          else   
          outputChatBox("Get in a group first!",p, 255, 0, 0) 
          end 
             
        end 
    ) 
  
    addEventHandler( 
        'onColShapeLeave', root,    
        function( ) 
            if( source == pCuboid2 ) then 
                setRadarAreaFlashing( pArea2, false ) 
                if isTimer( pArea2Timer ) then 
                    killTimer( pArea2Timer ) 
                end 
            end 
        end 
    ) 
     
     
     

Link to comment
  • 8 months later...

C

--***********************************-- 
--***********************************--
--            Group System           --
--             By Al3grab            --
--***********************************--
--***********************************--
sec = {{{{{{},{},{},{}}}}}}          --
--***********************************--
--***********************************--
 
--
rRoot = getResourceRootElement(getThisResource())
lp = getLocalPlayer()
--
 
function onClientGSStart()
    outputDebugString("Group System By Al3grab | Started")
    getSettingsFromServer()
    --
    setTimer ( function()
        setUpGui()
    end , 3000 , 1 )
end
addEventHandler("onClientResourceStart",rRoot,onClientGSStart)
 
function getSettingsFromServer()
    triggerServerEvent("SendSettings",lp,lp)
end
 
function ReciveSettings(Table)
    if ( Table and type(Table) == "table" ) then
        Settings = Table
    end
end
addEvent("ReciveSettings",true)
addEventHandler("ReciveSettings",root,ReciveSettings)
 
function setUpGui()
    GS_Window = {}
    GS_Button = {}
    GS_Label = {}
    GS_Edit = {}
    --
    GS_Window[1] = guiCreateWindow(407,160,396,437,"Group System | By Al3grab",false)
    guiSetAlpha(GS_Window[1],0.9)
    guiWindowSetSizable(GS_Window[1],false)
    guiSetCenter(GS_Window[1])
    guiSetVisible(GS_Window[1],false)
    --
    GS_Edit[1] = guiCreateEdit(12,60,219,35,"",false,GS_Window[1])
    guiEditSetMaxLength(GS_Edit[1],20)
    GS_Label[1] = guiCreateLabel(13,29,214,19,"Create a Group:",false,GS_Window[1])
    GS_Button[1] = guiCreateButton(239,60,144,35,"Create Group",false,GS_Window[1])
    --
    GS_Label[2] = guiCreateLabel(12,102,369,17,"_____________________________________________________",false,GS_Window[1])
    --
    GS_Label[3] = guiCreateLabel(13,126,214,19,"Group Name:",false,GS_Window[1])
    GS_Button[2] = guiCreateButton(11,150,213,33,"View My Group Members",false,GS_Window[1])
    GS_Button[5] = guiCreateButton(231,150,156,33,"Leave Group",false,GS_Window[1])
    --
    GS_Label[4] = guiCreateLabel(13,195,214,19,"Group Invites: ",false,GS_Window[1])
    GS_Button[3] = guiCreateButton(11,223,213,33,"View My Group Invites",false,GS_Window[1])
    GS_Button[6] = guiCreateButton(231,223,156,33,"View Groups List",false,GS_Window[1])
    --
    GS_Label[5] = guiCreateLabel(13,266,214,19,"Group Info: ",false,GS_Window[1])
    GS_Button[4] = guiCreateButton(11,294,213,33,"View/Edit My Group Info",false,GS_Window[1])
    GS_Button[7] = guiCreateButton(231,294,156,33,"Close Window",false,GS_Window[1])
    --
    GS_Label[6] = guiCreateLabel(12,341,369,17,"_____________________________________________________",false,GS_Window[1])
    --
    GS_Label[7] = guiCreateLabel(13,365,214,19,"Group Administration: ",false,GS_Window[1])
    GS_Button[8] = guiCreateButton(11,388,213,33,"Invite Player To Group",false,GS_Window[1])
    GS_Button[9] = guiCreateButton(231,388,156,33,"Group Leader Admin",false,GS_Window[1])
    --
    for k,v in ipairs ( GS_Button ) do
        guiSetFont(v,"clear-normal")
    end
    --
    for k,v in ipairs ( GS_Label ) do
        guiSetFont(v,"clear-normal")
    end
    --
    repeat until bindKey(Settings["OpenKey"] or "F1","down",function()
        togglePanel(not guiGetVisible(GS_Window[1]))
    end )
    --
    outputGS("Press #FFFFFF"..Settings["OpenKey"].."#FFFF00 to open panel.")
end
 
function guiSetCenter(center_window)
    local screenW,screenH=guiGetScreenSize()
    local windowW,windowH=guiGetSize(center_window,false)
    local x,y = (screenW-windowW)/2,(screenH-windowH)/2
    guiSetPosition(center_window,x,y,false)
end
 
function togglePanel(Vis)
        if Vis == false then
            guiSetVisible(GS_Window[1],false)
            showCursor(false)
            guiSetInputMode("allow_binds")
        else
            if getAccountName(localPlayer) ~= false then
                guiSetVisible(GS_Window[1],true)
                showCursor(true)
                guiSetInputMode("no_binds_when_editing")
                --
                sortData()
            else
                outputGS("You must be logged in to open the panel !")
            end
        end
end
addEvent("toggleGroupSystemPanel",true)
addEventHandler("toggleGroupSystemPanel",root,togglePanel)
 
function sortData()
    local groupName = getElementData(lp,"Group") or "N/A"
    local groupInvites = getElementData(lp,"GroupInvites") or 0
    if groupName ~= "N/A" then
        local accName = getAccountName(localPlayer)
        local groupLeader = getElementData(lp,"GroupLeader") or false
        if groupLeader == true then
            enable("own-group")
        else
            enable("have-group")
        end
    else
        enable("no-group")
    end
    --
    triggerServerEvent("sendGroupData",lp,lp,groupName)
end
addEvent("sortPanelData",true)
addEventHandler("sortPanelData",root,sortData)
 
function enable(what)
    if what == "own-group" then
        guiSetEnabled(GS_Edit[1],false)
        guiSetEnabled(GS_Button[1],false)
        --
        guiSetEnabled(GS_Button[2],true)
        guiSetEnabled(GS_Button[5],true)
        --
        guiSetEnabled(GS_Button[3],true)
        guiSetEnabled(GS_Button[6],true)
        --
        guiSetEnabled(GS_Button[4],true)
        guiSetEnabled(GS_Button[7],true)
        --
        guiSetEnabled(GS_Button[8],true)
        guiSetEnabled(GS_Button[9],true)
    elseif what == "have-group" then
        guiSetEnabled(GS_Edit[1],false)
        guiSetEnabled(GS_Button[1],false)
        --
        guiSetEnabled(GS_Button[2],true)
        guiSetEnabled(GS_Button[5],true)
        --
        guiSetEnabled(GS_Button[3],true)
        guiSetEnabled(GS_Button[6],true)
        --
        guiSetEnabled(GS_Button[4],true)
        guiSetEnabled(GS_Button[7],true)
        --
        guiSetEnabled(GS_Button[8],false)
        guiSetEnabled(GS_Button[9],false)
    else
        guiSetEnabled(GS_Edit[1],true)
        guiSetEnabled(GS_Button[1],true)
        --
        guiSetEnabled(GS_Button[2],false)
        guiSetEnabled(GS_Button[5],false)
        --
        guiSetEnabled(GS_Button[3],true)
        guiSetEnabled(GS_Button[6],true)
        --
        guiSetEnabled(GS_Button[4],false)
        guiSetEnabled(GS_Button[7],true)
        --
        guiSetEnabled(GS_Button[8],false)
        guiSetEnabled(GS_Button[9],false)
    end
end
 
function getAccountName(p)
    return getElementData(p,"AccountName") or false
end
 
function reciveGroupData(membersTable,info,leader,created,invitesTable)
    gmTable = membersTable or {}
    gInfo = info or ""
    gLeader = leader or ""
    gCreated = created or ""
    giTable = invitesTable or {}
    --
    refreshPanel()
end
addEvent("reciveGroupData",true)
addEventHandler("reciveGroupData",root,reciveGroupData)
 
function refreshPanel()
    gName = getElementData(lp,"Group") or "N/A"
    guiSetText(GS_Label[3],"Group Name: "..gName)
    guiSetText(GS_Label[4],"Group Invites: "..#giTable or 0)
    --
    guiSetText(GS_Edit[1],"")
    --
    if gName ~= "N/A" then
        if gLeader == true then
            enable("own-group")
        else
            enable("have-group")
        end
    end
end
 
 
function onGSClick()
    if ( source == GS_Button[1] ) then
        local gName = guiGetText(GS_Edit[1])
        if gName and gName ~= "" then
            guiSetText(GS_Edit[1],"")
            triggerServerEvent("CreateGroup",lp,lp,gName)
        end
    elseif ( source == GS_Button[5] ) then
        triggerServerEvent("LeaveGroup",lp,lp,gName)
    elseif ( source == GS_Button[6] ) then
        createList("Groups List")   
    elseif ( source == GS_Button[3] ) then
        createList("Group Invites")
    elseif ( source == GS_Button[7] ) then
        togglePanel(not guiGetVisible(GS_Window[1]))
    elseif ( source == GS_Button[2] ) then
        createList("Group Members")
    elseif ( source == GS_Button[8] ) then
        createList("Invite Player",true)
    elseif ( source == GS_Button[4] ) then
        createInfo()
    elseif ( source == GS_Button[9] ) then
        createAdmin()   
    end
end
addEventHandler("onClientGUIClick",root,onGSClick)
 
function createList(what,invite)   
    if GSList_Window then
        if GSList_Window[1] then
            if isElement(GSList_Window[1]) then
                destroyElement(GSList_Window[1])
            end
       
Link to comment
  • 1 month later...

إذا ما تعرف تغير كلمة إلى كلمة ثانية بكود بسيط و معطينك الكلمة و الكلمة الي تستبدلها و مو عارف تسويه

فالأفضل لا تفتح سيرفر ولا تتعب نفسك ولا تتعبنا

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...