Jump to content

The Killer

Members
  • Posts

    1,336
  • Joined

Everything posted by The Killer

  1. ما اشوف لردك اي معنى + عندك خطأ بالسطر 10
  2. The source of this event is the player who joined.
  3. اكتب نفس الكلمه + انسخ الكود مره ثانيه
  4. addEventHandler ("onVehicleEnter", car, function (plr) if getElementData (plr, "Entered") == true then outputChatBox ("You already entered this vehicle before.", plr, 255, 0, 0) removePedFromVehicle (plr, source) else setElementData (plr, "Entered", true) end end )
  5. ايه نفس الشي يختلف التعريف على حسب الاستخدام ممكن تخليها plr او player او p
  6. لا مب نفس الشي .. مجربه انا وشغال معي تأكد لو انك ضايف مود ثاني او شي
  7. local ChatStatus = false addCommandHandler ("chat", function (plr) if not isObjectInACLGroup ("user." .. getAccountName (getPlayerAccount (plr)), aclGetGroup ("Console")) then return outputChatBox ("You are not allowed to do this.", plr, 255, 0, 0) end if (ChatStatus == false) then ChatStatus = true outputChatBox ("Chat has been disabled.", plr, 255, 0, 0) else ChatStatus = false outputChatBox ("Chat has been enabled.", plr, 0, 255, 0) end end ) addEventHandler ("onPlayerChat", root, function (text) cancelEvent () if (ChatStatus == false) then outputChatBox (getPlayerName (source) .. ":" .. text, root, 255, 255, 255) return end if (ChatStatus == true) then if isObjectInACLGroup ("user." .. getAccountName (getPlayerAccount (source)), aclGetGroup ("Console")) then outputChatBox (getPlayerName (source) .. ":" .. text, root, 255, 255, 255) else outputChatBox ("Chat has been disabled.", source, 255, 0, 0) end end end )
  8. طفي مود التاج او ضيف الكود لموود التاج
  9. مفيد في حالة انه شغال تمام ومافيه اخطاء لاكن في حالتك انت اتفق مع : +
  10. local ChatStatus = false addCommandHandler ("chat", function (plr) if not isObjectInACLGroup ("user." .. getAccountName (getPlayerAccount (plr)), aclGetGroup ("Console")) then return outputChatBox ("You are not allowed to do this.", plr, 255, 0, 0) end if (ChatStatus == false) then ChatStatus = true outputChatBox ("Chat has been disabled.", plr, 255, 0, 0) else ChatStatus = false outputChatBox ("Chat has been enabled.", 0, 255, 0) end end ) addEventHandler ("onPlayerChat", root, function (text) if (ChatStatus == false) then outputChatBox (getPlayerName (source) .. ":" .. text, root, 255, 255, 255) return end if (ChatStatus == true) then if isObjectInACLGroup ("user." .. getAccountName (getPlayerAccount (source)), aclGetGroup ("Console")) then outputChatBox (getPlayerName (source) .. ":" .. text, root, 255, 255, 255) else outputChatBox ("Chat has been disabled.", source, 255, 0, 0) end end end )
  11. Client side # local pass = 000000 win = guiCreateWindow (...) btn = guiCreateButton (...) edit = guiCreateEdit (...) addEventHandler ("onClientGUIClick", resourceRoot, function () if (source == btn) then local text = guiGetText (edit) if getElementData (localPlayer, "open") ~= true then if (text ~= "") then if (text == pass) then guiSetVisible (win, true) showCursor (true) triggerServerEvent ("SavePassword", localPlayer) else outputChatBox ("Wrong password.", 255, 0, 0) end end else guiSetVisible (win, true) showCursor (true) end end end ) Server side # addEvent ("SavePassword", true) addEventHandler ("SavePassword", root, function () local acc = getPlayerAccount (source) if not isGuestAccount (acc) then setAccountData (acc, "Pass", true) end end ) addEventHandler ("onPlayerLogin", root, function (_, acc) if getAccountData (acc, "Pass") == true then setElementData (source, "open", true) end end )
  12. The Killer

    خشو

    https://community.multitheftauto.com/ind ... ls&id=2513
  13. عندك خطأ بالكود حقك سطر 16 ضايف علامة تنصيص ناقصه وخربت كل الكود .. ! المهم لصاحب الموضوع تقدر تسويها كذا btn = guiCreateButton (...) grid = guiCreateGridList (...) guiGridListAddColumn (...) edit = guiCreateEdit (...) addEventHandler ("onClientGUIClick", resourceRoot, function () if (source == btn) then local row = guiGridListGetSelectedItem (grid) local select = guiGridListGetItemText (grid, row, 1) if (select and select ~= "") then guiSetText (edit, select) else guiSetText (edit, "") end end end )
  14. افضل انك تستخدم الجدول في حال زي كذا
  15. Command # addCommandHandler function # getPlayerFromName givePlayerMoney -- Player name -- PM outputChatBox -- Player name
  16. هذا لأنك حاط "v[1]" بين علامة تنصيص وفي السطر 17 ناقصك لوب وبعد حاط "v[1]" بين علامة تنصيص
  17. هذا مب خطأ في النهايه الريدايريكت اول شي يطلعك من السيرفر بعدين يدخلك السيرفر الثاني فهذا ماهو خطأ
  18. ماسويت شئ ض بس في جدار ورا الماركر مدري يأثر ولا لا ايه يأثر الكلام ما يظهر ورا الجدار لازم تكون قدام الماركر عشان يظهر استخدم الكود هذا
  19. طيب الكود ذا مافيه مشكله وشغال مدري وش مسوي انت
  20. اطرح السيرفر الي فيه الجزء ذا مع الكلاينت
×
×
  • Create New...