-
Posts
142 -
Joined
-
Last visited
Everything posted by JustP
-
اقدر اسوي داتا للـ التيبل؟ او لا؟ setAccountData(account, ' data ' , table[source])? او لا؟
-
انت ماحاط ايفنت للفنكشن onPlayerSpawn لذلك ما اشتغلت معك تقدر تسوي addEventHandler( 'onPlayerSpawn', root , function ) -- بيشتغل معك بهذي الطريقة لكن لازم تحط مكان player source عشان هو الي رسبن
-
لازم تختار اللاعب الي تبي تشيله ان كان بيد او شخص عادي فتحط نفس الي شلته بـ مكان source
-
طيب كيف اخليها تزداد للاعب الي كتب او سوا هالفعل مو لكل الناس؟
-
طيب ماوضحتلي انت كيف ازيد النقاط + كيف اجيبها بالكلاينت + هل انو تبقى بعد ان يترست السيرفر او يترست المود او او او
-
لا انا ابي اسوي التيبل بسيرفر وابيها تجيبلي النقاط بكلاينت فـ اسوي triggerClientEvent(element, 'test', element, table[ element ] )
-
تمام شكراً لك لكن معي سؤال بالتيبل لما انا مسوي تيبل ومسويله مثلا table.insert(table, row.points) الحين كيف اجيب النقاط منه ؟ + مامتأكد من انو التيبل صح او لا هل انو التيبل تبقى حتى بعد ما يطلع اللاعب من السيرفر او يترستر او او؟
-
في شخص اسمه @NX_CI سوا هالكود serverPoints=0; addEventHandler("onPlayerChat",root, function(msg,msgType) if msgType==0 then if msg=="نقطه" or msg =="نقطة" then serverPoints=serverPoints+1; outputChatBox("عدد النقاط الإجمالي :"..tostring(serverPoints),source,0,255,255); end end end ); لكن عيبه انه يعد لكل اللاعبين هل انو في طريقة تخليه للاعب سوا فعل مثلا بس الي كتب بالشات نقطة مع العلم اني ما احتاج حق الشات لكن احتاجه بشيء ثاني
-
guiGridListSetItemData(grid, row, column, data)
-
-- server addEvent('clothing:list', true) addEventHandler('clothing:list', resourceRoot, function() if type(savedClothing) == 'table' then triggerLatentClientEvent(client, 'clothing:list', resourceRoot, savedClothing) else outputChatBox('Clothing list is currently not available.', client, 255, 0, 0) end end, false) -- client addEvent('clothing:list', true) addEventHandler('clothing:list', resourceRoot, function(list_) closeWindow() local margin = 30 window = guiCreateWindow(screen_width - width - margin+20, screen_height - height-margin, width, height, 'Dupont Fashion', false) guiWindowSetSizable(window, false) grid = guiCreateGridList(10, 25, width - 20, height - 60, false, window) guiGridListAddColumn(grid, 'ID', 0.07) guiGridListAddColumn(grid, 'Description', 0.7) guiGridListAddColumn(grid, 'Base Skin', 0.1) guiGridListAddColumn(grid, 'Price', 0.1) local close = guiCreateButton(width - 110, height - 30, 100, 25, 'Close', false, window) addEventHandler('onClientGUIClick', close, closeWindow, false) local buy = guiCreateButton(width - 220, height - 30, 100, 25, 'Buy', false, window) guiSetEnabled(buy, false) checkbox = guiCreateCheckBox(width - 380, height - 33, 155, 22, 'Only Skins you can wear', true, false, window) addEventHandler('onClientGUIClick', checkbox, updateGrid, false) local scrollbar = guiCreateScrollBar(120, height - 32, 185, 22, true, false, window) guiSetProperty(scrollbar, "StepSize", "0.0028") addEventHandler('onClientGUIScroll', scrollbar, function() local rotation = tonumber(guiGetProperty(source, "ScrollPosition")) setElementRotation(previewPed, 0, 0, 155 + rotation * 360) end, false) local newedit = nil if canEdit(localPlayer) then newedit = guiCreateButton(10, height - 30, 100, 25, 'New', false, window) end -- fill the skins list list = sortList(list_) updateGrid() -- event handler for previewing items addEventHandler('onClientGUIClick', grid, function(button) if button == 'left' then -- update the preview ped to reflect actual clothing changes local row, column = guiGridListGetSelectedItem(grid) if row == -1 then resetPed() guiSetEnabled(buy, false) if newedit then guiSetText(newedit, 'New') end else local item = list[tonumber(guiGridListGetItemData(grid, row, 1))] if item then setElementModel(previewPed, item.skin) setElementData(previewPed, 'clothing:id', item.id, false) guiSetEnabled(buy, item.price == 0 or exports.global:hasMoney(localPlayer, item.price)) if newedit then guiSetText(newedit, 'Edit') end else outputDebugString('Clothing preview broke, aw.') guiSetEnabled(buy, false) end end -- we selected another row, so tweak that a bit closeEditingWindow() end end, false) -- buying things addEventHandler('onClientGUIClick', buy, function(button) if button == 'left' then local row, column = guiGridListGetSelectedItem(grid) if row ~= -1 then local item = list[tonumber(guiGridListGetItemData(grid, row, 1))] if item then triggerServerEvent('clothing:buy', resourceRoot, item.id) end end end end, false) -- new/edit if newedit then addEventHandler('onClientGUIClick', newedit, function(button) if button == 'left' then createEditWindow() end end, false) end setSoundVolume(playSound(":resources/inv_open.mp3"), 0.3) end, false)
-
local function updateGrid() guiGridListClear(grid) local only_fitting = guiCheckBoxGetSelected(checkbox) local fitting_skins = getFittingSkins() for k, v in ipairs(list) do if canBuySkin(localPlayer, v) or canEdit(localPlayer) then if not only_fitting or fitting_skins[v.skin] then local row = guiGridListAddRow(grid) guiGridListSetItemText(grid, row, 1, tostring(v.id), false, true) guiGridListSetItemData(grid, row, 1, tostring(k)) guiGridListSetItemText(grid, row, 2, tostring(v.description), false, false) guiGridListSetItemText(grid, row, 3, tostring(v.skin), false, true) guiGridListSetItemText(grid, row, 4, v.price == 0 and 'N/A' or ('$' .. exports.global:formatMoney(v.price)), false, false) end end end end -- ذا كلاينت سايد هل انو في طريقة اخلي انو لو شخص ضاف شيء يضهر للي ضايفه فقط يعني مو كل الناس؟
-
اعرض اكوادك + تأكد من الميتا تاكد من الايدي حق السيارة
-
جبتها عشان اشرح عليها عشان لو شخص مايعرف انكليزي او ضعيف يعني مثل الترجمة + مافي فرق اذا جبتها من الويكي او سويت من عندي كلها بتسوي نفس الوظيفة
-
يب اسف مالاحظتها هو اصلا حق شرح
-
السلام عليكم ورحمة الله وبركاته اقدر ابرمجلك ( حياة واقعية , هجولة , حرب عصابات ) الخ.. بمبلغ مادي بسيط طُرق التواصل هي هنا او دسكورد JustP#9592
-
الكود مافيه شيء لكن الشرح مو مفصل
-
setTimer( function() for _, player in ipairs(getElementsByType("player")) do -- لوب يحضر جميع الناس في السيرفر if (getPlayerIdleTime(player) > 300000) then -- أذا كان اللاعب الي مأفك مأفك اكثر من 30 ثانية يجيبه outputChatBox(''..player..'is Now Afk!',root) -- يرسل رسالة للجميع أنو هو افك end end end, 30000, 0) -- اغلاق التايمر الي حيتكرر كل 30 ثانية عشان يحضر الناس الافك
-
لو انك تعرفه او انك تستبدله كذا function health( ) thePlayer = source if getElementHealth( thePlayer ) <= 20 then setPedAnimation(thePlayer,"ped","fall_back") end end --- or function health( ) if getElementHealth( source ) <= 20 then setPedAnimation(source,"ped","fall_back") end end