Jump to content

N3xT

Retired Staff
  • Posts

    2,490
  • Joined

  • Days Won

    18

Everything posted by N3xT

  1. local x,y,z = 0,0,0 local dimension = 0 addCommandHandler ( "1234", function (thePlayer) if getElementDimension(thePlayer) == 5456 then if ( isGuestAccount(getPlayerAccount ( thePlayer )) ) then return end local acc = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user.".. acc, aclGetGroup ( "Console" ) ) then outputChatBox("-------- "..getPlayerName(thePlayer).." ----- ") --killPed ( thePlayer ) setElementPosition(thePlayer, x, y, z) setElementDimension(thePlayer, dimension) end end end )
  2. كاتبها غلط، وغير كذا ما يصير تعطي كل المودات صلاحيات كاملة عشان بعضها ملغم، أيضاً فوق يقولك انه ضايف المود للادمنية
  3. للعلم أنا مجربها, وعندي بسيرفري فوق 50 سيريال وشغالة تمام ومافيه أحد إشتكى لي عنها
  4. for gui, you can use this useful function centerWindow
  5. بالتحقق حق أسم اللاعب أنت حاط V كابيتال, وباللوب حاطها سمول, لذلك ما راح يظبط تحققك وغير كذا ما يحتاج تسوي لوب لكل اللاعبين, لأنك بترسل للاعب أنت محدده أصلا من القريدليست مو تبي تحدده إذا بغينا لاعب من السيرفر كله, ذا الوقت نسوي لوب
  6. الإكس إم إل جداً بسيط وشوف ذا المثال إذا تبي مثلاً تجيب عمر الواحد من إديت function xml() local fileName = tostring("years.xml") -- إسم ملف الإكس إم إل local xmlFile = xmlLoadFile(fileName) -- نفتح الملف أو نسوي له لود local text = guiGetText(edit) -- نجيب عمر اللاعب من الإديت if not xmlFile then -- هنا نتحقق إذا ماكان فيه ملف الإكسمل نسوي ملف جديد xmlFile = xmlCreateFile(fileName, "N3xT") -- نسوي الملف xmlNodeSetAttribute(xmlFile, "old", tostring(edit)) -- نسوي نود عشان هنا نحط فيه العمر xmlSaveFile(xmlFile) -- نحفظ الملف else -- إذا كان عكس التحقق اللي فوق يعني ملف الاكسمل موجود xmlNodeSetAttribute(xmlFile, "old", tostring(edit)) -- نحط عمر اللاعب بالنود xmlSaveFile(xmlFile) -- نحفظ الملف end end وعشان نجيب العمر من الإكسمل نسوي كذا local getOld = tostring(xmlNodeGetAttribute(xmlFile, "old"))
  7. كودك غلط ما يحتاج لوب ولا شيء, صاحب الموضوع جرب كذا إذا ماشتغل عطني الديبق --[[------------------------------------------------- Notes: > This code is using a custom font. This will only work as long as the location it is from always exists, and the resource it is part of is running. To ensure it does not break, it is highly encouraged to move custom fonts into your local resource and reference them there. --]]------------------------------------------------- GUIEditor = { memo = {}, button = {}, edit = {}, window = {}, combobox = {}, gridlist = {}, } GUIEditor.window[1] = guiCreateWindow(1101, 220, 256, 448, "لـوحة آلدردشه آلخآصه", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible ( GUIEditor.window[1], true ) GUIEditor.gridlist[1] = guiCreateGridList(9, 33, 238, 307, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Players", 0.5) guiGridListAddColumn(GUIEditor.gridlist[1], "آلحآله ", 0.5) GUIEditor.combobox[1] = guiCreateComboBox(30, 350, 217, 89, "متصل", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.combobox[1], "NormalEditTextColour", "FFFE0000") guiComboBoxAddItem(GUIEditor.combobox[1], "متصل") guiComboBoxAddItem(GUIEditor.combobox[1], "في آلخآرج") guiComboBoxAddItem(GUIEditor.combobox[1], "غير متصل") guiComboBoxAddItem(GUIEditor.combobox[1], "مشغوول") GUIEditor.button[1] = guiCreateButton(-20, 60, 241, 23, "الـقوآنين آلخآصه بي الدردشه الخاصه", false, GUIEditor.combobox[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.window[2] = guiCreateWindow(169, 128, 499, 384, "", false) guiWindowSetSizable(GUIEditor.window[2], false) guiSetAlpha(GUIEditor.window[2], 1.00) guiSetVisible ( GUIEditor.window[2], false ) GUIEditor.edit[2] = guiCreateEdit(23, 348, 383, 27, "", false, GUIEditor.window[2]) GUIEditor.button[2] = guiCreateButton(411, 349, 78, 25, "آرسآل", false, GUIEditor.window[2]) guiSetFont(GUIEditor.button[2], font_0) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFE0000") GUIEditor.memo[2] = guiCreateMemo(9, 40, 477, 297, "", false, GUIEditor.window[2]) ----------------------------------- ------------------------------- function aa() guiGridListClear(GUIEditor.gridlist[1]) for i,v in ipairs(getElementsByType("player")) do local row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],row,1,getPlayerName(v),false,false) end end addEventHandler ("onClientResourceStart",resourceRoot,aa) addEventHandler ("onClientPlayerJoin",root,aa) addEventHandler ("onClientPlayerChangeNick",root,aa) addEventHandler ("onClientPlayerQuit",root,aa) addEventHandler ( "onClientGUIClick", root, function () if source == GUIEditor.gridlist[1] then local sel = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) local row = guiGridListGetItemText (GUIEditor.gridlist[1]) guiSetVisible ( GUIEditor.window[2], true ) end end ) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor.button[1] ) then local Text1 = guiGetText ( GUIEditor.edit[1] ) if Text1 ~= '' then triggerServerEvent("Set1", localPlayer, Text1) end end end ) addEvent("Set4",true) addEventHandler("Set4",root , function(Text1,cPlayer) guiSetText ( GUIEditor.memo[2],cPlayer.." : "..Text1.."/n") end ) addCommandHandler('q1',function() guiSetVisible(GUIEditor.window[1], not guiGetVisible(GUIEditor.window[1])) showCursor(guiGetVisible(GUIEditor.window[1])) end ) addEvent("Set1",true) addEventHandler("Set1",root , function (Text1) local cPlayer = getPlayerFromName ( source ) if ( cPlayer ) then triggerClientEvent(root,"Set4", root,Text1,cPlayer) end end--- function )
  8. شف ي حبيبي, البريك نستعمله فاللوب طيب بتقولي ليه ؟ أنا أقولك ليه البريك فايدته إذا أنت سويت لوب, وتبي من اللوب حاجة وحدة وبعدها خلاص ما تبي اللوب طيب وش نسوي ؟ أولاً نسوي لوب على كل اللاعبين اللي بالسيرفر, ونطلع منهم اللاعب اللي نبيه for _, player in ipairs( getElementsByType('player') ) do كذا سوينا اللوب, طيب تمام, طيب الحين نروح للخطوة الثانية اللي هي وش نبي من اللوب ذا ؟ مثلاً أنا أبيه يجيب لي اللي أسمه بسام, كيف نسويها طيب؟ كذا نجيب أسماء اللاعبين وطبعاً أرقمنت واحد بنحط فيه متغير اللوب, عشان نطلع أسماء كل اللاعبين اللي بالسيرفر if getPlayerName(player) == "Bassam" then بسام اللي هو أسم اللاعب اللي نبيه طيب الحين خلاص ما راح نحتاج اللوب, ليه؟ لأننا كنا نبي اللوب عشان اللاعب بسام ذا نبي نشوف أسمه يعني حالياً اللوب ماله فايدة ليه نخليه شغال؟ خلاص نقفله عن طريق بريك, طيب نشوف المثال كامل addCommandHandler("test_", -- أمر للتجربة function ( p ) for _, player in ipairs( getElementsByType('player') ) do -- لوب لكل اللاعبين if getPlayerName(player) == "Bassam" then -- ندور عن اللاعب بسام عن طريق اللوب اللي سويناه فوق break -- إذا حصلنا اللاعب بسام نوقف اللوب outputChatBox("تم إيجاد اللاعب بسام وجاري إيقاف اللوب",p,255,0,0,true) -- نطلع بالشات أننا حصلنا اللاعب بسام واللوب توقف end -- إند end -- إند end ) -- إند
  9. إذا خبرتك بـ الإس كيو إل ضعيفة أنصحك بإستعمال ملفات الإكس إم إل أسهل لك ومريحة بدال الإس كيو إل
  10. getPlayerSerial Server-only function -- أيضاً يشتغل كلنت سايد, لكن بالكلنت سايد اللاعب ماله أرقمنت وممكن يطلع نتائج خاطئة لكن بالنهاية بيشتغل الكود
  11. accses = { ["your serial"] = true, } bindKey("F5","down", function () local serial = getPlayerSerial () if accses[serial] then guiSetVisible(wnd, true) showCursor(true) end end )
  12. ^ لو سمحت لا تخرب مواضيع القسم, ما تشوف أسم الموضوع " للإستفسارات عن الأكواد "
  13. العفو, الكود اللي فوق مجرد مثال
  14. ' onClientGUIClick ' guiGridListGetSelectedItem guiGridListGetItemText guiSetText triggerServerEvent setPlayerTeam getPlayerTeam
  15. accses = { ["your serial"] = true, } addCommandHandler("try", function ( p ) local serial = getPlayerSerial ( p ) if accses[serial] then outputChatBox("You are in the table.",p,0,255,0,true) else outputChatBox("You are not in the table.",p,0,255,0,true) end end )
  16. local text = "كيلر" addEventHandler("onPlayerChat", root, function ( msg ) if string.find(msg,text) then if not isPlayerMuted ( source ) then setPlayerMuted(source, true) outputChatBox("تم صكك ميوت", source, 255, 0, 0, true) end end end )
  17. طيب عطاك الكود يعني وش, نفس طلبك تبي تحرك البوابة وعطاك الكود
  18. أظن دكتور ساعدك بموضوع سابق ولا ؟
  19. إذا تبي تضيف السيريال من السيرفر لازم تستعمل SQL
  20. Try that. local sRes = "job" local scripter = { ["test"] = true, } addCommandHandler("startup", function ( p ) if scripter[getAccountName(getPlayerAccount(p))] then for i, res in ipairs(getResources()) do local resName = getResourceName(res) if string.find(resName,sRes) then if getResourceState (getResourceFromName(sRes)) == running then return end startResource ( getResourceFromName(sRes) ) end end end end )
×
×
  • Create New...