Adham Posted May 22, 2016 Share Posted May 22, 2016 سلام عليكم انا مسوي لوحة فيها ايدت يكتب في اسم حساب الاعب و button اسمه تفعيل الصوت والتاني الغا تفعيل الصوت انا عاوز لين يكتب اسم حساب اللاعب و يضعط علي ال button يتفعل له الصوت لين يتكلم في الشات بكود playSoundFrontEnd ولو داس الغا يتلغلي الصوت Link to comment
shwaeki Posted May 22, 2016 Share Posted May 22, 2016 "onClientGUIClick" guiGetText triggerServerEvent setAccountData getAccountData "onPlayerChat" playSoundFrontEnd Link to comment
Adham Posted May 22, 2016 Author Share Posted May 22, 2016 كذا ؟ معرفتش اعمل السرفر كويس addEventHandler("onClientGUIClick", root, function () if( source == Start ) then local account = guiGetText ( editAccount ) triggerServerEvent ("GiveSound",localPlayer,account) end end ) addEvent ( "GiveSound", true ) addEventHandler ( "GiveSound", root, function ( accName ) local Acc = getPlayerAccount ( source ) if not isGuestAccount ( acc ) then if isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Console")) then if accName then local account = setAccountData ( AccName, source ) setAccountData ( AccName, source ) then end end end end ) -- addEventHandler( "onPlayerChat",root, function () playSoundFrontEnd ( root, 49 ) end ) Link to comment
YourMind Posted May 22, 2016 Share Posted May 22, 2016 غير مجرب addEventHandler ("onClientGUIClick",Start, function () local g = guiGetText (editAccount) if tostring(g) or tonumber(g) then triggerServerEvent ("DTC",localPlayer) end end,false) addEvent ("DTC",true) addEventHandler ("DTC",root, function (c) if not isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("Console")) then return outputChatBox ("Access denied",source,255,5,5) end local acc = getAccount (c) if not acc then return outputChatBox ("ERROR : Cannot find this account.",source,255,5,5) end setAccountData (acc,"ChatSound",true) outputChatBox ("Done.",source,0,255,0) end) function getPlrs() for i,k in ipairs (getElementsByType("player")) do if getPlayerAccount (k) and not isGuestAccount (getPlayerAccount(k)) then if getAccountData(getPlayerAccount(k),"ChatSound") then return k end end end end addEventHandler("onPlayerChat",root, function () playSoundFrontEnd (getPlrs(), 49 ) end) Link to comment
shwaeki Posted May 22, 2016 Share Posted May 22, 2016 سيرفر addEvent ("GiveSound",true) addEventHandler ("GiveSound",root, function (Account) if ( not isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("Console")) ) then outputChatBox ("Access denied",source,255,5,5) return end local Acc = getAccount (Account) if ( not Acc ) then outputChatBox ("ERROR : Cannot find this account.",source,255,5,5) return end setAccountData (Acc,"ChatSound",true) outputChatBox ("Done.",source,0,255,0) end) addEventHandler("onPlayerChat",root, function () local Account = getPlayerAccount(source) if ( Account ) then if ( getAccountData (Account,"ChatSound") ) then playSoundFrontEnd (root, 49 ) end end end) كلنت addEventHandler("onClientGUIClick", root, function () if( source == Start ) then local account = guiGetText ( editAccount ) if #account > 0 then triggerServerEvent ("GiveSound",localPlayer,account) end end end ) اذا ما زبط قول ايش بطلعلك في الدي بق Link to comment
Adham Posted May 22, 2016 Author Share Posted May 22, 2016 ظبت طيب لو ابي لما يضعط علي ال buton التاني يتلغي الصوت Link to comment
shwaeki Posted May 22, 2016 Share Posted May 22, 2016 ظبت طيب لو ابي لما يضعط علي ال butonالتاني يتلغي الصوت الكود يلي فوق زبط ؟ Link to comment
shwaeki Posted May 22, 2016 Share Posted May 22, 2016 addEvent ("Sound_Give_Remove",true) addEventHandler ("Sound_Give_Remove",root, function ( Action, Account ) if ( not isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("Console")) ) then outputChatBox ("Access denied",source,255,5,5) return end local Acc = getAccount (Account) if ( not Acc ) then outputChatBox ("ERROR : Cannot find this account.",source,255,5,5) return end if ( Action == "Give" ) then setAccountData (Acc,"ChatSound",true) outputChatBox ("تم اضافة الحساب.",source,0,255,0) elseif ( Action == "Remove" ) then setAccountData (Acc,"ChatSound",false) outputChatBox ("تم ازالة الحساب.",source,255,255,0) end end) addEventHandler("onPlayerChat",root, function () local Account = getPlayerAccount(source) if ( Account ) then if ( getAccountData (Account,"ChatSound") ) then playSoundFrontEnd (root, 49 ) end end end) addEventHandler("onClientGUIClick", root, function () if( source == Start ) then local account = guiGetText ( editAccount ) if #account > 0 then triggerServerEvent ("Sound_Give_Remove",localPlayer,"Give" ,account) end elseif( source == RemoveButton ) then local account = guiGetText ( editAccount ) if #account > 0 then triggerServerEvent ("Sound_Give_Remove",localPlayer,"Remove" ,account) end end end ) جرب Link to comment
Adham Posted May 22, 2016 Author Share Posted May 22, 2016 هتعبك معي شوقي سلام عليكم انا اليوم مسوي لوحة توزيع فلوس شو هيا؟ مسوي قريد لست يتحط في كل الاعبين وايديت و button انا عاوز بقا لين يحدد اسم ففي القريد لست ويكتب الفلوس في ال الايديت ويضعط علي ال button يتحول الفلوس للاعب المحدد .. Link to comment
YourMind Posted May 22, 2016 Share Posted May 22, 2016 guiGridListGetSelectedItem guiGridListGetItemText guiGetText getPlayerFromName triggerServerEvent givePlayerMoney takePlayerMoney 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