Jump to content

Abdul KariM

Members
  • Posts

    2,711
  • Joined

  • Days Won

    42

Everything posted by Abdul KariM

  1. وش سويت غير انك حطيت مسافات ؟ حط كوده وقلت له عندك قوس ناقص وعطيته الكود بعد ماحطيت القوس وين المشكلة ؟
  2. تقدر تخفي الهود وتسوي صورة dxDrawImage هذي طريقة ثانية بعد
  3. ^ قوس ناقص addEventHandler("onResourceStart", root, function ( ) for k, v in ipairs ( getElementsByType ( "player" ) ) do local ipp = getPlayerIP ( v ) if ( ipp ) then setElementData ( v , "ip", ipp ) end end end );
  4. شي مايخصك واطلع منها افضلك وبعدين وضحت له
  5. اهنيك خلك خلك بالاكواد الجاهزة ياعم وش تقصد ي محترف انت مسوي لي فيها انا الي فاهم البرمجة لو تقصد ذا local screenW, screenH = guiGetScreenSize() نسيت انسخه لاني مستعجل مانب فاضي لك انت واللعبة اكواد جاهزه قال رح لـ حملتك بس
  6. --للحماية فقط مشان ما يوزع احد غيرك isObjectInACLGroup getAccountName getPlayerAccount aclGetGroup --للتوزيع givePlayerMoney addCommandHandler + تحتاج لوب للاعبين عشان توزع عليهم كلهم getElementsByType
  7. ^ يب وين المشكلة مثال عشان تفهم الي اقصده function Her() dxDrawLine(257 - 1, 217 - 1, 257 - 1, 383, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(543, 217 - 1, 257 - 1, 217 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(257 - 1, 383, 543, 383, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(543, 383, 543, 217 - 1, tocolor(0, 0, 0, 255), 1, false) Ex = dxDrawRectangle((screenW - 286) / 2, (screenH - 166) / 2, 286, 166, tocolor(254, 191, 0, 207), false) Ex2 = dxDrawText("# Hello " ..getPlayerName(localPlayer).." ...", (screenW - 263) / 2, (screenH - 47) / 2, ((screenW - 263) / 2) + 263, ( (screenH - 47) / 2) + 47, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) end addEventHandler("onClientRender",root,Her)
  8. ^ يب تمام بس تأكد ان player معرفه
  9. + guiSetVisible and guiGridListGetSelectedItem and guiGridListGetItemText and getAccountPlayer
  10. ^ اصلا ماراح يتشغل كوده DxDrawRectangle لازم يسوي متغير لل فيه DxDrawRectangle او يسوي اسم للفنكشن ويحط كود ال ويستخدم الرندر لاظهاره
  11. عليكم السلام جرب -- aAdminForm = nil aLastCheck = 0 aCurrentVehicle = 429 aCurrentWeapon = 30 aCurrentAmmo = 100 aCurrentSlap = 200 aPlayers = {} aBans = {} aLastSync = 0 aResources = {} mmmm = "" function mute( player, action, data, additional, additional2 ) local reason = data or "" local seconds = tonumber(additional) and tonumber(additional) > 0 and tonumber(additional) mdata = reason~="" and ( "(" .. reason .. ")" ) or "" more = seconds and ( "(" .. secondsToTimeDesc(seconds) .. ")" ) or "" dxDrawText("Mute Reason : "..reason.."", 20, 288, 205, 302, tocolor(199, 235, 0, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Mute By : "..getPlayerName(localPlayer).."", 20, 307, 205, 321, tocolor(32, 143, 180, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Mute For : "..more.."", 20, 327, 205, 341, tocolor(213, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) end addEvent("mutekfo", true) addEventHandler("mutekfo", root, function () addEventHandler("onClientRender",getRootElement(),mute) end ) addEvent("mutekfo1",true) addEventHandler("mutekfo1", root, function () removeEventHandler("onClientRender",getRootElement(),mute) end ) + بالسيرفر غير اسم الترايقر حقت الكلينت بالموجود بالكود
  12. المره هذي عليك حاول تسوي الاكواد وبنساعدك لو انتقل الاعب onPlayerSpawn -- لو الاعب انتقل setElementData -- نحط له داتا onPlayerWasted -- لو مات الاعب getElementData -- نجيب الداتا spawnPlayer -- نسوي له سباون
  13. ^ حصل خير والله يسلمك وحياك في اي وقت اطرح الاكواد او الي تبيه ذذ
  14. ^ حمل السكربت منا http://www.up-00.com/?iBbP فقط احذف القديم وركب ذا بداله
  15. ^ سوي ريستارت للسكربت اكثر من مره وتأكد انك ضايفه قروب الي فيه خصائص كامله
  16. ^ انا مجربه وشغال اكتب باف8 debugscript 3 وانسخ لي الاخطاء الي بتطلع يوم تطلع خذها من لوج السيرفر عشان اعرفها
  17. ^ تفضل وفي عندك نواقص في الكود وسويته مثل استقبال الترايقر لو انتهى من تسجيل الدخول تفضل كلينت GUIEditor = { label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() local screenW, screenH = guiGetScreenSize() wnd = guiCreateWindow((screenW - 390) / 2, (screenH - 329) / 2, 390, 200, ".::[ Login & Register Systeam ]::.", false) guiWindowSetSizable(wnd, false) guiSetProperty(wnd, "CaptionColour", "FF2FFE00") guiSetAlpha(wnd, 1.00) user = guiCreateEdit(80, 45, 280, 29, "", false, wnd) pass = guiCreateEdit(80, 95, 179, 29, "", false, wnd) guiEditSetMasked(pass, true) user_l = guiCreateLabel(10, 50, 64, 18, "Username :", false, wnd) pass_l = guiCreateLabel(10, 100, 64, 18, "Password :", false, wnd) remember = guiCreateCheckBox(260, 95, 100, 30, "Save Password !", true, false, wnd) guiSetFont(remember, "default-small") login = guiCreateButton(83, 140, 105, 48, "Login!", false, wnd) guiSetProperty(login, "NormalTextColour", "FF00FDFB") guiSetFont(login, "default-bold-small") reg = guiCreateButton(211, 140, 105, 48, "Register!", false, wnd) guiSetFont(reg, "default-bold-small") guiSetProperty(reg, "NormalTextColour", "FF00FDFB") setCameraMatrix ( 1483.94812 , -1626.66101 , 53.52287 , 1530.75842 ) --1658.88245, 30.11048 triggerServerEvent("onGetSave",localPlayer) showCursor ( true ) fadeCamera(true) end ) addEvent("onPutSave",true) addEventHandler("onPutSave",root, function (puser,ppass) guiSetText(user,puser) guiSetText(pass,ppass) end ) addEventHandler("onClientGUIClick",root, function () if ( source == guest ) then guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) Show() elseif ( source == english ) then guiSetText(user_l,"Username") guiSetText(pass_l,"Password") guiSetText(login,"Login!") guiSetText(reg,"Register!") guiSetText(remember,"(Save!)") guiSetText(guest,"Guest") elseif ( source == arabic ) then guiSetText(user_l,"حسابك") guiSetText(pass_l,"كلمه المرور") guiSetText(login,"تسجيل الدخول") guiSetText(reg,"حساب جديد") guiSetText(remember,"تذكرني") guiSetText(guest,"زائر") end 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 == reg ) 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 ) addEvent("onCl",true) addEventHandler("onCl",root, function( ) guiSetVisible ( wnd , false ) setTimer ( fadeCamera, 3000, 1, true, 2 ) triggerServerEvent("CloseLogin",localPlayer) end ); سيرفر xecuteSQLQuery("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("* تم بنجاح تسجيل دخول",source,0,255,0) AddPlayer(serial,user,pass) triggerClientEvent(source,"onCl",source) else outputChatBox("* الحساب او كلمة المرور خطأ",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("* تم بنجاح تسجيل دخول",source,0,255,0) triggerClientEvent(source,"onCl",source) else outputChatBox("* الحساب او كلمة مرور خطأ",source,255,0,0) end end ) addEvent("onReg",true) addEventHandler("onReg",root, function (user,pass) local acc = getAccount(user,pass) if acc then outputChatBox("* هذا الحساب مستخدم من قبل",source,255,0,0) else addAccount(user,pass) outputChatBox("* Username = " .. user .. "",source,0,255,0) outputChatBox("* Password = " .. pass .. "",source,0,255,0) end end ) addEvent("CloseLogin",true) addEventHandler("CloseLogin",root, function() spawnPlayer(source,1496.46680, -1578.64136, 67.21094,0,46) setCameraTarget(source,source) end) جرب وردلي خبر انا مجربها وشغال #
  18. ^ اطرح اكواد لوحة التسجيل
  19. ي ذكي لو الاعب دخل بتشتغل السكربتات ف لو استخدمت حدث onPlayerJoin ولو دخل راح يصير شوية لاق ويصير الاق على الكل لان لو دخل الاعب السكربت اجباري بيشتغل وبعدين onPlayerJoin خطأ لو يبي يستخدم onClientPlayerJoin فا الافضل انه يستخدم onClientResourceStart تجنبا للاق
  20. انا فاهمه هو قال لو سجل دخوله الكاميرا ماتركس ماتروح عشان كذا عطيته فنكشنات بالنسبة لصاحب الموضوع يعني يعني لو الاعب سجل دخوله وحط كلمة السر والباسوورد صح انت تسوي ترايقر للسيرفر مع استخدام setTimer و تسوي fadeCamera مع setTimer وتستقبل الترايقر بالسيرفر باستخدام addEvent + addEventHandler وبعدين تحطه بمكان معين تستخدم spawnPlayer او setElementPosition حاول وبساعدك
  21. ^ طيب بعد مايسجل دخوله سوي ترايقر للسيرفر الترايقر موجود يوم يسجل دخول يخفي له اللوحة سوي تايمر وانقله لمكان الفنكشنات triggerServerEvent setTimer fadeCamera addEvent addEventHandler setElementPosition او spawnPlayer حاول فيها وانا اساعدك
  22. موب شرط بس يفضل تحطه بنفس السكربت عشان تقدر تعدل الاحداثيات وتذكر مكان الكود ويكون كلينت بحيث لو الاعب دخل تصير الكاميرا على الي دخل فقط ماتصير على الكل افضلك كلينت تفضل بالكيلنت addEventHandler ("onClientResourceStart", root , function ( ) setCameraMatrix ( 1483.94812 , -1626.66101 , 53.52287 , 1530.75842 ) --1658.88245, 30.11048 end ) ;
  23. ^ الي فهمته منك لو الاعب يجي سجل دخوله تصير الكاميرا ماتركس على المركز تفضل addEventHandler("onResourceStart", root , function ( ) setCameraMatrix( source , 1483.94812 , -1626.66101 , 53.52287 , 1530.75842 ) --1658.88245, 30.11048 end ) ; او addEventHandler ("onResourceStart", root , function ( ) setCameraMatrix ( client , 1483.94812 , -1626.66101 , 53.52287 , 1530.75842 ) --1658.88245, 30.11048 end ) ; جربهم وردلي خبر
  24. ^ اول شي الكود سيرفر ولا كلينت الي اشوفه سيرفر ثاني شي مادام فيه احداثيات المركز الي انت تبيها ليه تطرحه الي طلبته منك احداثيات المركز و نوعه سيرفر ولا كلينت بس
  25. ^ طيب اطرح كود الكاميرا ماتركس والاحداثيات حقات المركز
×
×
  • Create New...