ALw7sH Posted January 28, 2013 Author Share Posted January 28, 2013 اسهل طريقة سورآ آول تكلم رد علي بـ موضوع : تروح لـ جوجل تكتب : 10 minute = milliseconds راح يظهر معك الناتج = 10 minutes = 600 000 milliseconds عدلها عشان تشيل المسافة ^ 10 minutes = 600000 milliseconds = 600000 جربها وشوف ^ تسسلمون ولله تعتبكم معاي بس ذولي خلاص فهمتهم وفيه مشكله وحده ف المود حطيت الوقت وضليت انتضر انتضر وكمل الوقت الي مفروض تحتل فيها المنطقه ولا صار شي وضليت انتضر انتضر ممكن حل؟ Link to comment
ALw7sH Posted January 28, 2013 Author Share Posted January 28, 2013 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
iPrestege Posted January 28, 2013 Share Posted January 28, 2013 تأكد السكربت يكون [ Server Side ] Link to comment
ALw7sH Posted January 28, 2013 Author Share Posted January 28, 2013 عندي شغال اذا جيت تحتل وانتضرت يتغير لون الاحتلال؟ لانه هو شغال بس الوقت مايكمل مادري ليش Link to comment
αвυ-wαleed Posted October 4, 2013 Share Posted October 4, 2013 ممكن سؤال انا اخذت الكود وجربته يقول لازم مجموعة قرووب انا حملت مو دالعقرب نظام القروبات وسويت قروب ولا فاد Link to comment
TAPL Posted October 4, 2013 Share Posted October 4, 2013 "gang" الكود الي بالموضوع الألمنت داتا "Group" الألمنت داتا حق مود العقرب يعني تحتاج تغير اسم الألمنت داتا Link to comment
αвυ-wαleed Posted October 4, 2013 Share Posted October 4, 2013 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
TAPL Posted October 4, 2013 Share Posted October 4, 2013 لوول ما يحتاج تعدل مود القروبات التعديل بيكون في نفس كود الأحتلال الي بالموضوع Link to comment
αвυ-wαleed Posted October 5, 2013 Share Posted October 5, 2013 يعني اشيل gang وابدلها ب Group Link to comment
αвυ-wαleed Posted October 5, 2013 Share Posted October 5, 2013 يالبى قلبك ياتابل ضبط معي Link to comment
αвυ-wαleed Posted October 5, 2013 Share Posted October 5, 2013 لكن ابغى اضيف الوقت يجي في الشاشة تنازلي لافراد العصابة المستحلين اول + والوقت تصاعدي لافراد العصابة المحلتلينه الحين ابغى الوقت يظهر لك القروبات اذا خشت المنطقة Link to comment
فاّرس Posted October 5, 2013 Share Posted October 5, 2013 طيب سوي اذا بدأ الاحتلال يبدأ العد التنازلي والتصاعدي , حاول تسوي شيء ذذ Link to comment
αвυ-wαleed Posted October 6, 2013 Share Posted October 6, 2013 خخخخ مافي امل مني ابغى واحد منكم سكايبي يوضح لي كم نقطة بالويكي وبعدها ابشوا بمبرمج Link to comment
فاّرس Posted October 6, 2013 Share Posted October 6, 2013 اطرح موضوعك ووضح مشكلتك ونسآعدك إن شاء الله ذذ Link to comment
reda46 Posted November 14, 2013 Share Posted November 14, 2013 شباب انا جديد كيف اشيل gang وابدلها ب group Link to comment
reda46 Posted November 14, 2013 Share Posted November 14, 2013 لا ابي الكود مبدل gang ب group Link to comment
TAPL Posted November 14, 2013 Share Posted November 14, 2013 إذا ما تعرف تغير كلمة إلى كلمة ثانية بكود بسيط و معطينك الكلمة و الكلمة الي تستبدلها و مو عارف تسويه فالأفضل لا تفتح سيرفر ولا تتعب نفسك ولا تتعبنا Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now