Jump to content

iiv03

Members
  • Posts

    476
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by iiv03

  1. iiv03

    I want to help

    thanks here : x, y, width, height, Just Here I put coordinates in guiStaticImage? Which I have? Will it work?
  2. My problem is if a player writes his user name and password and clicks on Login : Account or Password error If the player clicks on the registration, his / her account is not registered Client : GUIEditor = { edit = {}, window = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(186, 56, 945, 607, "× [ Login Panel ] ×", false) guiWindowSetSizable(GUIEditor.window[1], false) register = guiCreateButton(714, 516, 115, 48, "Register", false, GUIEditor.window[1]) guiSetVisible(GUIEditor.window[1],false) Login = guiCreateButton(714, 458, 115, 48, "Login", false, GUIEditor.window[1]) user = guiCreateEdit(503, 304, 326, 33, "", false, GUIEditor.window[1]) guiEditSetMasked(pass, true) Password = guiCreateEdit(503, 247, 326, 33, "", false, GUIEditor.window[1]) end ) function Open ( ) guiSetVisible(GUIEditor.window[1], not guiGetVisible(GUIEditor.window[1])) showCursor(guiGetVisible(GUIEditor.window[1])) end bindKey("F10","down",Open) addEvent("onPutSave",true) addEventHandler("onPutSave",root, function (puser,ppass) guiSetText(user,puser) guiSetText(pass,ppass) end ) addEventHandler("onClientGUIClick",root, function () local user = guiGetText(user) local pass = guiGetText(pass) if ( source == Login ) then if user ~= "" and pass ~= "" then if guiCheckBoxGetSelected(remember) then triggerServerEvent("onLoginWith",localPlayer,user,pass) else triggerServerEvent("onLogin",localPlayer,user,pass) end else outputChatBox("* You Must Write Username Or Password",255,0,0) end elseif ( source == Register ) then if user ~= "" and pass ~= "" then triggerServerEvent("onReg",localPlayer,user,pass) else outputChatBox("* You Must Write Username Or Password",255,0,0) end end end ) Server : executeSQLQuery("CREATE TABLE IF NOT EXISTS players_save( serial TEXT, user TEXT, pass TEXT)") function AddPlayer(serial,user,pass) executeSQLQuery("INSERT INTO players_save(serial,user,pass) VALUES(?,?,?)",serial,user,pass) end function isPlayerSave(serial) local sel = executeSQLQuery("SELECT serial FROM players_save WHERE serial=?",serial) if sel == 0 then return false else return true end end function getUserAndPass(serial) local user,pass = "","" if isPlayerSave(serial) then local sel = executeSQLQuery("SELECT * FROM players_save WHERE serial=?",serial) for i,player in ipairs(sel) do if i == 1 then user = player.user pass = player.pass end end return user,pass end return false end addEvent("onGetSave",true) addEventHandler("onGetSave",root, function () local serial = getPlayerSerial(source) if isPlayerSave(serial) then local user,pass = getUserAndPass(serial) triggerClientEvent(source,"onPutSave",source,user,pass) end end ) addEvent("onLoginWith",true) addEventHandler("onLoginWith",root, function (user,pass) local acc = getAccount(user,pass) local serial = getPlayerSerial(source) if acc then logIn(source,acc,pass) outputChatBox("Login successfully*",source,0,255,0) AddPlayer(serial,user,pass) triggerClientEvent(source,"onCl",source) else outputChatBox("Account or password error*",source,255,0,0) end end ) addEvent("onLogin",true) addEventHandler("onLogin",root, function (user,pass) local acc = getAccount(user,pass) if acc then logIn(source,acc,pass) outputChatBox("Login successfully*",source,0,255,0) triggerClientEvent(source,"onCl",source) else outputChatBox("Account or password error*",source,255,0,0) end end ) addEvent("onReg",true) addEventHandler("onReg",root, function (user,pass) local acc = getAccount(user,pass) if acc then outputChatBox("This account is already used",source,255,0,0) else addAccount(user,pass) outputChatBox("* Username = " .. user .. "",source,0,255,0) outputChatBox("* Password = " .. pass .. "",source,0,255,0) end end )
  3. iiv03

    I want to help

    oh how ? can u give me link in wiki or script easy please ? oh how ? can u give me link in wiki or script easy please ?
  4. iiv03

    I want to help

    I just want you to want me to work the board and I have made it a button to open when the player and when the programming in the buttons I want the player to press the left button change the image to the left and if the player pressure right back Previous image
  5. iiv03

    I want to help

    How to make the picture if the player pressed the button left or right moving picture left and right means Press Left button = Next image Press right button = before image I want to understand how I want a script
  6. شكرا علي الاجابه اخويه انا مسويه اخوي هاذي من زمان بس اليوم بغيت ابرمج مودات GUI واسوي له تشفير عشان اذا حد سوا باك اب م يقد يسرق المود
  7. و سيرفر مافي ؟ يعني مثال اذا دخل لاعب او خرج يقوم بتسجيل بيناته و عندي سؤال ثاني لو سمحت هو لازم اربط سيرفر ب شيئ معين يعني لو عندي كود function onPlayerQuit ( ) -- عندما يترك لاعب، متجره المبلغ من المال الحالية في بيانات حسابه local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then -- إذا تم تسجيل اللاعب local playermoney = getPlayerMoney ( source ) -- الحصول على المال الاعب setAccountData ( playeraccount, "piraterpg.money", playermoney ) -- حفظها في حسابه end end function onPlayerLogin (_, playeraccount ) -- عندما تسجيلات لاعب، استرداد له مبلغ من المال من بيانات حسابه وضعه if ( playeraccount ) then local playermoney = getAccountData ( playeraccount, "piraterpg.money" ) -- تأكد من أن هناك فعلا قيمة المحفوظة تحت هذا المفتاح (معرفة ما اذا كان مال الاعب ليست كاذبة). -- وهذا على سبيل المثال سوف لا يكون الأمر كذلك عندما لاعب يلعب قيم تايب لأول مرة if ( playermoney ) then setPlayerMoney ( source, playermoney ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin) لازم اربطه ب زر ؟ ولا اكتب ب ملف سيرفر واحفظه بس و سؤال ثالث كيف يعني هذا سكريبت بيسجل البيانات للحساب ياخذ مثال فلوس هيك او عدد نقاط لازم اشوف مود اسم مود خق فلوس اللي بيجي ي تاب " Money " واغير هاذي كلمه " piraterpg.money?" اتمنا تفهمني وشكرا لكل مساعدتك اخي function onPlayerQuit ( ) -- عندما يترك لاعب، متجره المبلغ من المال الحالية في بيانات حسابه local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then -- إذا تم تسجيل اللاعب local playermoney = getPlayerMoney ( source ) -- الحصول على المال الاعب setAccountData ( playeraccount, "piraterpg.money", playermoney ) -- حفظها في حسابه end end function onPlayerLogin (_, playeraccount ) -- عندما تسجيلات لاعب، استرداد له مبلغ من المال من بيانات حسابه وضعه if ( playeraccount ) then local playermoney = getAccountData ( playeraccount, "piraterpg.money" ) -- تأكد من أن هناك فعلا قيمة المحفوظة تحت هذا المفتاح (معرفة ما اذا كان مال الاعب ليست كاذبة). -- وهذا على سبيل المثال سوف لا يكون الأمر كذلك عندما لاعب يلعب قيم تايب لأول مرة if ( playermoney ) then setPlayerMoney ( source, playermoney ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin)
  8. فيه طريق افهم triggerServerEvent ؟ وفيه طريق كما اخلي لوحه لما تفتح تجي ب نص علي كل شاشات ؟ مثال انا حقي 1270x720 وواحد شاشته 1920x1080 ولوحه م تجيه بنص بدي اسم وظيفة او حدث و ابغي طريق افهمه
  9. مرحبا شباب شكرا اللي شاف سؤالي : شباب انا لو صممت لوحه اي لوحه مثال لوحه تغير او لوحه تسجيل هيك وسويت زر اوكه؟ اوك كيف ابرمج الزر ذاك يعني انا خلصت شغل لوحه و ابغي زر لما لاعب يضغطه يجيه او يسجل هيك انا رحت wiki mta sa وكتبت اللي ابغاه انا مثال لوحه التسجيل اضافة حساب : addAcount واخذت كود هذا : function registerPlayer(source, commandName, password) -- تحقق مما إذا كان حقل كلمة المرور فارغ أم لا (فارغ إلا إذا لم يدخل واحد) if (password ~= "" and password ~= nil) then -- محاولة إضافة الحساب، وحفظ قيمته في فار local accountAdded = addAccount(getPlayerName(source), password) if (accountAdded) then -- اخبار المستخدم ان كل شيء تم outputChatBox("Thank you "..getPlayerName(source)..", you're now registed, you can login with /login", source) else -- اخبار المستخدم انا هناك خطا عند انشاء الحساب outputChatBox("Error creating account, contact the server admin", source) end else -- هناك خطأ في تركيب الامر ,اخبار المستخدم التركيب الصحيح outputChatBox("Error creating account, correct syntax: /register <password>", source) end end addCommandHandler("register", registerPlayer) -- ا اوك بعدين كيف اخليه علي الزر او لما لاعب يضغط علي زر يجي حدث يعني يجي طلب كيف اتمنا حد يجاوبني انا جديد بل برمجه و بديت ب gui وبعدين Dx انشاء الله
  10. عارف بس كنت ابغي مساعده
  11. ضفني لنت ب سكايب mohtarf.live انا توني احمل قراند FiveM عندي شوي لاق شوف بعطيك المود وانت سويلي تحبه والله يوفقك ي رب
  12. حسابك ي حب ؟ فيس بوك ديسكورد ؟ اكثر شيئ تتواصل به
  13. ممكن تساعدني انت اخي ؟
  14. وش هو شيدر و هل هو موجود ب ويكي ؟
  15. ممكن تخبرني لو سمحت ؟ كود بس؟ هيك
  16. السلام عليكم شباب اليوم صممت لوحه دي اكس حق سيكن لسيارات انفورس infernus لريس طيب ؟ انا جهزته و خلصته و حطيت mouse الس الزر يشتعل و يطفي طيب ؟ بس عندي زرين و صوره فوق دي اكس بس مب داخل gui طيب ؟ بدي زر يمين ويسار يضغط عليهم لاعب و صوره تتغير يعني تروح صوره و تجي صوره ثاني يعني اذا لاعب ضغط صوره زر اليمين تجي صوره اللي بعده و اذا ضغط زر يسار ترجع صوره اللي كانت زي هيك عشان بحط كثير صور انا طيب ؟ وابغي لاعب اذا يضغط علي صوره بس يعطيه سيكن skin vehicle لسياره حقته بس وشكرا! اسف غلي اخطا كتاب اكتب ب جوالي!
  17. Hello, I have created a mod and started it with a work which is very light method Almod player opens the light and open the plate and press on the left and right without adding the button to gui Well I did everything and added the button worked with me board safely and iMouseInPosition has joined the right and Left It was also a peaceful way, but I just wanted to know how the player pressed the button example left or right moving picture means another picture comes and I also want the player if you click on the picture is getting the skin for a car please reply, thank you and thank you
  18. i start debugscript 3 and i get thes when i start the mode ERROR: Loading script failed: 1xLogin/client.lua:58:')' exepted (to close '(' at line 40) near 'function'
  19. hello i build a login panel and i have a big problem anyone fixit this : Client : GUIEditor = { tab = {}, staticimage = {}, tabpanel = {}, edit = {}, button = {}, window = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(0.11, 0.08, 0.77, 0.85, "لوحة التسجيل", true) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 0.73) GUIEditor.memo[1] = guiCreateMemo(0.05, 0.63, 0.18, 0.14, ".\n.\n.\n.\n.\n.\n.\n.\n.\n.\n.\n.\n", true, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.staticimage[1] = guiCreateStaticImage(0.04, 0.32, 0.21, 0.24, ":guieditor/images/examples/mtalogo.png", true, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Tab", GUIEditor.tabpanel[1]) GUIEditor.edit[1] = guiCreateEdit(0.42, 0.38, 0.46, 0.06, "", true, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(0.42, 0.54, 0.46, 0.06, "", true, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(369, 520, 188, 53, "Login", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(716, 520, 188, 53, "Register", false, GUIEditor.window[1]) end ) local screenW, screenH = guiGetScreenSize ( ) addEventHandler("onClientRender", root, function() local playerX, playerY, playerZ = getElementPosition ( localPlayer ) local playerX, playerY, playerZ = getElementPosition ( localPlayer ) local playerZoneName = getZoneName ( playerX, playerY, playerZ ) dxDrawRectangle(147, 54, 986, 50, tocolor(101, 101, 101, 255), true) dxDrawText("لوحة التسجيل", (screenW * 0.1133) - 1, (screenH * 0.0750) - 1, (screenW * 0.8852) - 1, (screenH * 0.1444) - 1, tocolor(0, 0, 0, 255), 1.00, myFont, "center", "center", false, false, true, false, false) dxDrawText("لوحة التسجيل", (screenW * 0.1133) + 1, (screenH * 0.0750) - 1, (screenW * 0.8852) + 1, (screenH * 0.1444) - 1, tocolor(0, 0, 0, 255), 1.00, myFont, "center", "center", false, false, true, false, false) dxDrawText("لوحة التسجيل", (screenW * 0.1133) - 1, (screenH * 0.0750) + 1, (screenW * 0.8852) - 1, (screenH * 0.1444) + 1, tocolor(0, 0, 0, 255), 1.00, myFont, "center", "center", false, false, true, false, false) dxDrawText("لوحة التسجيل", (screenW * 0.1133) + 1, (screenH * 0.0750) + 1, (screenW * 0.8852) + 1, (screenH * 0.1444) + 1, tocolor(0, 0, 0, 255), 1.00, myFont, "center", "center", false, false, true, false, false) dxDrawText("لوحة التسجيل", screenW * 0.1133, screenH * 0.0750, screenW * 0.8852, screenH * 0.1444, tocolor(255, 255, 255, 255), 1.00, myFont, "center", "center", false, false, true, false, false) dxDrawRectangle(screenW * 0.3977, screenH * 0.7958, screenW * 0.1563, screenH * 0.0750, tocolor(84, 84, 84, 254), true) dxDrawRectangle(screenW * 0.6695, screenH * 0.7958, screenW * 0.1563, screenH * 0.0750, tocolor(84, 84, 84, 254), true) dxDrawText("دخول", screenW * 0.3977, screenH * 0.7958, screenW * 0.5539, screenH * 0.8708, tocolor(255, 255, 255, 255), 1.00, myFont, "center", "center", false, false, true, false, false) dxDrawText("انشاء حساب", screenW * 0.6695, screenH * 0.7958, screenW * 0.8258, screenH * 0.8708, tocolor(255, 255, 255, 255), 1.00, "center", "center", false, false, true, false, false) dxDrawText("حقوق طبع والنشر - فنون الريس © 2018", screenW * 0.7695, screenH * 0.9042, screenW * 0.8852, screenH * 0.9250, tocolor(255, 255, 255, 255), 1.00, myFont, "left", "top", false, false, true, false, false) end function HandleTheRendering ( ) addEventHandler ( "onClientRender", root, createText ) -- keep the text visible with onClientRender. end addEventHandler ( "onClientResourceStart", resourceRoot, HandleTheRendering ) -- Use 'toggle' command to switch custom font on and off addCommandHandler( "toggle", function() if not myFont then myFont = dxCreateFont( "hacen-liner-print-out-light.ttf", 45 ) -- Create custom font myFont = dxCreateFont( "hacen-liner-print-out-light.ttf", 30 ) myFont = dxCreateFont( "hacen-liner-print-out-light.ttf", 9 ) local myFont = dxCreateFont("hacen-liner-print-out-light.ttf", 45) local myFont = dxCreateFont("hacen-liner-print-out-light.ttf", 30) local myFont = dxCreateFont("hacen-liner-print-out-light.ttf", 9) local screenW, screenH = guiGetScreenSize() else destroyElement( myFont ) -- Destroy custom font myFont = nil end end ) Server : addEvent("onlogin",true) addEventHandler("onlogin",getRootElement(), function (user,pass) local account = getAccount(user,pass) if ( account ) then logIn(source,account,pass) triggerClientEvent(source,"setcol",source) else outputChatBox("* Worng Username Or Password",source,255,0,0) end end ) addEvent("onre",true) addEventHandler("onre",getRootElement(), function (user,pass) local account = getAccount(user,pass) if ( account ) then outputChatBox("* This Account is Already Used",source,255,0,0) else addAccount(user,pass) outputChatBox("UserName: " .. user .. " PassWord : " .. pass,source,0,150,255) end end )
×
×
  • Create New...