+Source|> Posted August 31, 2017 Share Posted August 31, 2017 (edited) مو شغال الكود هذاا -- كلينت addEventHandler("onClientGUIClick", root, function() local txt = guiGetText( edit ) if source == ok then if txt == "" then outputChatBox( " الرجاء كتابة إسم الحساب ", 255, 0, 0, true ) return end triggerServerEvent( "send", localPlayer, txt ) end end ) -- سيرفر addEvent("send", true) addEventHandler("send", root, function( txt ) local accName = getAccountName ( getPlayerAccount( txt ) ) if not isGuestAccount( accName ) then if not isObjectInACLGroup( "user."..accName, aclGetGroup( "Earrb" ) ) then if tonumber( getPlayerMoney( source ) ) >= tonumber( 3000000 ) then takePlayerMoney( source, tonumber( 3000000 ) ) aclGroupAddObject( aclGetGroup( "Earrb" ), "user."..accName ) playSoundFrontEnd( source, 43 ) else outputChatBox( " 3000000 $ أنت لا تملك ", source, 255, 0, 0, true ) end end end end ) اتمنى الحل Edited August 31, 2017 by Source|> Link to comment
#BrosS Posted August 31, 2017 Share Posted August 31, 2017 سطر 7 التحقق من انه مسجل غلط حط حساب اللاعب وليس اسمه حسابه + debugscript 3 Link to comment
^iiEcoo'x_) Posted August 31, 2017 Share Posted August 31, 2017 (edited) جرب addEvent ( 'send' , true ) addEventHandler ( 'send' , root , function ( uAccount_ ) if ( getAccount ( uAccount_ ) ) then if ( not isObjectInACLGroup ( 'user.'..getAccount ( uAccount_ ) , aclGetGroup ( 'Earrb' ) ) then if ( getPlayerMoney ( source ) >= 3000000 ) then takePlayerMoney ( source , 3000000 ) aclGroupAddObject ( aclGetGroup ( 'Earrb' ) , 'user.'..getAccount ( uAccount_ ) ) playSoundFrontEnd ( source , 43 ) else outputChatBox ( ' 3000000 $ أنت لا تملك ' , source , 255 , 0 , 0 , true ) end end end end ) Edited August 31, 2017 by #_iMr.[E]coo Link to comment
+Source|> Posted August 31, 2017 Author Share Posted August 31, 2017 57 minutes ago, #_iMr.[E]coo said: جرب addEvent ( 'send' , true ) addEventHandler ( 'send' , root , function ( uAccount_ ) if ( getAccount ( uAccount_ ) ) then if ( not isObjectInACLGroup ( 'user.'..getAccount ( uAccount_ ) , aclGetGroup ( 'Earrb' ) ) then if ( getPlayerMoney ( source ) >= 3000000 ) then takePlayerMoney ( source , 3000000 ) aclGroupAddObject ( aclGetGroup ( 'Earrb' ) , 'user.'..getAccount ( uAccount_ ) ) playSoundFrontEnd ( source , 43 ) else outputChatBox ( ' 3000000 $ أنت لا تملك ' , source , 255 , 0 , 0 , true ) end end end end ) لم ينجح 1 hour ago, #BrosS said: سطر 7 التحقق من انه مسجل غلط حط حساب اللاعب وليس اسمه حسابه + debugscript 3 الديبق يقول مشكلة في local accName = getAccountName ( getPlayerAccount( txt ) ) if not isObjectInACLGroup( "user."..accName, aclGetGroup( "Earrb" ) ) then aclGroupAddObject( aclGetGroup( "Earrb" ), "user."..accName ) Link to comment
MR.StoRm Posted August 31, 2017 Share Posted August 31, 2017 56 minutes ago, Source|> said: لم ينجح الديبق يقول مشكلة في local accName = getAccountName ( getPlayerAccount( txt ) ) if not isObjectInACLGroup( "user."..accName, aclGetGroup( "Earrb" ) ) then aclGroupAddObject( aclGetGroup( "Earrb" ), "user."..accName ) وينه ذا ما اشوفه باكواد حق ايكو Link to comment
+Source|> Posted August 31, 2017 Author Share Posted August 31, 2017 5 minutes ago, MR.StoRm said: وينه ذا ما اشوفه باكواد حق ايكو حق ايكو ما اشتغل حق ايكو يقول الخطا في if ( getAccount ( uAccount_ ) ) then Link to comment
MR.StoRm Posted August 31, 2017 Share Posted August 31, 2017 5 minutes ago, Source|> said: حق ايكو ما اشتغل وش يقول الدي بق بحق ايكو ؟ Link to comment
+Source|> Posted August 31, 2017 Author Share Posted August 31, 2017 Just now, MR.StoRm said: وش يقول الدي بق بحق ايكو ؟ Bad argument @ ' getAccount [Expected xtring at argument ..... ' Link to comment
MR.StoRm Posted August 31, 2017 Share Posted August 31, 2017 (edited) اي سطررر addEvent ( 'send' , true ) addEventHandler ( 'send' , root , function ( aPlayer_ ) if ( isGuestAccount ( getPlayerAccount ( aPlayer_ ) ) then return end if ( not isObjectInACLGroup ( 'user.'..getAccountName ( getPlayerAccount ( aPlayer_ ) ) , aclGetGroup ( 'Earrb' ) ) then if ( getPlayerMoney ( source ) >= 3000000 ) then takePlayerMoney ( source , 3000000 ) aclGroupAddObject ( aclGetGroup ( 'Earrb' ) , 'user.'..getAccountName ( getPlayerAccount ( aPlayer_ ) ) ) playSoundFrontEnd ( source , 43 ) else outputChatBox ( ' 3000000 $ أنت لا تملك ' , source , 255 , 0 , 0 , true ) end end end ) جرب كذأ Edited August 31, 2017 by MR.StoRm Link to comment
+Source|> Posted August 31, 2017 Author Share Posted August 31, 2017 21 minutes ago, MR.StoRm said: اي سطررر addEvent ( 'send' , true ) addEventHandler ( 'send' , root , function ( aPlayer_ ) if ( isGuestAccount ( getPlayerAccount ( aPlayer_ ) ) then return end if ( not isObjectInACLGroup ( 'user.'..getAccountName ( getPlayerAccount ( aPlayer_ ) ) , aclGetGroup ( 'Earrb' ) ) then if ( getPlayerMoney ( source ) >= 3000000 ) then takePlayerMoney ( source , 3000000 ) aclGroupAddObject ( aclGetGroup ( 'Earrb' ) , 'user.'..getAccountName ( getPlayerAccount ( aPlayer_ ) ) ) playSoundFrontEnd ( source , 43 ) else outputChatBox ( ' 3000000 $ أنت لا تملك ' , source , 255 , 0 , 0 , true ) end end end ) جرب كذأ ديبق يقول Bad argument @ getPlayerAccount[Expected element...] Bad argument @ isGuestAccount[Expected account...] Bad argument @ getPlayerAccount[Expected element...] Bad argument @ getAccountName[Expected account...] و Error بالاحمر في هذذا السطر if ( not isObjectInACLGroup ( 'user.'..getAccountName ( getPlayerAccount ( aPlayer_ ) ) , aclGetGroup ( 'Earrb' ) ) ) then Link to comment
MR.StoRm Posted August 31, 2017 Share Posted August 31, 2017 addEvent ( 'send' , true ) addEventHandler ( 'send' , root , function ( ) if ( isGuestAccount ( getPlayerAccount ( source ) ) then return end if ( not isObjectInACLGroup ( 'user.'..getAccountName ( getPlayerAccount ( source ) ) , aclGetGroup ( 'Earrb' ) ) ) then if ( getPlayerMoney ( source ) >= 3000000 ) then takePlayerMoney ( source , 3000000 ) aclGroupAddObject ( aclGetGroup ( 'Earrb' ) , 'user.'..getAccountName ( getPlayerAccount ( source ) ) ) playSoundFrontEnd ( source , 43 ) else outputChatBox ( ' 3000000 $ أنت لا تملك ' , source , 255 , 0 , 0 , true ) end end end ) Link to comment
+Source|> Posted August 31, 2017 Author Share Posted August 31, 2017 3 minutes ago, MR.StoRm said: addEvent ( 'send' , true ) addEventHandler ( 'send' , root , function ( ) if ( isGuestAccount ( getPlayerAccount ( source ) ) then return end if ( not isObjectInACLGroup ( 'user.'..getAccountName ( getPlayerAccount ( source ) ) , aclGetGroup ( 'Earrb' ) ) ) then if ( getPlayerMoney ( source ) >= 3000000 ) then takePlayerMoney ( source , 3000000 ) aclGroupAddObject ( aclGetGroup ( 'Earrb' ) , 'user.'..getAccountName ( getPlayerAccount ( source ) ) ) playSoundFrontEnd ( source , 43 ) else outputChatBox ( ' 3000000 $ أنت لا تملك ' , source , 255 , 0 , 0 , true ) end end end ) تمام بس الحين المشكله بدي Access denied @ 'aclGroupAddObject' Link to comment
MR.StoRm Posted August 31, 2017 Share Posted August 31, 2017 Just now, Source|> said: تمام بس الحين المشكله بدي Access denied @ 'aclGroupAddObject' ضيف المود لقروب ادمن Link to comment
+Source|> Posted August 31, 2017 Author Share Posted August 31, 2017 Just now, MR.StoRm said: ضيف المود لقروب ادمن الله يعطيك العافيه بس سؤال ما اقدر مثلا انا كتبت اسم حسابي بايديت بوكس وابي اللي كتبته بالايديت بوكس هو يضف للجروب فهمتني؟ Link to comment
MR.StoRm Posted August 31, 2017 Share Posted August 31, 2017 1 minute ago, Source|> said: الله يعطيك العافيه بس سؤال ما اقدر مثلا انا كتبت اسم حسابي بايديت بوكس وابي اللي كتبته بالايديت بوكس هو يضف للجروب فهمتني؟ وضح أكثر ما فهمت Link to comment
+Source|> Posted August 31, 2017 Author Share Posted August 31, 2017 Just now, MR.StoRm said: وضح أكثر ما فهمت انا مسوي ايديت بوكس مثلا اسم حسابي r3d ابي لما اكتب بالايديت بوكس r3d ينضاف اسم الحساب للجروب Link to comment
MR.StoRm Posted August 31, 2017 Share Posted August 31, 2017 (edited) 1 minute ago, Source|> said: انا مسوي ايديت بوكس مثلا اسم حسابي r3d ابي لما اكتب بالايديت بوكس r3d ينضاف اسم الحساب للجروب guiGetText triggerServerEvent Edited August 31, 2017 by MR.StoRm Link to comment
+Source|> Posted August 31, 2017 Author Share Posted August 31, 2017 Just now, MR.StoRm said: guiGetText سويت الايديت بوكس وكل شي بس خربت في هذا الكود addEvent ( 'send' , true ) addEventHandler ( 'send' , root , function ( txt ) if ( isGuestAccount ( getPlayerAccount ( source ) ) then return end if ( not isObjectInACLGroup ( 'user.'..getAccountName ( getPlayerAccount ( source ) ) , aclGetGroup ( 'Earrb' ) ) ) then if ( getPlayerMoney ( source ) >= 3000000 ) then takePlayerMoney ( source , 3000000 ) aclGroupAddObject ( aclGetGroup ( 'Earrb' ) , 'user.'..getAccountName ( getPlayerAccount ( txt ) ) ) playSoundFrontEnd ( source , 43 ) else outputChatBox ( ' 3000000 $ أنت لا تملك ' , source , 255 , 0 , 0 , true ) end end end ) صح؟ Link to comment
MR.StoRm Posted August 31, 2017 Share Posted August 31, 2017 1 minute ago, Source|> said: سويت الايديت بوكس وكل شي بس خربت في هذا الكود addEvent ( 'send' , true ) addEventHandler ( 'send' , root , function ( txt ) if ( isGuestAccount ( getPlayerAccount ( source ) ) then return end if ( not isObjectInACLGroup ( 'user.'..getAccountName ( getPlayerAccount ( source ) ) , aclGetGroup ( 'Earrb' ) ) ) then if ( getPlayerMoney ( source ) >= 3000000 ) then takePlayerMoney ( source , 3000000 ) aclGroupAddObject ( aclGetGroup ( 'Earrb' ) , 'user.'..getAccountName ( getPlayerAccount ( txt ) ) ) playSoundFrontEnd ( source , 43 ) else outputChatBox ( ' 3000000 $ أنت لا تملك ' , source , 255 , 0 , 0 , true ) end end end ) صح؟ ما تجرب ؟ , بدل txt بـ source Link to comment
+Source|> Posted August 31, 2017 Author Share Posted August 31, 2017 1 minute ago, MR.StoRm said: ما تجرب ؟ , بدل txt بـ source الحساب اللي احطه بالايديت بوكس ما ينضاف اللي ينضاف حسابي انا بس بس شكرا ما قصرت خلاص Link to comment
MR.StoRm Posted September 1, 2017 Share Posted September 1, 2017 7 hours ago, Source|> said: الحساب اللي احطه بالايديت بوكس ما ينضاف اللي ينضاف حسابي انا بس بس شكرا ما قصرت خلاص العفو , إطرح الكلنت إلي سويته بـ guiGetText Link to comment
Omoi Posted September 1, 2017 Share Posted September 1, 2017 (edited) عندك خطا ب سطر 9 حط text فقط بدون getAccountName + getPlayerAccount Edited September 1, 2017 by Omoi Link to comment
^iiEcoo'x_) Posted September 1, 2017 Share Posted September 1, 2017 (edited) function getAccountFromName ( name ) return getAccount ( name ) or false end addEvent ( 'send' , true ) addEventHandler ( 'send' , root , function ( uAccount_ ) local uAccount_ = getAccountFromName ( tostring ( uAccount_ ) ) if ( uAccount_ ) then if ( not isObjectInACLGroup ( 'user.'..uAccount_ , aclGetGroup ( 'Earrb' ) ) then if ( getPlayerMoney ( source ) >= 3000000 ) then takePlayerMoney ( source , 3000000 ) aclGroupAddObject ( aclGetGroup ( 'Earrb' ) , 'user.'..uAccount_ ) playSoundFrontEnd ( source , 43 ) else outputChatBox ( ' 3000000 $ أنت لا تملك ' , source , 255 , 0 , 0 , true ) end else outputChatBox ( ' الحساب يملك هذه الرتبة ' , source , 255 , 0 , 0 , true ) end else outputChatBox ( ' الحساب غير موجود في السيرفر ' , source , 255 , 0 , 0 , true ) end end ) addEventHandler ( 'onClientGUIClick' , root , function ( ) local txt = guiGetText ( edit ) if ( source == ok ) then if ( txt == '' ) then return outputChatBox( ' الرجاء كتابة إسم الحساب ' , 255 , 0 , 0 , true ) end triggerServerEvent ( 'send' , localPlayer , txt ) end end ) Edited September 1, 2017 by #_iMr.[E]coo Link to comment
Omoi Posted September 1, 2017 Share Posted September 1, 2017 4 minutes ago, #_iMr.[E]coo said: function getAccountFromName ( name ) return getAccount ( name ) or false end addEvent ( 'send' , true ) addEventHandler ( 'send' , root , function ( uAccount_ ) local uAccount_ = getAccountFromName ( tostring ( uAccount_ ) ) if ( uAccount_ ) then if ( not isObjectInACLGroup ( 'user.'..getAccount ( uAccount_ ) , aclGetGroup ( 'Earrb' ) ) then if ( getPlayerMoney ( source ) >= 3000000 ) then takePlayerMoney ( source , 3000000 ) aclGroupAddObject ( aclGetGroup ( 'Earrb' ) , 'user.'..getAccount ( uAccount_ ) ) playSoundFrontEnd ( source , 43 ) else outputChatBox ( ' 3000000 $ أنت لا تملك ' , source , 255 , 0 , 0 , true ) end else outputChatBox ( ' الحساب يملك هذه الرتبة ' , source , 255 , 0 , 0 , true ) end else outputChatBox ( ' الحساب غير موجود في السيرفر ' , source , 255 , 0 , 0 , true ) end end ) عندك خطا سطر 13 Link to comment
^iiEcoo'x_) Posted September 1, 2017 Share Posted September 1, 2017 1 minute ago, Omoi said: عندك خطا سطر 13 ما هو ؟ 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