abos3od02 Posted January 31, 2014 Share Posted January 31, 2014 السسلام عليكم عآرف آني آزعجتكم بـ طلبآتي , بس مالي غير الله ثم آنتم ! لاهنتو يـ شباب , أبغى كود أول مـ أضغط أف4 , يحولني للتيم الثآإني ^ الكود للديث ماتش مو لتيم معيييين Link to comment
فاّرس Posted January 31, 2014 Share Posted January 31, 2014 bindKey triggerServerEvent getPlayerTeam getTeamFromName setPlayerTeam Link to comment
aL.Kfo Posted January 31, 2014 Share Posted January 31, 2014 سـيرفر --[[ Don't Remove this --]] Team1Name = "Team1" -- اسم التيم الأول Team2Name = "Team2" -- اسم التيم الثاني --------------------------------------------------> addEventHandler("onResourceStart",resourceRoot, function() team1 = createTeam(Team1Name,255,0,0) team2 = createTeam(Team2Name,0,255,0) end ) addEventHandler("onResourceStop",resourceRoot, function() destroyElement(team1) destroyElement(team2) end ) addEventHandler("onPlayerJoin", root, function () for i, theTeam in ipairs ( getElementsByType("team") ) do if ( getTeamFriendlyFire ( theTeam ) == true ) then setTeamFriendlyFire ( theTeam, false ) end end end ) addEvent("gang1",true) addEventHandler("gang1",root, function() setPlayerTeam(source,team1) outputChatBox("* تم اضافـتك لـ "..getTeamName ( getPlayerTeam ( source ) ).." !",source,0,255,0,true) end ) addEvent("gang2",true) addEventHandler("gang2",root, function() setPlayerTeam(source,team2) outputChatBox("* تم اضافـتك لـ "..getTeamName ( getPlayerTeam ( source ) ).." !",source,0,255,0,true) end ) كلنـت --[[ Don't Remove this --]] theKey = "F2" -- الزر theBtnTeam1Name = "Team1" -- اسم زر التيم الأول theBtnTeam2Name = "Team2" -- اسم زر التيم الثاني --------------------------------------------------> addEventHandler("onClientResourceStart",resourceRoot,function() x,y = guiGetScreenSize() TheWindow = guiCreateWindow(255, 135, 316, 83,":: التيمات ::",false) guiSetAlpha(TheWindow,1) guiWindowSetMovable(TheWindow,false) guiWindowSetSizable(TheWindow,false) guiSetVisible(TheWindow,false) Btn1 = guiCreateButton(15, 34, 126, 32,theBtnTeam1Name,false,TheWindow) Btn2 = guiCreateButton(171, 34, 126, 34,theBtnTeam2Name,false,TheWindow) guiSetProperty( myCobyRights, "Disabled", "True" ) guiLabelSetColor(myCobyRights,0,150,255) end) bindKey(theKey,"down", function() if guiGetVisible(TheWindow) == false then guiSetVisible(TheWindow,true) showCursor(true) if getTeamName ( getPlayerTeam ( localPlayer ) ) == theBtnTeam1Name then guiSetProperty( Btn1, "Disabled", "True" ) guiSetProperty( Btn2, "Disabled", "False" ) elseif getTeamName ( getPlayerTeam ( localPlayer ) ) == theBtnTeam2Name then guiSetProperty( Btn1, "Disabled", "False" ) guiSetProperty( Btn2, "Disabled", "True" ) end else guiSetVisible(TheWindow,false) showCursor(false) end end ) addEventHandler("onClientGUIClick",root, function() if source == Btn1 then triggerServerEvent("gang1",localPlayer) guiSetVisible(TheWindow,false) showCursor(false) elseif source == Btn2 then triggerServerEvent("gang2",localPlayer) guiSetVisible(TheWindow,false) showCursor(false) end end ) الـمود تبـع عنـأد Link to comment
abos3od02 Posted February 1, 2014 Author Share Posted February 1, 2014 سـيرفر --[[ Don't Remove this --]] Team1Name = "Team1" -- اسم التيم الأول Team2Name = "Team2" -- اسم التيم الثاني --------------------------------------------------> addEventHandler("onResourceStart",resourceRoot, function() team1 = createTeam(Team1Name,255,0,0) team2 = createTeam(Team2Name,0,255,0) end ) addEventHandler("onResourceStop",resourceRoot, function() destroyElement(team1) destroyElement(team2) end ) addEventHandler("onPlayerJoin", root, function () for i, theTeam in ipairs ( getElementsByType("team") ) do if ( getTeamFriendlyFire ( theTeam ) == true ) then setTeamFriendlyFire ( theTeam, false ) end end end ) addEvent("gang1",true) addEventHandler("gang1",root, function() setPlayerTeam(source,team1) outputChatBox("* تم اضافـتك لـ "..getTeamName ( getPlayerTeam ( source ) ).." !",source,0,255,0,true) end ) addEvent("gang2",true) addEventHandler("gang2",root, function() setPlayerTeam(source,team2) outputChatBox("* تم اضافـتك لـ "..getTeamName ( getPlayerTeam ( source ) ).." !",source,0,255,0,true) end ) كلنـت --[[ Don't Remove this --]] theKey = "F2" -- الزر theBtnTeam1Name = "Team1" -- اسم زر التيم الأول theBtnTeam2Name = "Team2" -- اسم زر التيم الثاني --------------------------------------------------> addEventHandler("onClientResourceStart",resourceRoot,function() x,y = guiGetScreenSize() TheWindow = guiCreateWindow(255, 135, 316, 83,":: التيمات ::",false) guiSetAlpha(TheWindow,1) guiWindowSetMovable(TheWindow,false) guiWindowSetSizable(TheWindow,false) guiSetVisible(TheWindow,false) Btn1 = guiCreateButton(15, 34, 126, 32,theBtnTeam1Name,false,TheWindow) Btn2 = guiCreateButton(171, 34, 126, 34,theBtnTeam2Name,false,TheWindow) guiSetProperty( myCobyRights, "Disabled", "True" ) guiLabelSetColor(myCobyRights,0,150,255) end) bindKey(theKey,"down", function() if guiGetVisible(TheWindow) == false then guiSetVisible(TheWindow,true) showCursor(true) if getTeamName ( getPlayerTeam ( localPlayer ) ) == theBtnTeam1Name then guiSetProperty( Btn1, "Disabled", "True" ) guiSetProperty( Btn2, "Disabled", "False" ) elseif getTeamName ( getPlayerTeam ( localPlayer ) ) == theBtnTeam2Name then guiSetProperty( Btn1, "Disabled", "False" ) guiSetProperty( Btn2, "Disabled", "True" ) end else guiSetVisible(TheWindow,false) showCursor(false) end end ) addEventHandler("onClientGUIClick",root, function() if source == Btn1 then triggerServerEvent("gang1",localPlayer) guiSetVisible(TheWindow,false) showCursor(false) elseif source == Btn2 then triggerServerEvent("gang2",localPlayer) guiSetVisible(TheWindow,false) showCursor(false) end end ) الـمود تبـع عنـأد ^ الكود للديث ماتش مو لتيم معيييين Link to comment
فاّرس Posted February 1, 2014 Share Posted February 1, 2014 كيف يعني؟ , يعني انت تبي تجيب اسم التيم حق الماب ؟ Link to comment
abos3od02 Posted February 1, 2014 Author Share Posted February 1, 2014 قيم مود الديث ماتش كل ماب له اسم تيم غير عن الثآني ! أتمنى فهمت Link to comment
Mr.T9 Posted February 1, 2014 Share Posted February 1, 2014 اتوقع بتستخدم getElementsByType Link to comment
abos3od02 Posted February 1, 2014 Author Share Posted February 1, 2014 مافهمت لها bindkey ممكن أحد يشرح لي + كيف أغير خخط دي أكس ؟ Link to comment
Mr.T9 Posted February 1, 2014 Share Posted February 1, 2014 مافهمت لها bindkey ممكن أحد يشرح لي+ كيف أغير خخط دي أكس ؟ الدي اكس شف مثال addEventHandler("onClientRender", root, function() dxDrawText("", 408, 320, 632, 346, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false) end ) الخط default اللي هو الافتراضي جميع الخطوط "default": Tahoma "default-bold": Tahoma Bold "clear": Verdana "arial": Arial "sans": Microsoft Sans Serif "pricedown": Pricedown (GTA's theme text) "bankgothic": Bank Gothic Medium "diploma": Diploma Regular "beckett": Beckett Regular Link to comment
</Mr.Tn6eL> Posted February 2, 2014 Share Posted February 2, 2014 bindKey unbindKey setCameraMatrix setCameraTarget createPed getElementModel setElementModel dxDrawText getTeamName getTeamFromName getTeamColor event onPlayerJoin onClientResourceStart onClientRender Link to comment
abos3od02 Posted February 2, 2014 Author Share Posted February 2, 2014 عفواً ماهو دي أكس هذا الكؤد versionDisplay = textCreateDisplay () local versionText = textCreateTextItem ( "Welcome In xXx Server", 0.195, 0.70, "medium", 8, 255, 255, 255, 1, "right" ) textDisplayAddText ( versionDisplay, versionText ) textDisplayAddText كيف أغير الخط ؟ Link to comment
K1NG Posted February 2, 2014 Share Posted February 2, 2014 عفواً ماهو دي أكسهذا الكؤد versionDisplay = textCreateDisplay () local versionText = textCreateTextItem ( "Welcome In xXx Server", 0.195, 0.70, "medium", 8, 255, 255, 255, 1, "right" ) textDisplayAddText ( versionDisplay, versionText ) textDisplayAddText كيف أغير الخط ؟ . تقدر تغير الحجم حق الخط ، أما تغير نوع الخط نفسه ماتقدر Link to comment
CRoW,,# Posted February 2, 2014 Share Posted February 2, 2014 عفواً ماهو دي أكسهذا الكؤد versionDisplay = textCreateDisplay () local versionText = textCreateTextItem ( "Welcome In xXx Server", 0.195, 0.70, "medium", 8, 255, 255, 255, 1, "right" ) textDisplayAddText ( versionDisplay, versionText ) textDisplayAddText كيف أغير الخط ؟ . تقدر تغير الحجم حق الخط ، أما تغير نوع الخط نفسه ماتقدر الا تقدر بس الاصلي احسن اذا غيرته يجي شكله غريب dxCreateFont Link to comment
K1NG Posted February 2, 2014 Share Posted February 2, 2014 عفواً ماهو دي أكسهذا الكؤد versionDisplay = textCreateDisplay () local versionText = textCreateTextItem ( "Welcome In xXx Server", 0.195, 0.70, "medium", 8, 255, 255, 255, 1, "right" ) textDisplayAddText ( versionDisplay, versionText ) textDisplayAddText كيف أغير الخط ؟ . تقدر تغير الحجم حق الخط ، أما تغير نوع الخط نفسه ماتقدر الا تقدر بس الاصلي احسن اذا غيرته يجي شكله غريب dxCreateFont ?? .textCreateTextItem مهو بوظيفة dxDrawText هذي الوظيفة لإنشاء خط دي اكس عشان تستخدمه بوظيفة dxCreateFont Link to comment
CRoW,,# Posted February 2, 2014 Share Posted February 2, 2014 ذذ ما انتبهت له ما اعتقد عنده وظيفة تغير الخط ,. Link to comment
#DRAGON!FIRE Posted February 2, 2014 Share Posted February 2, 2014 مافهمت لها bindkey ممكن أحد يشرح لي bindKey -- تسوي وظيفة عند ضغط الزر المحدد . Link to comment
abos3od02 Posted February 2, 2014 Author Share Posted February 2, 2014 بـ الويكي ,, كيف احطها بكؤد , لحسه! + كيف أكبر الخخط يـ زاحف ؟ Link to comment
jafar Posted February 2, 2014 Share Posted February 2, 2014 ماتقدر تكبر الخط لكن تقدر تحط خطوط من عندكك لـ DX dxCreateFont لـ GUI guiCreateFont أو تقدر تستخدم الخطوط الأصلية لـ MTA https://wiki.multitheftauto.com/wiki/St ... Font_Names Link to comment
#DRAGON!FIRE Posted February 2, 2014 Share Posted February 2, 2014 بـ الويكي ,, كيف احطها بكؤد , لحسه!+ كيف أكبر الخخط يـ زاحف ؟ . حق حسن getMapData هذا مثال عشان تغير تيم اللاعب لو ضغط الزر .. بالنسبة للديث ماتش عشان تجيب حق التيمين مو محددين استخدم فنشكن bindKey( "F4", "down", function( ) if ( getPlayerTeam( localPlayer ) and getPlayerTeam( localPlayer ) == getTeamFromName( "TeamName" ) ) then triggerServerEvent( "ChangeTeam", localPlayer ) end end ) addEvent("ChangeTeam",true) addEventHandler("ChangeTeam", root, function( ) setPlayerTeam ( client, getTeamFromName ( "TeamName" ) ) end ) بالنسسبة للخط .. # : . فـ تقدر تغيرهم DX او GUI ما تقدر تغير الخط بـ الفنكشن اللي تستخدمه اما لو Link to comment
K1NG Posted February 2, 2014 Share Posted February 2, 2014 بـ الويكي ,, كيف احطها بكؤد , لحسه!+ كيف أكبر الخخط يـ زاحف ؟ textCreateTextItem بوظيفة scale يمديكـ تكبرهـ عن طريق الأرقمنت حق Required Arguments: text: A string of text you want to display x: A floating point number between 0.0 and 1.0 indicating how far across the screen the text should be shown, as a percentage of the width, from the left hand side. y: A floating point number between 0.0 and 1.0 indicating how far down the screen the text should be shown, as a percentage of the height, from the top. Optional Arguments: NOTE: When using optional arguments, you must supply all arguments before the one you wish to use. For more information on optional arguments, see Optional Arguments. priority: How important it is that this text should be up to date on client's screens. Valid values are: "low", "medium", "high" which are aliases for 0, 1 and 2 respectively. red: A value between 0 and 255 indicating how red the text should be. green: A value between 0 and 255 indicating how green the text should be. blue: A value between 0 and 255 indicating how blue the text should be. alpha: A value between 0 and 255 indicating how transparent the text should be, with 0 being fully transparent, and 255 being opaque. scale: A floating point value indicating the scale of the text. The default is 1.0, which is around 12pt. alignX: A string representing the X-alignment of the text. ("left", "center", "right") alignY: A string representing the Y-alignment of the text. ("top", "center", "bottom") shadowAlpha: A value between 0 and 255 indicating how dark the drop shadow should be. -- أو -- .textItemSetScale من خلال وظيفة Link to comment
abos3od02 Posted February 2, 2014 Author Share Posted February 2, 2014 جزاكم الله خير . 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