momar5700 Posted October 9, 2015 Share Posted October 9, 2015 سلام عليكم ورحمة الله وبركاته انا ركبت بلوحة تحكم اختيار لو تبي طفي الاغنيه ولا ماتبي بس صارت مشكلة 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 ) وهي انه صارت علشان تسوي تسجيل دخول لازم تختار علي ايقاف صوت لو ماخترت يجيك بشات يوقول لك كدا * You Must Write Username Or Password طبعا انا مابيهها كدا ابيها اختيار الي يبي يختارها يختار الي مايبي مايختار فا ممكن حل Link to comment
#|_oskar_|# Posted October 9, 2015 Share Posted October 9, 2015 يعى تبي تشتغل اغنيه مع لوحة التسجيل وبعد ماتسجل الدخول توقف الاغنيه ؟ Link to comment
momar5700 Posted October 9, 2015 Author Share Posted October 9, 2015 لا شف انا حطيت في لوححة تسجيل chechbox = guiCreateCheckBox(303, 401, 151, 32, "Stop Sound !!", true, false, wnd) ابي لما يكون يبي يضفي الاغنيه يدوس عليها فهمت هو الحين في لوحة تسجيل علشان تسجل لازم تظطغط علي ايقاف الاغنيه فهمت انا مابي اجباري تدوس ابيه اختيار فهمت Link to comment
momar5700 Posted October 9, 2015 Author Share Posted October 9, 2015 شوفي ماحد يرد ياخونا والله طلبي مو صعب لدرجة زي Link to comment
' A F . Posted October 9, 2015 Share Posted October 9, 2015 onClientGUIClick isElement stopSound Link to comment
#|_oskar_|# Posted October 9, 2015 Share Posted October 9, 2015 guiCheckBoxGetSelected playSound stopSound or destroyElement Link to comment
momar5700 Posted October 9, 2015 Author Share Posted October 9, 2015 ايه بس خربت انا سويتها 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) Link to comment
momar5700 Posted October 9, 2015 Author Share Posted October 9, 2015 الوو وش بكم انا سويتها وتشتغل ب لازم يكون تري علشان اسجل لو فولس يقول مايسجل فهمتو ياخونا طلبي صعب Link to comment
Rockyz Posted October 9, 2015 Share Posted October 9, 2015 جرب : Soundss = true if ( guiCheckBoxGetSelected ( chechbox ) ) then if ( Soundss == true ) then local Music = playSound ("SoundName") Soundss = false else stopSound ( Music ) Soundss = true end end Link to comment
momar5700 Posted October 9, 2015 Author Share Posted October 9, 2015 اطفطل يامستر قراند 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 Link to comment
momar5700 Posted October 9, 2015 Author Share Posted October 9, 2015 سيرفر ياريت بعد اعطاك كودات تعضيني تصحيحك يارب........ي 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|----------------------------------- Link to comment
momar5700 Posted October 9, 2015 Author Share Posted October 9, 2015 جرب : Soundss = true if ( guiCheckBoxGetSelected ( chechbox ) ) then if ( Soundss == true ) then local Music = playSound ("SoundName") Soundss = false else stopSound ( Music ) Soundss = true end end ماشتغل Link to comment
MR.GRAND Posted October 9, 2015 Share Posted October 9, 2015 جرب : Soundss = true if ( guiCheckBoxGetSelected ( chechbox ) ) then if ( Soundss == true ) then local Music = playSound ("SoundName") Soundss = false else stopSound ( Music ) Soundss = true end end ماشتغل يقصد انك تبدل كود وتشيل الكود حق التحقق القديم , وبالنسبة لكودك , ترا في حدث متكرر مرتين ولو تم التنفيذ يرجع للخطأ ... Link to comment
momar5700 Posted October 9, 2015 Author Share Posted October 9, 2015 ايه سويت كدا شلته وبدلته Link to comment
Rockyz Posted October 9, 2015 Share Posted October 9, 2015 جرب : Soundss = true addEventHandler ( "onClientGUIClick", root, 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("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 ) addEventHandler ( "onClientGUIClick", root, function ( ) if ( guiCheckBoxGetSelected ( chechbox ) ) then if ( Soundss == true ) then local Music = playSound ("SoundName") Soundss = false else stopSound ( Music ) Soundss = true end end end ) Link to comment
momar5700 Posted October 9, 2015 Author Share Posted October 9, 2015 صار زر لوجين مايشتغل Link to comment
momar5700 Posted October 9, 2015 Author Share Posted October 9, 2015 ياخي هو كدا شغال لما احدد عليها تضفي صوت 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 ) مشكلة شيء واحد وهو لو انت مش حددت رح يقول لك لازم تحدد يعني لازم تحدد لو مش حدد مايسجل لما تحديد يسجل فهمتوو Link to comment
Rockyz Posted October 9, 2015 Share Posted October 9, 2015 جرب كاتبه من الجوال : 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 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 ) addEventHandler ( "onClientGUIClick", root, function ( ) if ( guiCheckBoxGetSelected ( chechbox ) == false ) then local Music = playSound ("SoundName") outputChatBox ( "Sound Played !", 255, 255, 0, true ) else stopSound ( Music ) outputChatBox ( "Sound Stopped !", 255, 255, 0, true ) end end ) Link to comment
!#NssoR_) Posted October 9, 2015 Share Posted October 9, 2015 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("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 local user = guiGetText(user) local pass = guiGetText(pass) local user1 = guiGetText(user1) local pass1 = guiGetText(pass1) if user1 ~= "" and pass1 ~= "" then triggerServerEvent("onRequestRegister",localPlayer,user1,pass1) else outputChatBox("* You Must Write Username Or Password",255,0,0) end elseif ( getElementType(source) == "gui-checkbox" ) then if not ( guiCheckBoxGetSelected(source) ) then Music = playSound ("SoundName.mp3") outputChatBox ( "Sound Played !", 255, 255, 0, true ) else stopSound ( Music ) outputChatBox ( "Sound Stopped !", 255, 255, 0, true ) end end end) Link to comment
momar5700 Posted October 18, 2015 Author Share Posted October 18, 2015 سلام عليكم ورحمة الله وبركاته عندي مشكلة ارجو حل .......................................................... 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) المشكلة هي ............... انه صار شغال بس عشان تضفي الاغنيه تحديد علية لو تبي تشغل الاغنيه تشيل تحديد وتحطه انا مابي كدا ابي لما تحدد عليه تضفي الاغنيه ولما تشيل تحديد تشتغل الاغنيه اظن طلبي سهل ممكن حل ؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟ظ Link to comment
TAPL Posted October 18, 2015 Share Posted October 18, 2015 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( source == chechbox ) then if guiCheckBoxGetSelected ( source ) then if ( isElement ( IntroSong ) ) then destroyElement ( IntroSong ) outputChatBox ( "Sound Played !", 255, 255, 0, true ) end else IntroSong = playSound ("files/Intro.mp3") outputChatBox ( "Sound Stopped !", 255, 255, 0, true ) end end end) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now