Jump to content

momar5700

Members
  • Posts

    381
  • Joined

  • Last visited

Everything posted by momar5700

  1. قصدق تبي تحول لوخة تسجيل الي في قيم مود الي لوحة تسجيل دي اكس صح
  2. ايوه سيارات عشوئية بس ممكن تركبها انت لو سمحت ____________________________________________________________________________________________________ كيف احطها veh [ element ] = createVehicle ( 411, x , y + 3 , z + 3 )
  3. كلنت local g_screenX, g_screenY = guiGetScreenSize(); local gScale = 0.2; local gAlphaDistance = 80; local gMaxDistance = 80; -- Max Distance local gTextAlpha = 150; local gTextSize = 2.5; local gAlphaDiff = gMaxDistance - gAlphaDistance; gScale = 1 / gScale * 800 / g_screenY; local gMaxScaleCurve = { { 0, 0 }, { 3, 3 }, { 13, 5 } }; local gTextScaleCurve = { { 0, 0.8 }, { 0.8, 1.2 }, { 99, 99 } }; local gTextAlphaCurve = { { 0, 0 }, { 25, 100 }, { 120, 190 }, { 255, 190 } }; local Marker = createMarker( -3275.2436523438,-3007.7487792969,5, 'corona', 1.0, 0, 0, 0, 0 ); addEventHandler ( 'onClientRender', root, function ( ) local x, y, z = getCameraMatrix(); local x1, y1, z1 = getElementPosition ( Marker ); local distance_1 = getDistanceBetweenPoints3D( x, y, z, x1, y1, z1 ); if distance_1 <= gMaxDistance then local x1_, y1_ = getScreenFromWorldPosition( x1, y1, z1 + 0.95, 0.06 ); if x1_ and y1_ then local scale = 1 / ( gScale * ( distance_1 / gMaxDistance ) ); local alpha = ( ( distance_1 - gAlphaDistance ) / gAlphaDiff ); alpha = ( alpha < 0 ) and gTextAlpha or gTextAlpha - ( alpha * gTextAlpha ); scale = math.evalCurve( gMaxScaleCurve, scale ); local textscale = math.evalCurve( gTextScaleCurve, scale ); local textalpha = math.evalCurve( gTextAlphaCurve, alpha ); dxDrawText( "لـ أخذ موتر #", x1_, y1_, x1_, y1_, tocolor ( 0, 0, 255, textalpha ), textscale * gTextSize, "default-bold", "center", "bottom", false, true ) end end end ); function math.evalCurve( curve, input ) if input < curve[ 1 ][ 1 ] then return curve[ 1 ][ 2 ]; end for idx = 2, #curve do if input < curve[ idx ][ 1 ] then local x1 = curve[ idx - 1 ][ 1 ]; local y1 = curve[ idx - 1 ][ 2 ]; local x2 = curve[ idx ][ 1 ]; local y2 = curve[ idx ][ 2 ]; local alpha = ( input - x1 ) / ( x2 - x1 ); return math.lerp( y1, y2, alpha ); end end return curve[ #curve ][ 2 ]; end function math.lerp( from, to, alpha ) return from + ( to-from ) * alpha; end سيرفر veh = {} marker = {} Data = { {-3275.2436523438,-3007.7487792969,5, "corona", 4, 255, 0, 0, 155 }, } setElementData(marker,'text3D','لـ أخذ موتر #') function giveVehicle ( element ) if ( getElementType ( element ) == "player" and not isPedInVehicle ( element ) ) then if ( isElement ( veh [ element ] ) ) then destroyElement ( veh [ element ] ) end veh [ element ] = nil local x, y, z = getElementPosition( element ) veh [ element ] = createVehicle ( 411, x , y + 3 , z + 3 ) setVehicleDamageProof ( veh [ element ] , true ) warpPedIntoVehicle( element ,veh [ element ] ) addVehicleUpgrade( veh [ element ] , 1010) addVehicleUpgrade( veh [ element ] , 1087) outputChatBox ( "# [ تم أعطائك موتر مع : نيترو + هيدروليك ]", element, 255, 0, 0, true ) outputChatBox ( "# [ ( Ctrl ) لـ تشغيل/ايقاف النيترو اضغط ]", element, 255, 255, 0, true ) outputChatBox ( "# [ ( Caps Lock ) لـ تشغيل/ايقاف الهيدروليك اضغط ]", element, 255, 0, 255, true ) end end addEventHandler("onResourceStart",resourceRoot, function () for k,v in ipairs ( Data ) do marker [ k ] = createMarker ( v [ 1 ] , v [ 2 ] , v [ 3 ] - 1 , v [ 4 ] , v [ 5 ] , v [ 6 ], v [ 7 ] , v [ 8 ] , v [ 9 ] ) addEventHandler("onMarkerHit", marker [ k ] , giveVehicle ) end end) addEventHandler("onPlayerQuit",root,function() if ( isElement ( veh [ source ] ) ) then destroyElement ( veh [ source ] ) end veh [ source ] = nil end) addEventHandler( "onVehicleExplode", root, function( ) setTimer( destroyElement, 2000, 1, source ) end ) addEventHandler( "onPlayerQuit", root, function( ) if Vehicles[source] then destroyElement( Vehicles[source] ) end end ) هي كل الابية انه كل سيارات تيجي يعني زي الي في الوزارة لما تدخل الماركت يعطيك سيارة ولما تدخل مره ثانيه يعطيك سيارة تانيه يعني يكون فيها كل سيارات هادا هو الي ابيه بس
  4. سهلة جدا بس مشكلة تاخد وقت وماحد فاضي
  5. اسهل شي خلي لوحة الي تبيه تفتح بزر داخل لوحة تفتح باف 8 ورح عند الوحة الاول وحط فيها زر كدا addEventHandler('onClientGUIClick',root, function() if source == GUIEditor.button[2] then --هنا اسم زر showCursor ( false ) executeCommandHandler ( "QWANEN" )-- هنا اس كلمة الي راح تكتبها في اف8 guiSetVisible (GUIEditor.window[1] ,false) -- هنا اسم لوحة end end )
  6. يعني انت ماتعرف تسوي من فيديو طيب خدهههههههههههه http://up.top4top.net/downloadf-top4top ... 1-zip.html
  7. اتفضل اخوي شوف شرح مستر جراند راح يفيدك #دروس برمجة | شرح زر بداخل لوحة لفتح لوحة أخرى ~|2015 by MR.GRAND
  8. سيرفر veh = {} marker = {} Data = { {-3275.2436523438,-3007.7487792969,5, "corona", 4, 255, 0, 0, 155 }, } setElementData(marker,'text3D','لـ أخذ موتر #') كلنت local g_screenX, g_screenY = guiGetScreenSize(); local gScale = 0.2; local gAlphaDistance = 80; local gMaxDistance = 80; -- Max Distance local gTextAlpha = 150; local gTextSize = 2.5; local gAlphaDiff = gMaxDistance - gAlphaDistance; gScale = 1 / gScale * 800 / g_screenY; local gMaxScaleCurve = { { 0, 0 }, { 3, 3 }, { 13, 5 } }; local gTextScaleCurve = { { 0, 0.8 }, { 0.8, 1.2 }, { 99, 99 } }; local gTextAlphaCurve = { { 0, 0 }, { 25, 100 }, { 120, 190 }, { 255, 190 } }; local Marker = createMarker( -3275.2436523438,-3007.7487792969,5, 'corona', 1.0, 0, 0, 0, 0 ); addEventHandler ( 'onClientRender', root, function ( ) local x, y, z = getCameraMatrix(); local x1, y1, z1 = getElementPosition ( Marker ); local distance_1 = getDistanceBetweenPoints3D( x, y, z, x1, y1, z1 ); if distance_1 <= gMaxDistance then local x1_, y1_ = getScreenFromWorldPosition( x1, y1, z1 + 0.95, 0.06 ); if x1_ and y1_ then local scale = 1 / ( gScale * ( distance_1 / gMaxDistance ) ); local alpha = ( ( distance_1 - gAlphaDistance ) / gAlphaDiff ); alpha = ( alpha < 0 ) and gTextAlpha or gTextAlpha - ( alpha * gTextAlpha ); scale = math.evalCurve( gMaxScaleCurve, scale ); local textscale = math.evalCurve( gTextScaleCurve, scale ); local textalpha = math.evalCurve( gTextAlphaCurve, alpha ); dxDrawText( "لـ أخذ موتر #", x1_, y1_, x1_, y1_, tocolor ( 0, 0, 255, textalpha ), textscale * gTextSize, "default-bold", "center", "bottom", false, true ) end end end ); function math.evalCurve( curve, input ) if input < curve[ 1 ][ 1 ] then return curve[ 1 ][ 2 ]; end for idx = 2, #curve do if input < curve[ idx ][ 1 ] then local x1 = curve[ idx - 1 ][ 1 ]; local y1 = curve[ idx - 1 ][ 2 ]; local x2 = curve[ idx ][ 1 ]; local y2 = curve[ idx ][ 2 ]; local alpha = ( input - x1 ) / ( x2 - x1 ); return math.lerp( y1, y2, alpha ); end end return curve[ #curve ][ 2 ]; end function math.lerp( from, to, alpha ) return from + ( to-from ) * alpha; end
  9. خلا اشتغل مشكلة كانت انه لازم اركب بالميتا كدا "noovl" version="1.4" type="gamemode" name="GAME-MOD-NOOVL" description="Hajwalah GameMode By AboShanab | For L.D" />
  10. اوف ايه عرفت الحين ايش الخطاء شكرا نسيت اني احط بيانات زي كدا صح "noovl" version="1.4" type="gamemode" name="GAME-MOD-NOOVL" description="Hajwalah GameMode By AboShanab | For L.D" />
  11. ليش انا عندي في سيرفر محلي مافي ولاخطاء طيب ممكن تصححه
  12. كدا يعني -- مش اشتغل واكتبت دي بق ومايجي شيء كله لون اصفر ملاحظه: انا ضايف في جروب ادمن والكونسل
  13. المشكلة في قيم مود انا عندي شغال 100 % حطيته في سيرفر حصلت مشكلة وهي اجي اسجيل دخول لي مايسجل ابدا كانك مسوي لوحة تظهر بس وش حل للمشكلة هو اجربه في سيرفر محلي يشتغل ليش function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end local sm = {} sm.moov = 0 sm.object1, sm.object2 = nil, nil local function removeCamHandler () if(sm.moov == 1) then sm.moov = 0 removeEventHandler ( "onClientPreRender", getRootElement(), camRender ) end end function anim(tag,animTime,de1,de2,de3,hasta1,hasta2,hasta3,typeAnim) local now = getTickCount() local endTime = tag + animTime local elapsedTime = now - tag local duration = endTime - tag local progress = elapsedTime / duration local a, b, c = interpolateBetween ( de1,de2,de3,hasta1,hasta2,hasta3, progress, typeAnim) return a, b, c end function camRender () if sm.object1 and isElement(sm.object1) then local x1, y1, z1 = getElementPosition ( sm.object1 ) local x2, y2, z2 = getElementPosition ( sm.object2 ) setCameraMatrix ( x1, y1, z1, x2, y2, z2 ) end end function smoothMoveCamera ( x1, y1, z1, x1t, y1t, z1t, x2, y2, z2, x2t, y2t, z2t, time ) if(sm.moov == 1) then return false end sm.object1 = createObject ( 1337, x1, y1, z1 ) sm.object2 = createObject ( 1337, x1t, y1t, z1t ) setElementAlpha ( sm.object1, 0 ) setElementAlpha ( sm.object2, 0 ) setObjectScale(sm.object1, 0.01) setObjectScale(sm.object2, 0.01) moveObject ( sm.object1, time, x2, y2, z2, 0, 0, 0, "InOutQuad" ) moveObject ( sm.object2, time, x2t, y2t, z2t, 0, 0, 0, "InOutQuad" ) addEventHandler ( "onClientPreRender", getRootElement(), camRender ) sm.moov = 1 setTimer ( removeCamHandler, time, 1 ) setTimer ( destroyElement, time, 1, sm.object1 ) setTimer ( destroyElement, time, 1, sm.object2 ) return true end x, y = guiGetScreenSize() font="default-bold" fontTam=5 spcGam=dxGetTextWidth ("server-SH-3",fontTam,font) -- اسم سيرفرك بالنجليزي function intro() ahora = getTickCount() count=ahora-start dxDrawImage(0, 0, x, y, '',0,0,0,tocolor(255,255,255),false) sizeX=64*1.21 sizeY=64*1.21 varX,varY,varZ = anim(start,1000,spcGam,0,0,0,spcGam,150,"OutBack") dxDrawText("server-SH-3",0+x/2-varY/2,y/2-100,varY+x/2-varY/2,y,tocolor(38,205,0,255),fontTam,font,nil,nil,true) ---- اسم سيرفرك dxDrawText("",1+x/-varY/6-dxGetTextWidth ("i",fontTam,font),y/2-100,varY+x/2-varY/2,y,tocolor(255,255,255,255),fontTam,font,nil,nil,false,false,false,true) dxDrawText("♥",x/2+varY/2,y/2-100,varY+x/2-varY/2,y,tocolor(255,255,255,255),fontTam,font,nil,nil,false,false,false,true) if (count>1500) then varX2,varY2,varZ2 = anim(start+1500,1000,0,0,0,200,250,360,"OutBack") dxDrawText("اهلا وسهلا بكم في سيرفر عشاق الوناسة",0+x/2-varY/2,y/2-100+dxGetFontHeight(fontTam,font),varY+x/2-varY/2,y,tocolor(255,255,255,varX2),1.5,font,"center",nil,false,false,false,true) ---- اسم سيرفرك dxDrawText("نتمنا ان ينال السيرفر اعجابكم",0+x/2-varY/2,y/2-80+dxGetFontHeight(fontTam,font),varY+x/2-varY/2,y,tocolor(255,255,255,varX2),1.5,font,"center",nil,false,false,false,true) ---- اسم سيرفرك dxDrawText("Welcome to sever__SH-3 ...",0+x/2-varY/2,y/2-60+dxGetFontHeight(fontTam,font),varY+x/2-varY/2,y,tocolor(255,255,255,varX2),1.5,font,"center",nil,false,false,false,true) end if (count>2000) then varX2,varY3,varZ3 = anim(start+2000,1000*10,0,0,0,200,250,360*5,"Linear") dxDrawImage ( x/2-sizeX/2, y/2+50, sizeX, sizeY, 'img/cargando2.png',180+varZ3) dxDrawText("Loading..",12,y/2+60+sizeY+1,x,y,tocolor(0,0,0,85),1.5,font,"center",nil,false,false,false,true) dxDrawText("Loading..",10,y/2+60+sizeY,x,y,tocolor(255,255,255,255),1.5,font,"center",nil,false,false,false,true) end end function anim(tag,animTime,de1,de2,de3,hasta1,hasta2,hasta3,typeAnim) local now = getTickCount() local endTime = tag + animTime local elapsedTime = now - tag local duration = endTime - tag local progress = elapsedTime / duration local a, b, c = interpolateBetween ( de1,de2,de3,hasta1,hasta2,hasta3, progress, typeAnim) return a, b, c end fileDelete("intro_c.lua") local sx, sy = guiGetScreenSize() alpha = 250 MP = "files/1.png" MX = sx MY = sy function adjIntro(adj) _, times = getTimerDetails(IntroTimer) if adj == "M1" then MX = (MX*0.95)+5 MY = (MY*0.95) if times == 1 then setTimer(function() if (alpha <= 250) and not (alpha <= 0) then alpha = alpha - 10 else IntroTimer = setTimer(adjIntro, 50, 26, "M2") end end, 50, 26) end elseif adj == "M2" then if (alpha < 250) and (alpha >= 0) then alpha = alpha + 10 end MX = (MX/0.95)-5 MY = (MY/0.95) MP = "files/2.png" if times == 1 then setTimer(function() MP = "files/3.png" setTimer(function() IntroTimer = setTimer(adjIntro, 50, 26, "M3") end, 3500, 1) end, 4000, 1) end elseif adj == "M3" then MX = (MX*0.95)+5 MY = (MY*0.95) if times == 1 then MP = "files/4.png" MX = (MX/0.95)-5 MY = (MY/0.95) setTimer(function() setTimer(function() if (alpha <= 250) and not (alpha <= 0) then alpha = alpha - 10 else removeEventHandler("onClientRender", root, drawIntro) fadeCamera(true, 6, 0, 0, 0) setCameraMatrix(-1475.5, 831.18, 65.5, -1487.5, 800.18, 65.5) dx = true showCursor(true) guiSetVisible(wnd, true) end end, 50, 26) end, 3500, 1) end end end function drawIntro() dxDrawImage(sx/2-(MX/2), sy/2-(MY/2), MX, MY, MP, 0, 0, 0, tocolor(255, 255, 255, alpha)) end function main() removeEventHandler ("onClientRender",root,Dx) fadeCamera(false); showChat(false) IntroSong = playSound ("files/Intro.mp3") showPlayerHudComponent("all", false) start = getTickCount() addEventHandler("onClientRender",getRootElement(),intro) setTimer ( function() removeEventHandler("onClientRender",getRootElement(),intro) IntroTimer = setTimer(adjIntro, 50, 26, "M1") addEventHandler("onClientRender", root, drawIntro) triggerEvent("onFinishIntro",getRootElement()) setCameraMatrix(-1475.5, 831.18, 65.5, -1487.5, 800.18, 65.5) guiSetInputEnabled(true) setElementDimension(localPlayer,0) setElementData(localPlayer,"new",false) outputChatBox("#0069c7 ## #ff0000 GameMode By #0069c7[#ff0000MR~#0069c7Mos.[T].aّّّfA~#ff0000] #0069c7##",255,0,0,true) end, 5000, 1 ) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),main) wnd = guiCreateStaticImage(45, 8, 718, 544, "img.png",false) lojio = guiCreateStaticImage(9, 6, 694, 285, "fondo.png", false, wnd) english = guiCreateButton(0.0231,0.0284,0.0566,0.1082,"En",false,wnd) guiSetFont(english,"default-bold-small") guiSetVisible(wnd,false) setTimer(function() guiSetProperty(english, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255))) end, 1000, 0) arabic = guiCreateButton(621, 372, 125, 125, "Ar",true,wnd) guiSetFont(arabic,"default-bold-small") setTimer(function() guiSetProperty(arabic, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255))) end, 1000, 0) user_2 = guiCreateLabel(463, 310, 177, 29, "Username", false, wnd) function Color ( ) guiLabelSetColor (user_2, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) end setTimer ( Color, 1000, 0 ) guiLabelSetHorizontalAlign(user_2,"center",false) guiSetFont(user_2,"default-bold-small") setElementData(user_2, "tooltip-text", "اسم حسابك", false) -- أضافة الكلام للزر setElementData(user_2, "tooltip-color", "#FFFFFF", false) -- تغيير لون الخط setElementData(user_2, "tooltip-background", "#666666", false) -- تغيير لون الخلفية setElementData(user_2, "default-bold", "bankgothic 0.5", false) -- تغيير نوع الخط و حجم الخط user_l = guiCreateLabel(115, 310, 177, 29, "Username",false,wnd) function Color ( ) guiLabelSetColor (user_l, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) end setTimer ( Color, 1000, 0 ) guiLabelSetHorizontalAlign(user_l,"center",false) guiSetFont(user_l,"default-bold-small") setElementData(user_l, "tooltip-text", "اسم حسابك", false) -- أضافة الكلام للزر setElementData(user_l, "tooltip-color", "#FFFFFF", false) -- تغيير لون الخط setElementData(user_l, "tooltip-background", "#666666", false) -- تغيير لون الخلفية setElementData(user_l, "default-bold", "bankgothic 0.5", false) -- تغيير نوع الخط و حجم الخط user1 = guiCreateEdit(476, 345, 159, 28, "", false, wnd) setTimer(function() guiSetProperty(user1, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255))) end, 1000, 0) user = guiCreateEdit(126, 343, 159, 28, "",false,wnd) setTimer(function() guiSetProperty(user, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255))) end, 1000, 0) pass_2 = guiCreateLabel(462, 379, 177, 29, "Password", false,wnd) function Color ( ) guiLabelSetColor (pass_2, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) end
  14. سلام عليكم ورحمة الله وبركاته عندي مشكلة ارجو حل .......................................................... addEventHandler ( "onClientGUIClick", guiRoot, function ( ) if ( source == login ) then local user = guiGetText(user) local pass = guiGetText(pass) local user1 = guiGetText(user1) local pass1 = guiGetText(pass1) if user ~= "" and pass ~= "" then if guiCheckBoxGetSelected(remember) then triggerServerEvent("onLogin",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 local user = guiGetText(user) local pass = guiGetText(pass) local user1 = guiGetText(user1) local pass1 = guiGetText(pass1) if user1 ~= "" and pass1 ~= "" then triggerServerEvent("onReg",localPlayer,user1,pass1) else outputChatBox("* You Must Write Username Or Password",255,0,0) end elseif ( guiCheckBoxGetSelected ( chechbox ) ) then if ( isElement ( IntroSong ) ) then destroyElement ( IntroSong ) outputChatBox ( "Sound Played !", 255, 255, 0, true ) elseif ( guiCheckBoxGetSelected ( chechbox ) ) then IntroSong = playSound ("files/Intro.mp3") outputChatBox ( "Sound Stopped !", 255, 255, 0, true ) end end end) المشكلة هي ............... انه صار شغال بس عشان تضفي الاغنيه تحديد علية لو تبي تشغل الاغنيه تشيل تحديد وتحطه انا مابي كدا ابي لما تحدد عليه تضفي الاغنيه ولما تشيل تحديد تشتغل الاغنيه اظن طلبي سهل ممكن حل ؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟ظ
  15. ياخي هو كدا شغال لما احدد عليها تضفي صوت addEventHandler("onClientGUIClick",root, function () local user = guiGetText(user) local pass = guiGetText(pass) local user1 = guiGetText(user1) local pass1 = guiGetText(pass1) if ( source == login ) then if user ~= "" and pass ~= "" then if guiCheckBoxGetSelected(remember) then if ( guiCheckBoxGetSelected ( chechbox ) ) then if ( isElement ( IntroSong ) ) then destroyElement (IntroSong) triggerServerEvent("onLogin",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 user1 ~= "" and pass1 ~= "" then triggerServerEvent("onReg",localPlayer,user1,pass1) else outputChatBox("* You Must Write Username Or Password",255,0,0) end end end end end ) مشكلة شيء واحد وهو لو انت مش حددت رح يقول لك لازم تحدد يعني لازم تحدد لو مش حدد مايسجل لما تحديد يسجل فهمتوو
  16. ايه سويت كدا شلته وبدلته
  17. سيرفر ياريت بعد اعطاك كودات تعضيني تصحيحك يارب........ي addEventHandler("onPlayerJoin", root, function () source:setPosition(0,0,0); source:setInterior(0) fadeCamera( source, false ); end ); function getPlayerSkin(player) return getElementData(player,"skin") end function getPlayerXYZ(player) local x,y,z = getElementData(player,"x"),getElementData(player,"y"),getElementData(player,"z") return x,y,z end -- Login Register System 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("* You Have Been Successfuly Login",source,0,255,0) AddPlayer(serial,user,pass) triggerClientEvent(source,"onCl",source) else outputChatBox("* Worng Username Or Password",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("* You Have Been Successfuly Login",source,0,255,0) triggerClientEvent(source,"onCl",source) else outputChatBox("* Worng Username Or Password",source,255,0,0) end end ) addEvent("onReg",true) addEventHandler("onReg",root, function (user1,pass1) local acc = getAccount(user1,pass1) if acc then outputChatBox("لايمكن استخدام نفس اسم حساب اكثر من مرة",source,255,0,0) else outputChatBox("*تم انشاء حساب جديد يرجو حفظ اسم حساب وسر وعدم نسيانه",source,0,255,0) addAccount(user1,pass1) outputChatBox("* اسم حساب جديد : = " .. user1 .. "",source,0,255,0) outputChatBox("* باسورد الحالي : = " .. pass1 .. "",source,0,255,0) end end ) addEventHandler("onPlayerWasted",root, function () if getElementData(source,"new") == true then setTimer(function(player) spawnPlayer(player,326.87582397461,2542.5478515625,16.806928634644,0,46,0,1) setCameraTarget(player,player) fadeCamera(player,true) end,3500,1,source) else setTimer(function(player) local x,y,z = getPlayerXYZ(player) spawnPlayer(player,x,y,z,0,getPlayerSkin(player),0,0) setCameraTarget(player,player) fadeCamera(player,true) end,3500,1,source) end end ) addEvent("SpawnPlayer",true) addEventHandler("SpawnPlayer",root, function () local x,y,z = getPlayerXYZ(source) spawnPlayer(source,x,y,z,0,getPlayerSkin(source),0,0) setCameraTarget(source,source) fadeCamera(source,true) showChat(source,true) end ) -----------------------------------|Medic|----------------------------------- addEvent("healP", true ) addEventHandler("healP", root, function(healer) local Health = getElementHealth(source) if (Health < 99) then local hp = 2*Health if getPlayerMoney(source) >= hp then setElementHealth(source, Health+15) givePlayerMoney(healer, hp) takePlayerMoney(source, hp) exports.TopBarChat:sendClientMessage("You earned $"..hp, healer, 0, 255, 0) end end end) -----------------------------------|Medic|-----------------------------------
  18. اطفطل يامستر قراند function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end local sm = {} sm.moov = 0 sm.object1, sm.object2 = nil, nil local function removeCamHandler () if(sm.moov == 1) then sm.moov = 0 removeEventHandler ( "onClientPreRender", getRootElement(), camRender ) end end function anim(tag,animTime,de1,de2,de3,hasta1,hasta2,hasta3,typeAnim) local now = getTickCount() local endTime = tag + animTime local elapsedTime = now - tag local duration = endTime - tag local progress = elapsedTime / duration local a, b, c = interpolateBetween ( de1,de2,de3,hasta1,hasta2,hasta3, progress, typeAnim) return a, b, c end function camRender () if sm.object1 and isElement(sm.object1) then local x1, y1, z1 = getElementPosition ( sm.object1 ) local x2, y2, z2 = getElementPosition ( sm.object2 ) setCameraMatrix ( x1, y1, z1, x2, y2, z2 ) end end function smoothMoveCamera ( x1, y1, z1, x1t, y1t, z1t, x2, y2, z2, x2t, y2t, z2t, time ) if(sm.moov == 1) then return false end sm.object1 = createObject ( 1337, x1, y1, z1 ) sm.object2 = createObject ( 1337, x1t, y1t, z1t ) setElementAlpha ( sm.object1, 0 ) setElementAlpha ( sm.object2, 0 ) setObjectScale(sm.object1, 0.01) setObjectScale(sm.object2, 0.01) moveObject ( sm.object1, time, x2, y2, z2, 0, 0, 0, "InOutQuad" ) moveObject ( sm.object2, time, x2t, y2t, z2t, 0, 0, 0, "InOutQuad" ) addEventHandler ( "onClientPreRender", getRootElement(), camRender ) sm.moov = 1 setTimer ( removeCamHandler, time, 1 ) setTimer ( destroyElement, time, 1, sm.object1 ) setTimer ( destroyElement, time, 1, sm.object2 ) return true end x, y = guiGetScreenSize() font="default-bold" fontTam=5 spcGam=dxGetTextWidth ("server-SH-3",fontTam,font) -- اسم سيرفرك بالنجليزي function intro() ahora = getTickCount() count=ahora-start dxDrawImage(0, 0, x, y, '',0,0,0,tocolor(255,255,255),false) sizeX=64*1.21 sizeY=64*1.21 varX,varY,varZ = anim(start,1000,spcGam,0,0,0,spcGam,150,"OutBack") dxDrawText("server-SH-3",0+x/2-varY/2,y/2-100,varY+x/2-varY/2,y,tocolor(38,205,0,255),fontTam,font,nil,nil,true) ---- اسم سيرفرك dxDrawText("",1+x/-varY/6-dxGetTextWidth ("i",fontTam,font),y/2-100,varY+x/2-varY/2,y,tocolor(255,255,255,255),fontTam,font,nil,nil,false,false,false,true) dxDrawText("♥",x/2+varY/2,y/2-100,varY+x/2-varY/2,y,tocolor(255,255,255,255),fontTam,font,nil,nil,false,false,false,true) if (count>1500) then varX2,varY2,varZ2 = anim(start+1500,1000,0,0,0,200,250,360,"OutBack") dxDrawText("اهلا وسهلا بكم في سيرفر عشاق الوناسة",0+x/2-varY/2,y/2-100+dxGetFontHeight(fontTam,font),varY+x/2-varY/2,y,tocolor(255,255,255,varX2),1.5,font,"center",nil,false,false,false,true) ---- اسم سيرفرك dxDrawText("نتمنا ان ينال السيرفر اعجابكم",0+x/2-varY/2,y/2-80+dxGetFontHeight(fontTam,font),varY+x/2-varY/2,y,tocolor(255,255,255,varX2),1.5,font,"center",nil,false,false,false,true) ---- اسم سيرفرك dxDrawText("Welcome to sever__SH-3 ...",0+x/2-varY/2,y/2-60+dxGetFontHeight(fontTam,font),varY+x/2-varY/2,y,tocolor(255,255,255,varX2),1.5,font,"center",nil,false,false,false,true) end if (count>2000) then varX2,varY3,varZ3 = anim(start+2000,1000*10,0,0,0,200,250,360*5,"Linear") dxDrawImage ( x/2-sizeX/2, y/2+50, sizeX, sizeY, 'img/cargando2.png',180+varZ3) dxDrawText("Loading..",12,y/2+60+sizeY+1,x,y,tocolor(0,0,0,85),1.5,font,"center",nil,false,false,false,true) dxDrawText("Loading..",10,y/2+60+sizeY,x,y,tocolor(255,255,255,255),1.5,font,"center",nil,false,false,false,true) end end function anim(tag,animTime,de1,de2,de3,hasta1,hasta2,hasta3,typeAnim) local now = getTickCount() local endTime = tag + animTime local elapsedTime = now - tag local duration = endTime - tag local progress = elapsedTime / duration local a, b, c = interpolateBetween ( de1,de2,de3,hasta1,hasta2,hasta3, progress, typeAnim) return a, b, c end fileDelete("intro_c.lua") local sx, sy = guiGetScreenSize() alpha = 250 MP = "files/1.png" MX = sx MY = sy function adjIntro(adj) _, times = getTimerDetails(IntroTimer) if adj == "M1" then MX = (MX*0.95)+5 MY = (MY*0.95) if times == 1 then setTimer(function() if (alpha <= 250) and not (alpha <= 0) then alpha = alpha - 10 else IntroTimer = setTimer(adjIntro, 50, 26, "M2") end end, 50, 26) end elseif adj == "M2" then if (alpha < 250) and (alpha >= 0) then alpha = alpha + 10 end MX = (MX/0.95)-5 MY = (MY/0.95) MP = "files/2.png" if times == 1 then setTimer(function() MP = "files/3.png" setTimer(function() IntroTimer = setTimer(adjIntro, 50, 26, "M3") end, 3500, 1) end, 4000, 1) end elseif adj == "M3" then MX = (MX*0.95)+5 MY = (MY*0.95) if times == 1 then MP = "files/4.png" MX = (MX/0.95)-5 MY = (MY/0.95) setTimer(function() setTimer(function() if (alpha <= 250) and not (alpha <= 0) then alpha = alpha - 10 else removeEventHandler("onClientRender", root, drawIntro) fadeCamera(true, 6, 0, 0, 0) setCameraMatrix(-1475.5, 831.18, 65.5, -1487.5, 800.18, 65.5) dx = true showCursor(true) guiSetVisible(wnd, true) end end, 50, 26) end, 3500, 1) end end end function drawIntro() dxDrawImage(sx/2-(MX/2), sy/2-(MY/2), MX, MY, MP, 0, 0, 0, tocolor(255, 255, 255, alpha)) end function main() fadeCamera(false, 0) showChat(false) IntroSong = playSound("files/Intro.mp3") showPlayerHudComponent("all", false) start = getTickCount() addEventHandler("onClientRender",getRootElement(),intro) setTimer ( function() removeEventHandler("onClientRender",getRootElement(),intro) IntroTimer = setTimer(adjIntro, 50, 26, "M1") addEventHandler("onClientRender", root, drawIntro) triggerEvent("onFinishIntro",getRootElement()) setCameraMatrix(-1475.5, 831.18, 65.5, -1487.5, 800.18, 65.5) guiSetInputEnabled(true) setElementDimension(localPlayer,0) setElementData(localPlayer,"new",false) outputChatBox("#0069c7 ## #ff0000 GameMode By #0069c7[#ff0000MR~#0069c7Mos.[T].aّّّfA~#ff0000] #0069c7##",255,0,0,true) end, 5000, 1 ) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),main) wnd = guiCreateStaticImage(45, 8, 718, 544, "img.png",false) lojio = guiCreateStaticImage(9, 6, 694, 285, "fondo.png", false, wnd) english = guiCreateButton(0.0231,0.0284,0.0566,0.1082,"En",false,wnd) guiSetFont(english,"default-bold-small") guiSetVisible(wnd,false) setTimer(function() guiSetProperty(english, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255))) end, 1000, 0) arabic = guiCreateButton(621, 372, 125, 125, "Ar",true,wnd) guiSetFont(arabic,"default-bold-small") setTimer(function() guiSetProperty(arabic, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255))) end, 1000, 0) user_2 = guiCreateLabel(463, 310, 177, 29, "Username", false, wnd) function Color ( ) guiLabelSetColor (user_2, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) end setTimer ( Color, 1000, 0 ) guiLabelSetHorizontalAlign(user_2,"center",false) guiSetFont(user_2,"default-bold-small") setElementData(user_2, "tooltip-text", "اسم حسابك", false) -- أضافة الكلام للزر setElementData(user_2, "tooltip-color", "#FFFFFF", false) -- تغيير لون الخط setElementData(user_2, "tooltip-background", "#666666", false) -- تغيير لون الخلفية setElementData(user_2, "default-bold", "bankgothic 0.5", false) -- تغيير نوع الخط و حجم الخط user_l = guiCreateLabel(115, 310, 177, 29, "Username",false,wnd) function Color ( ) guiLabelSetColor (user_l, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) end setTimer ( Color, 1000, 0 ) guiLabelSetHorizontalAlign(user_l,"center",false) guiSetFont(user_l,"default-bold-small") setElementData(user_l, "tooltip-text", "اسم حسابك", false) -- أضافة الكلام للزر setElementData(user_l, "tooltip-color", "#FFFFFF", false) -- تغيير لون الخط setElementData(user_l, "tooltip-background", "#666666", false) -- تغيير لون الخلفية setElementData(user_l, "default-bold", "bankgothic 0.5", false) -- تغيير نوع الخط و حجم الخط user1 = guiCreateEdit(476, 345, 159, 28, "", false, wnd) setTimer(function() guiSetProperty(user1, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255))) end, 1000, 0) user = guiCreateEdit(126, 343, 159, 28, "",false,wnd) setTimer(function() guiSetProperty(user, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255))) end, 1000, 0) pass_2 = guiCreateLabel(462, 379, 177, 29, "Password", false,wnd) function Color ( ) guiLabelSetColor (pass_2, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) end
  19. الوو وش بكم انا سويتها وتشتغل ب لازم يكون تري علشان اسجل لو فولس يقول مايسجل فهمتو ياخونا طلبي صعب
  20. ايه بس خربت انا سويتها addEventHandler("onClientGUIClick",root, function () local user = guiGetText(user) local pass = guiGetText(pass) local user1 = guiGetText(user1) local pass1 = guiGetText(pass1) if ( source == login ) then if user ~= "" and pass ~= "" then if guiCheckBoxGetSelected(remember) then if ( guiCheckBoxGetSelected ( chechbox ) ) then if ( isElement ( IntroSong ) ) then destroyElement (IntroSong) triggerServerEvent("onRequestLogin",localPlayer,user,pass) else triggerServerEvent("onRequestLogin",localPlayer,user,pass) end else outputChatBox("* You Must Write Username Or Password",255,0,0) end elseif ( source == reg ) then if user1 ~= "" and pass1 ~= "" then triggerServerEvent("onRequestRegister",localPlayer,user1,pass1) else outputChatBox("* You Must Write Username Or Password",255,0,0) end end end end end ) صارت لازم تطغط علياه علشان تسجل لازم تكوت tree لو fales ماتشتغل فاهمت انا مابيها كدا ابيها اختياري شفه هادي هي معي زر لوجين if ( source == login ) then if user ~= "" and pass ~= "" then if guiCheckBoxGetSelected(remember) then if ( guiCheckBoxGetSelected ( chechbox ) ) then if ( isElement ( IntroSong ) ) then destroyElement (IntroSong)
  21. شوفي ماحد يرد ياخونا والله طلبي مو صعب لدرجة زي
  22. لا شف انا حطيت في لوححة تسجيل chechbox = guiCreateCheckBox(303, 401, 151, 32, "Stop Sound !!", true, false, wnd) ابي لما يكون يبي يضفي الاغنيه يدوس عليها فهمت هو الحين في لوحة تسجيل علشان تسجل لازم تظطغط علي ايقاف الاغنيه فهمت انا مابي اجباري تدوس ابيه اختيار فهمت
×
×
  • Create New...