Master_MTA Posted November 13, 2016 Share Posted November 13, 2016 شباب الحين انا ابي اسوي داتا على كل اللاعبين ما عدا الكونسل فقطط function masternewip() for i, v in ipairs( getElementsByType( 'player' ) ) do if not isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("Console")) then setElementData(v"chatClose") end end end addCommandHandler("closechat",masternewip) وش الخطا Link to comment
MR.GRAND Posted November 13, 2016 Share Posted November 13, 2016 function masternewip( ) for i, v in ipairs( getElementsByType( 'player' ) ) do if ( not isObjectInACLGroup( 'user.' .. getAccountName( getPlayerAccount( v ) ), aclGetGroup( 'Console' ) ) ) then setElementData(v, 'chatClose', 'value' ) -- value قم بتغيير هذه القيمة للقيمة المراد وضعها للدانا . end end end addCommandHandler( 'closechat', masternewip ) Link to comment
Master_MTA Posted November 13, 2016 Author Share Posted November 13, 2016 (edited) 10 minutes ago, MR.GRAND said: function masternewip( ) for i, v in ipairs( getElementsByType( 'player' ) ) do if ( not isObjectInACLGroup( 'user.' .. getAccountName( getPlayerAccount( v ) ), aclGetGroup( 'Console' ) ) ) then setElementData(v, 'chatClose', 'value' ) -- value قم بتغيير هذه القيمة للقيمة المراد وضعها للدانا . end end end addCommandHandler( 'closechat', masternewip ) ما فهمت عليك فهمت بس انا ابي احطها على اللاعب لما يجي يكلم لو عليه داتا ما يقدر يتكلم في الشات فوش احط المتغير @MR.GRAND Edited November 13, 2016 by Master_MTA Link to comment
iPrestege Posted November 13, 2016 Share Posted November 13, 2016 addCommandHandler ( 'closechat', function ( ) for _,aPlayer in ipairs( getElementsByType( 'player' ) ) do if not isObjectInACLGroup( 'user.'..getAccountName ( getPlayerAccount ( aPlayer ) ),aclGetGroup ( 'Console' ) ) then setElementData ( aPlayer,'chatclose',true ); end end end ); addEventHandler ( 'onPlayerChat',root, function ( ) if getElementData ( source,'chatclose' ) then cancelEvent ( ); end end ); كذا اذا كان الاعب معه الداتا وجا يتكلم بالشات يتكنسل الحدث ومايتكلم بس تاكد انة ماعندك مود تاج او شيء ثاني اذا عندك لازم تعدله وتسوي تحقق الداتا وتكنسلة Link to comment
Kara Posted November 13, 2016 Share Posted November 13, 2016 1 hour ago, iPrestege said: if getElementData ( source,'chatclose' ) then if (getElementData ( source,'chatclose' ) == true ) then Link to comment
iPrestege Posted November 14, 2016 Share Posted November 14, 2016 8 hours ago, Kara said: if (getElementData ( source,'chatclose' ) == true ) then اممم افهم من كلامكـ انة كودي غير صحيح؟ كودي بيشتغل تمام انا متحقق انة مع الداتا مهماً كانت قيمتها ماحددت يقدر يحدد هو او يقدر يرجع يشيلها وخلاص بيشتغل زي العسل 1 Link to comment
Master_MTA Posted November 14, 2016 Author Share Posted November 14, 2016 (edited) 11 hours ago, iPrestege said: addCommandHandler ( 'closechat', function ( ) for _,aPlayer in ipairs( getElementsByType( 'player' ) ) do if not isObjectInACLGroup( 'user.'..getAccountName ( getPlayerAccount ( aPlayer ) ),aclGetGroup ( 'Console' ) ) then setElementData ( aPlayer,'chatclose',true ); end end end ); addEventHandler ( 'onPlayerChat',root, function ( ) if getElementData ( source,'chatclose' ) then cancelEvent ( ); end end ); كذا اذا كان الاعب معه الداتا وجا يتكلم بالشات يتكنسل الحدث ومايتكلم بس تاكد انة ماعندك مود تاج او شيء ثاني اذا عندك لازم تعدله وتسوي تحقق الداتا وتكنسلة يعطيك العافيه حبيب قلبي والله +_+ بس مو المفروض اضيف بين اقواس الفنكشن aPlayer @iPrestege Edited November 14, 2016 by Master_MTA Link to comment
Master_MTA Posted November 14, 2016 Author Share Posted November 14, 2016 (edited) 53 minutes ago, Master_MTA said: يعطيك العافيه حبيب قلبي والله +_+ بس مو المفروض اضيف بين اقواس الفنكشن aPlayer @iPrestege طيب شباب وش الخطا هنا addEvent("closechatmaster",true) addEventHandler('closechatmaster',root, alichat1) function alichat1 ( ) for _,aPlayer in ipairs( getElementsByType( 'player' ) ) do if not isObjectInACLGroup( 'user.'..getAccountName ( getPlayerAccount ( aPlayer ) ),aclGetGroup ( 'Console' ) ) then setElementData ( aPlayer,'chatclose',true ); end end end addEvent("openchatmaster",true) addEventHandler('openchatmaster', root,alichat) function alichat ( ) for _,aPlayer in ipairs( getElementsByType( 'player' ) ) do if not isObjectInACLGroup( 'user.'..getAccountName ( getPlayerAccount ( aPlayer ) ),aclGetGroup ( 'Console' ) ) then removeElementData ( aPlayer,'chatclose' ); end end end سويتلها تراقر من الكلنت كذا addEventHandler ( "onClientGUIClick",root, function() if source == closeaam then triggerServerEvent(localPlayer,"closechatmaster",localPlayer) elseif source == openaam then triggerServerEvent(localPlayer,"openchatmaster",localPlayer) end end ) @iPrestege @3NAD @</Mr.Tn6eL> @Abdul KariM @Default @-ffs-Sniper Edited November 14, 2016 by Master_MTA Link to comment
' A F . Posted November 14, 2016 Share Posted November 14, 2016 جرب هاذا -- # Client Side .. addEventHandler ( "onClientGUIClick",root,function ( ) if source == closeaam then triggerServerEvent("closechatmaster",localPlayer) elseif source == openaam then triggerServerEvent("openchatmaster",localPlayer) end end ); -- # Server Side .. addEventHandler ( "closechatmaster" , true ) addEventHandler ( "closechatmaster" , root , function ( ) for _,aPlayer in ipairs( getElementsByType( 'player' ) ) do if not isObjectInACLGroup( 'user.'..getAccountName ( getPlayerAccount ( aPlayer ) ),aclGetGroup ( 'Console' ) ) then setElementData ( aPlayer,'chatclose',true ); end end end ); addEventHandler ( "openchatmaster" , true ) addEventHandler ( "openchatmaster" , root , function ( ) for _,aPlayer in ipairs( getElementsByType( 'player' ) ) do if not isObjectInACLGroup( 'user.'..getAccountName ( getPlayerAccount ( aPlayer ) ),aclGetGroup ( 'Console' ) ) then removeElementData ( aPlayer , "chatclose" ) end end end ); Link to comment
Master_MTA Posted November 14, 2016 Author Share Posted November 14, 2016 6 minutes ago, Default said: جرب هاذا -- # Client Side .. addEventHandler ( "onClientGUIClick",root,function ( ) if source == closeaam then triggerServerEvent("closechatmaster",localPlayer) elseif source == openaam then triggerServerEvent("openchatmaster",localPlayer) end end ); -- # Server Side .. addEventHandler ( "closechatmaster" , true ) addEventHandler ( "closechatmaster" , root , function ( ) for _,aPlayer in ipairs( getElementsByType( 'player' ) ) do if not isObjectInACLGroup( 'user.'..getAccountName ( getPlayerAccount ( aPlayer ) ),aclGetGroup ( 'Console' ) ) then setElementData ( aPlayer,'chatclose',true ); end end end ); addEventHandler ( "openchatmaster" , true ) addEventHandler ( "openchatmaster" , root , function ( ) for _,aPlayer in ipairs( getElementsByType( 'player' ) ) do if not isObjectInACLGroup( 'user.'..getAccountName ( getPlayerAccount ( aPlayer ) ),aclGetGroup ( 'Console' ) ) then removeElementData ( aPlayer , "chatclose" ) end end end ); مو زابط يا غالي شفت الدي بق لقيته يقول ماستر اللي هو اانا سوا تراقر للسيررفر لكن القيمه غير موجوده @Default Link to comment
ميدوح Posted November 14, 2016 Share Posted November 14, 2016 (edited) showChat -- # Client Side .. addEventHandler ( "onClientGUIClick",root,function ( ) if source == closeaam then triggerServerEvent("closechatmaster",localPlayer) elseif source == openaam then triggerServerEvent("openchatmaster",localPlayer) end end ); -- # Server Side .. addEventHandler ( "closechatmaster" , true ) addEventHandler ( "closechatmaster" , root , function ( ) for _,aPlayer in ipairs( getElementsByType( 'player' ) ) do if not isObjectInACLGroup( 'user.'..getAccountName ( getPlayerAccount ( aPlayer ) ),aclGetGroup ( 'Console' ) ) then showChat ( aPlayer, false ) end end end ); addEventHandler ( "openchatmaster" , true ) addEventHandler ( "openchatmaster" , root , function ( ) for _,aPlayer in ipairs( getElementsByType( 'player' ) ) do if not isObjectInACLGroup( 'user.'..getAccountName ( getPlayerAccount ( aPlayer ) ),aclGetGroup ( 'Console' ) ) then showChat ( aPlayer, true ) end end end ); Edited November 14, 2016 by medo7 ! ^showChat Link to comment
Abdul KariM Posted November 14, 2016 Share Posted November 14, 2016 (edited) Clinet : addEventHandler ( "onClientGUIClick",root, function ( ) if ( source == closeaam ) then triggerServerEvent( "Changechatmaster", localPlayer , true ) elseif ( source == openaam ) then triggerServerEvent( "Changechatmaster", localPlayer , false ) end end ); Server : addEvent ( "Changechatmaster" , true ) addEventHandler ( "Changechatmaster" , root , function ( aState ) if ( aState ) then for _,aPlayer in ipairs( getElementsByType( 'player' ) ) do if ( not isGuestAccount ( getPlayerAccount ( aPlayer ) ) ) then if not isObjectInACLGroup( 'user.'..getAccountName ( getPlayerAccount ( aPlayer ) ),aclGetGroup ( 'Console' ) ) then setElementData ( aPlayer,'chatclose', aState ) end end end end end ); Edited November 14, 2016 by Abdul KariM Link to comment
Master_MTA Posted November 14, 2016 Author Share Posted November 14, 2016 1 hour ago, Abdul KariM said: Clinet : addEventHandler ( "onClientGUIClick",root, function ( ) if ( source == closeaam ) then triggerServerEvent( "Changechatmaster", localPlayer , true ) elseif ( source == openaam ) then triggerServerEvent( "Changechatmaster", localPlayer , false ) end end ); Server : addEvent ( "Changechatmaster" , true ) addEventHandler ( "Changechatmaster" , root , function ( aState ) if ( aState ) then for _,aPlayer in ipairs( getElementsByType( 'player' ) ) do if ( not isGuestAccount ( getPlayerAccount ( aPlayer ) ) ) then if not isObjectInACLGroup( 'user.'..getAccountName ( getPlayerAccount ( aPlayer ) ),aclGetGroup ( 'Console' ) ) then setElementData ( aPlayer,'chatclose', aState ) end end end end end ); @Abdul KariM ما زبط يا غالي Link to comment
Abdul KariM Posted November 14, 2016 Share Posted November 14, 2016 مستحيل تأكد انك مسجل دخول وانك مانت كونسل Link to comment
Master_MTA Posted November 14, 2016 Author Share Posted November 14, 2016 (edited) 3 minutes ago, Abdul KariM said: مستحيل تأكد انك مسجل دخول وانك مانت كونسل هههههههههههههههه يعطيك العافيه كنت ناسي اسوي حفظ للملف هههههههههه بس في شي يوم اضغط على الزر الثاني ما يزبط @Abdul KariM Edited November 14, 2016 by Master_MTA Link to comment
Abdul KariM Posted November 14, 2016 Share Posted November 14, 2016 تحقق من الداتا يوم تتكلم بالشات if ( getElementData ( source , "DataName" ) == true ) then 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