-
Posts
897 -
Joined
-
Last visited
Everything posted by #|_oskar_|#
-
addEventHandler("onElementClicked", root, function (S, M, Player) if S == "left" and M == "down" and getElementType(source) == "player" then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then triggerClientEvent(Player, "open", Player) end end end)
-
كلنت triggerServerEvent onClientGUIClick سيرفر getPlayerMoney takePlayerMoney createVehicle setTimer killTimer destroyElement
-
مثال بسيط وان شاء الله بتفهم منه local screenW, screenH = guiGetScreenSize() window = guiCreateWindow((screenW - 212) / 2, (screenH - 76) / 2, 212, 76, "", false) guiWindowSetSizable(window, false) button = guiCreateButton(9, 34, 193, 32, "اغلاق", false, window) ---- guiSetVisible (window,false) addEvent("open",true) addEventHandler("open",root, function() guiSetVisible (window,true) end) --- bindKey( "m", "down", function() triggerServerEvent ( "show",localPlayer) end) ------ addEvent("m",true) addEventHandler("m",root, function() showCursor ( not isCursorShowing ()) end) addEventHandler ("onClientGUIClick",button,function () guiSetVisible (window,false) showCursor (false) end,false) addEvent("show",true) addEventHandler("show",root,function () for _,plr in ipairs (getElementsByType("player")) do if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(plr )),aclGetGroup("Admin")) ) then triggerClientEvent(plr ,"m",plr ) else outputChatBox("Access denied",source,255,0,0) end end end) addEventHandler( "onElementClicked",root,function (x,y,z) if ( getElementType(source) == "player" ) then if (isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)),aclGetGroup("Admin"))) then triggerClientEvent(source,"open",source) end end end)
-
ومساعده بي اكواد -مساعده بسيطه جدا بالجداول
#|_oskar_|# replied to Mostafa MohammeD's topic in البرمجة
bindKey ("F2", "down", function () guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end) places = { {"النخيل",2123.62622, 1397.25793, 10.81252} } for k,v in ipairs(places) do local row = guiGridListAddRow(grid) guiGridListSetItemText(grid,row,1,v[1],false,false) guiGridListSetItemData(grid,row,1,{v[2],v[3],v[4]}) end addEventHandler("onClientGUIClick",root,function () local sel = guiGridListGetSelectedItem(grid) if source == btn_warb then if sel ~= -1 then local x,y,z = unpack(guiGridListGetItemData(grid,sel,1)) setElementPosition(localPlayer,x,y,z) end end end ) -
سويته لك يحذف عدد معين من الرو وليس الكل + اخفاء كود الوان اللاعب supportsystem = guiCreateWindow(55, 43, 693, 459, "[GTA-iV]-Support System", false) guiWindowSetSizable(supportsystem, false) guiSetAlpha(supportsystem, 1.00) guiSetVisible(supportsystem,false) supportchat = guiCreateGridList(10, 41, 479, 317, false, supportsystem) guiGridListAddColumn(supportchat, "Player", 0.5) guiGridListAddColumn(supportchat, "Message", 0.5) progressbar1 = guiCreateProgressBar(499, 22, 15, 427, false, supportsystem) label = guiCreateLabel(20, 22, 213, 15, "Support Chat :", false, supportsystem) supportonline = guiCreateGridList(514, 66, 168, 344, false, supportsystem) guiGridListAddColumn(supportonline, "PlayerName", 0.9) label2 = guiCreateLabel(522, 31, 99, 20, "Support Online :", false, supportsystem) checkbox1 = guiCreateCheckBox(394, 368, 90, 18, "show in chat", false, false, supportsystem) edit1 = guiCreateEdit(9, 399, 380, 36, "", false, supportsystem) button1 = guiCreateButton(394, 401, 90, 34, "Send", false, supportsystem) button2 = guiCreateButton(557, 415, 90, 34, "القوانين", false, supportsystem) ruless = guiCreateWindow(183, 45, 453, 461, "قوانين السبورت|Support Rules", false) guiWindowSetSizable(ruless, false) guiSetAlpha(ruless, 1.00) guiSetVisible(ruless,false) memo = guiCreateMemo(10, 23, 433, 379, "English : \n\n1-dont ask Admin\n\n2-dont ask Money\n\n3-dont bad talk\n\n\"This Chat For Help\"\n\n---------------------------------------\n\n: العربية\n\n\nعدم طلب ادمن-1\n\nعدم طلب فلوس-2\n\nعدم السب-3\n\n\n\"هذا الشات للمساعدة فقط\"", false, ruless) guiMemoSetReadOnly(memo, true) closeb = guiCreateButton(150, 412, 118, 38, "Close", false, ruless) function re() guiGridListClear(supportonline) triggerServerEvent("refresh",localPlayer) end addEventHandler("onClientGUIClick",root, function() if (source == button2) then guiBringToFront (ruless) guiSetVisible(ruless, not guiGetVisible(ruless) ) end end) addEventHandler("onClientGUIClick",root, function() if (source == closeb)then guiSetVisible(ruless,false) end end) bindKey("F5","down", function() guiSetVisible(supportsystem, not guiGetVisible(supportsystem) ) showCursor(guiGetVisible(supportsystem)) guiSetVisible(ruless,false) re() end) addEvent("online",true) addEventHandler("online", root, function (name) local g = guiGridListAddRow(supportonline) guiGridListSetItemText(supportonline,g, 1,""..name:gsub("#%x%x%x%x%x%x","").."", false, false) end) addEventHandler("onClientGUIClick",button1,function () if guiGetText(edit1) ~= '' then triggerServerEvent("support",localPlayer,guiGetText(edit1)) end end, false) addEvent("sendmessage",true) addEventHandler("sendmessage",root, function() local gg = guiGridListAddRow(supportchat) guiGridListSetItemText(supportchat,gg, 1,getPlayerName(localPlayer):gsub("#%x%x%x%x%x%x",""), false, false) guiGridListSetItemText(supportchat,gg, 2,guiGetText(edit1), false, false) guiGridListSetItemColor(supportchat,gg, 1, 255, 0, 0, 255) guiGridListSetItemColor(supportchat,gg, 2, 35, 254, 0, 255) if ( guiCheckBoxGetSelected( checkbox1 ) == true ) then outputChatBox("[support-System] #FF0000"..getPlayerName(localPlayer).."#FFFFFF : #00FF00"..guiGetText(edit1),255,255,0,true) end end) addEvent("sendmessage2",true) addEventHandler("sendmessage2",root, function() local gg = guiGridListAddRow(supportchat) guiGridListSetItemText(supportchat,gg, 1,getPlayerName(localPlayer), false, false) guiGridListSetItemText(supportchat,gg, 2,guiGetText(edit1), false, false) guiGridListSetItemColor(supportchat,gg, 1, 255, 0, 0, 255) guiGridListSetItemColor(supportchat,gg, 2, 35, 254, 0, 255) if ( guiCheckBoxGetSelected( checkbox1 ) == true ) then outputChatBox("[support-System] #FF0000"..getPlayerName(localPlayer).."#FFFFFF : #00FF00"..guiGetText(edit1),255,255,0,true) end end) addEvent("clear",true) addEventHandler("clear",root, function() for i = 0,3 do --- غير رقم 3 الى عدد مسح الرو اللى تبيه guiGridListRemoveRow (supportchat,i) end end)
-
اسف نسيت اضيفه عشان عدلت الكود ع السريع اعذرتى ع الخطاء
-
بملفت سيرفر حدث الضغط ع الالمنت مو مسوي تحقق ان اللى اشر عليه سياراه او لاعب وبملف كلنت مسوي اللى يضغط حرف ال m تفتح له اللوحه والماوز مو مسوي له اخفاء بعد اظهاره ذا اللى لاحظته بالكود
-
Support اتأكد ان معاك رتبه ب اسم
-
للمعلوميه كذا اللاعب اللى بيختار الشخصيه هو بس اللى يشوفها
-
حياك الله بالخدمه في اي وقت
-
وعليكم السلام ورحمة الله وبركاته مود اكثر من رائع استمر ولا توقف وان شاء الله تصير محترف برمجه بالتوفيق لك + تقبل مرورى
-
مود جميل واللى طارحه اكيد اجمل على تصميمه اللوحه MC~MeDo بالتوفيق اخوى احمد والشكر للاخ تقبل مرورى البسيط
-
وعليكم السلام ورحمة الله وبركاته الله يعطيك العافيه ع التعديل الاكثر من رائع واصل بطرحك المميز ولا توقف تقبل مرورى وبالتوفيق
-
كودك شغال مافي اي شئ بس عندك خطاء واحد بسطر 64 خطاء فى اسم الفنكشن + المفروض تحط المتغير حق جلب التكست من القريد SetWeather( Source ) -- انت حاطت هنا سورس وذا الخطاء الوحيد اللى عندك -- setWeather ( Weather ) -- المفروض يكون كذا
-
اذا تبيه لكل اللاعبين سويه سيرفر واذا تبي اللاعب بس يشوف الطقس تغير سويه كلنت
-
سطر 12 حط tostring وسطر 19 حط end,false) مايحتاج
-
يقدر يسوي كذا ويختصر عليه اشياء كثيره كلنت local screenW, screenH = guiGetScreenSize() window = guiCreateWindow((screenW - 192) / 2, (screenH - 253) / 2, 192, 253, "", false) guiWindowSetSizable(window, false) guiSetAlpha(window, 1.00) gridlist = guiCreateGridList(9, 23, 175, 181, false, window) guiGridListAddColumn(gridlist, "الفلوس", 0.9) button = guiCreateButton(9, 208, 175, 35, "اخذ الفلوس", false, window) ------ local Money = {1000,2000,3000,4000,5000,6000,7000,8000} for _,Money in pairs(Money) do local row = guiGridListAddRow(gridlist) guiGridListSetItemText(gridlist,row,1,Money,false,false) end --- addEventHandler( "onClientGUIClick",button,function( ) if guiGridListGetSelectedItem(gridlist) == -1 then return end local Money = guiGridListGetItemText(gridlist,guiGridListGetSelectedItem(gridlist),1) triggerServerEvent("Give:Money",localPlayer,Money) end) سيرفر addEvent("Give:Money",true) addEventHandler("Give:Money",root,function(Money) givePlayerMoney(source,Money) outputChatBox(Money.." $ تم اعطائك مبلغ وقدره", source,0,255,0,true) end)
-
حق ايش رقم ال 100 بملف الكلنت ؟
-
اضافة الى الكود بجانب السيرفر getPlayerFromName -- تجيب اللاعب من اسمه getPlayerMoney -- تحقق من فلوس اللاعب takePlayerMoney -- سحب فلوس من اللاعب المرسل
-
createObject ( 2232, 216.10000610352, 1923.5, 19.299999237061 ) createObject ( 2232, 207.10000610352, 1923.5, 19.299999237061 ) createObject ( 2232, 197.89999389648, 1923.5, 19.299999237061 ) createObject ( 2232, 217.80000305176, 1851.1999511719, 14.300000190735 ) Marker = createMarker (209.08809,1921.75928,16.64063,"cylinder",1,235,155,26,55) GUIEditor = { button = {}, window = {}} GUIEditor.window[1] = guiCreateWindow(496, 263, 236, 216, "الراديو", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible ( GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(11, 37, 215, 45, "تشغيل الراديو", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(10, 92, 215, 45, "ايقاف الراديو", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(183, 175, 43, 31, "X", false, GUIEditor.window[1]) addEventHandler("onClientMarkerHit", root, function (ss) if ( source == Marker ) and ( ss == localPlayer ) then guiSetVisible(GUIEditor.window[1],true) showCursor(true) end end) Sound3d = { {216.10000610352, 1923.5, 19.299999237061}, {207.10000610352, 1923.5, 19.299999237061}, {197.89999389648, 1923.5, 19.299999237061} } addEventHandler("onClientGUIClick",root, function() if (source == GUIEditor.button[1] )then for _,Pos in ipairs(Sound3d) do if isElement(sound) then stopSound (sound) end sound = playSound3D ( "music/1.mp3",Pos[1],Pos[2],Pos[3],true) setSoundMaxDistance(sound, 150) end elseif (source == GUIEditor.button[2] and isElement(sound) )then stopSound ( sound ) elseif (source == GUIEditor.button[3] )then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end)
-
وين الهريسه بالكود ؟ ممكن توضح
-
لازم تسوي تحقق للصوت عشان مايكرر + تسوي متغير للصوت addEventHandler("onClientGUIClick",root, function() if (source == GUIEditor.button[1] )then if isElement(sound) then stopSound (sound) end sound = playSound3D ( "music/1.mp3", 216.10000610352, 1923.5, 19.299999237061 ) elseif (source == GUIEditor.button[2] )then stopSound (sound) end end)