Jump to content

The Killer

Members
  • Posts

    1,336
  • Joined

Everything posted by The Killer

  1. addEvent ("onLogin", true) addEventHandler ("onLogin", root, function (user, pass) local account = getAccount (user, pass) if (account) then if logIn (source, account, pass) then outputChatBox ("You Logged in Sucessfuly With User : #00FF00[ " .. user .. " ]!", source, 255, 255, 0, true) setElementModel (source, 287) triggerClientEvent (source, "HideTheWindow", source) else outputChatBox ("خطا !!", source, 255, 255, 0) end else outputChatBox ("خطا اسم الحساب والباسورد", source, 255, 255, 0) end end ) addEvent ("onRegister", true) addEventHandler ("onRegister", root, function (user, pass) if not getAccount (user) then local account = addAccount (user, pass) if (account) then if logIn (source, user, pass) then outputChatBox ("You Registerd and Logged in Sucessfuly - Please Remember Your User/Password!", source, 255, 255, 0) outputChatBox ("Register Details : [ Username ] : #00FF00" .. user .. " #FFFF1A[ Password ] : #00FF00" .. pass .. "", source, 255, 255, 0 , true) setElementModel (source, 287) triggerClientEvent ( source, "HideTheWindow", source ) else outputChatBox ("Register/Login error!", source, 255, 255, 0) end else outputChatBox ("Account name is already exist.", source, 255, 0, 0) end end end )
  2. GUIEditor = { button = {}, edit = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.button[1] = guiCreateButton(24, 191, 121, 50, "", false) guiSetAlpha(GUIEditor.button[1], 0.00) GUIEditor.button[2] = guiCreateButton(210, 188, 121, 50, "", false) guiSetAlpha(GUIEditor.button[2], 0.00) GUIEditor.memo[1] = guiCreateMemo(622, 0, 178, 401, "Wellcome To The Server ..\n\nاهلا بكم في السيرفر\n\n\n\n\nنشكرك على زياره سرفيرنا ", false) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.edit[1] = guiCreateEdit(145, 37, 144, 23, "", false) GUIEditor.edit[2] = guiCreateEdit(149, 116, 144, 23, "", false) end ) function Dx() dxDrawImage(0, 0, 800, 600, "ddsda.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("UserName :", 20 - 1, 30 - 1, 155 - 1, 70 - 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawText("UserName :", 20 + 1, 30 - 1, 155 + 1, 70 - 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawText("UserName :", 20 - 1, 30 + 1, 155 - 1, 70 + 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawText("UserName :", 20 + 1, 30 + 1, 155 + 1, 70 + 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawText("UserName :", 20, 30, 155, 70, tocolor(186, 55, 247, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawText("PassWord :", 20, 109, 155, 149, tocolor(214, 248, 55, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawImage(21, 188, 124, 58, "black-37291_640.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(207, 188, 124, 58, "black-37291_640.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("Login", 23 - 1, 189 - 1, 145 - 1, 246 - 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) dxDrawText("Login", 23 + 1, 189 - 1, 145 + 1, 246 - 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) dxDrawText("Login", 23 - 1, 189 + 1, 145 - 1, 246 + 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) dxDrawText("Login", 23 + 1, 189 + 1, 145 + 1, 246 + 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) dxDrawText("Login", 23, 189, 145, 246, tocolor(186, 55, 247, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) dxDrawText("Register", 209, 188, 331, 245, tocolor(186, 55, 247, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) end -------------------------------- addEventHandler("onClientGUIClick",root, function () local user = guiGetText(GUIEditor.edit[1]) local pass = guiGetText(GUIEditor.edit[2]) if ( source == GUIEditor.button[1] ) then if string.len(user) > 0 and string.len(pass) > 0 then triggerServerEvent("onLogin",localPlayer,user,pass) end elseif ( source == GUIEditor.button[2] ) then if string.len(user) > 0 and string.len(pass) > 0 then triggerServerEvent("onRegister",localPlayer,user,pass) end end end ) ----------------------------------------------- function isEventHandlerAdded( sEventName, pElementAttachedTo, func ) if type( sEventName ) == 'string' and isElement( pElementAttachedTo ) and type( func ) == 'function' then local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo ) if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then for i, v in ipairs( aAttachedFunctions ) do if v == func then return true end end end end return false end bindKey ( "F3", "down", function () if isEventHandlerAdded ("onClientRender", root, Dx) then removeEventHandler("onClientRender",root,Dx) showCursor(false) outputChatBox ( "The Panel Now Is Close !!", 255, 255, 255, true ) else addEventHandler("onClientRender",root,Dx) showCursor(true) outputChatBox ( "The Panel Now Is Open !!", 255, 255, 255, true ) end end)
  3. ما اشوف لردك اي معنى + عندك خطأ بالسطر 10
  4. The source of this event is the player who joined.
  5. اكتب نفس الكلمه + انسخ الكود مره ثانيه
  6. 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 )
  7. ايه نفس الشي يختلف التعريف على حسب الاستخدام ممكن تخليها plr او player او p
  8. لا مب نفس الشي .. مجربه انا وشغال معي تأكد لو انك ضايف مود ثاني او شي
  9. 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 )
  10. طفي مود التاج او ضيف الكود لموود التاج
  11. مفيد في حالة انه شغال تمام ومافيه اخطاء لاكن في حالتك انت اتفق مع : +
  12. 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 )
  13. 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 )
  14. The Killer

    خشو

    https://community.multitheftauto.com/ind ... ls&id=2513
  15. عندك خطأ بالكود حقك سطر 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 )
  16. The Killer

    خطا؟

    افضل انك تستخدم الجدول في حال زي كذا
  17. Command # addCommandHandler function # getPlayerFromName givePlayerMoney -- Player name -- PM outputChatBox -- Player name
  18. هذا لأنك حاط "v[1]" بين علامة تنصيص وفي السطر 17 ناقصك لوب وبعد حاط "v[1]" بين علامة تنصيص
  19. هذا مب خطأ في النهايه الريدايريكت اول شي يطلعك من السيرفر بعدين يدخلك السيرفر الثاني فهذا ماهو خطأ
  20. ماسويت شئ ض بس في جدار ورا الماركر مدري يأثر ولا لا ايه يأثر الكلام ما يظهر ورا الجدار لازم تكون قدام الماركر عشان يظهر استخدم الكود هذا
×
×
  • Create New...