Master_MTA Posted December 24, 2016 Share Posted December 24, 2016 السلام عليكم ورحمة الله وبركاته اخواني سؤال بسيط فقط هل يمكن جلب اللاعب من اسم حسابه؟ Link to comment
Abu-Solo Posted December 24, 2016 Share Posted December 24, 2016 6 minutes ago, Master_MTA said: السلام عليكم ورحمة الله وبركاته اخواني سؤال بسيط فقط هل يمكن جلب اللاعب من اسم حسابه؟ getAccountName Link to comment
T!GER Posted December 24, 2016 Share Posted December 24, 2016 2 minutes ago, Abu-Solo said: getAccountName X https://wiki.multitheftauto.com/wiki/GetAccountPlayer 1 Link to comment
Master_MTA Posted December 24, 2016 Author Share Posted December 24, 2016 اخوي تايجر ما يزبط للاسف انا جربتها قبل ان اطرح الموضوع لكن ما زبط Link to comment
Abu-Solo Posted December 24, 2016 Share Posted December 24, 2016 4 minutes ago, T!GER said: X https://wiki.multitheftauto.com/wiki/GetAccountPlayer احسبه يبي يجيب اسم الحساب Link to comment
iMr ~ MnHmAr Posted December 24, 2016 Share Posted December 24, 2016 Just now, Master_MTA said: اخوي تايجر ما يزبط للاسف انا جربتها قبل ان اطرح الموضوع لكن ما زبط اطرح محاولتك Link to comment
Master_MTA Posted December 24, 2016 Author Share Posted December 24, 2016 (edited) 4 minutes ago, iMr ~ MnHmAr said: اطرح محاولتك addEvent("teamcrr",true) addEventHandler("teamcrr",root,function(a,b,e) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then local playername = getAccountPlayer(e) local b1,c1,d1 = getColorFromString(b) local team2 = createTeam ( a, b1, c1, d1 ) local ks = getPlayerAccount(playername) setPlayerTeam(playername,team2) setAccountData(ks,"ownerTeam",getTeamName(team2)) setElementData(playername,"ownerrr",getPlayerTeam(playername)) setElementData(playername,"ownerrr2",getAccountName(getPlayerAccount(playername)) ) setElementData(team2,"?owner",getAccountName(getPlayerAccount(playername))) triggerClientEvent("asgs",root) triggerClientEvent("closect",source) end end ) e ايديت بوكس Edited December 24, 2016 by Master_MTA اعتذر هذا كان القديم Link to comment
iMr ~ MnHmAr Posted December 24, 2016 Share Posted December 24, 2016 ما اشوف فيه اخطاء لو تقدر تطرح ارسال التقرايت لـ السيرفر الي بـ الكلنت يمكن فيه يكون الغلط + الايدت بوكس تحط فيه اسم الاعب ؟ Link to comment
Master_MTA Posted December 24, 2016 Author Share Posted December 24, 2016 لا يا غالي احط اسم الحساب تفضل كلنت elseif source == GUIEditor.button[14] then local a1=guiGetText(GUIEditor.edit[1]) local a2=guiGetText(GUIEditor.edit[2]) local a5 = guiGetText(GUIEditor.edit[5]) if a1 ~="" and a2 ~="" and a5 ~="" then triggerServerEvent("teamcrr",localPlayer,a1,a2,a5) aTeamsRefresh() else outputChatBox("pls Complete all EditBox") aTeamsRefresh() end Link to comment
iMr ~ MnHmAr Posted December 24, 2016 Share Posted December 24, 2016 (edited) -- #Server addEvent("teamcrr",true) addEventHandler("teamcrr",root,function( a,b,e ) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then local playername = getAccountPlayer(e) local b1,c1,d1 = getColorFromString(b) local team2 = createTeam ( a, b1, c1, d1 ) local ks = getPlayerAccount(playername) setPlayerTeam(playername,team2) setAccountData(ks,"ownerTeam",getTeamName(team2)) setElementData(playername,"ownerrr",getPlayerTeam(playername)) setElementData(playername,"ownerrr2",getAccountName(getPlayerAccount(playername)) ) setElementData(team2,"?owner",getAccountName(getPlayerAccount(playername))) triggerClientEvent("asgs",root) triggerClientEvent("closect",source) end end ) --#Client elseif source == GUIEditor.button[14] then local a1 = guiGetText(GUIEditor.edit[1]) local a2 = guiGetText(GUIEditor.edit[2]) local a5 = guiGetText(GUIEditor.edit[5]) if a1 ~="" and a2 ~="" and a5 ~="" then triggerServerEvent("teamcrr",localPlayer,a1,a2,a5) aTeamsRefresh() else outputChatBox("pls Complete all EditBox") aTeamsRefresh() end جرب ; Edited December 24, 2016 by iMr ~ MnHmAr Link to comment
Master_MTA Posted December 24, 2016 Author Share Posted December 24, 2016 2 minutes ago, iMr ~ MnHmAr said: -- #Server addEvent("teamcrr",true) addEventHandler("teamcrr",root,function( a,b,e ) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then local playername = getAccountPlayer(e) local b1,c1,d1 = getColorFromString(b) local team2 = createTeam ( a, b1, c1, d1 ) local ks = getPlayerAccount(playername) setPlayerTeam(playername,team2) setAccountData(ks,"ownerTeam",getTeamName(team2)) setElementData(playername,"ownerrr",getPlayerTeam(playername)) setElementData(playername,"ownerrr2",getAccountName(getPlayerAccount(playername)) ) setElementData(team2,"?owner",getAccountName(getPlayerAccount(playername))) triggerClientEvent("asgs",root) triggerClientEvent("closect",source) end end ) --#Client elseif source == GUIEditor.button[14] then local a1 = guiGetText(GUIEditor.edit[1]) local a2 = guiGetText(GUIEditor.edit[2]) local a5 = guiGetText(GUIEditor.edit[5]) if a1 ~="" and a2 ~="" and a5 ~="" then triggerServerEvent("teamcrr",localPlayer,a1,a2,a5) aTeamsRefresh() else outputChatBox("pls Complete all EditBox") aTeamsRefresh() end جرب ; مو شغال +_+ Link to comment
iMr ~ MnHmAr Posted December 24, 2016 Share Posted December 24, 2016 Just now, Master_MTA said: مو شغال +_+ اذا طالع لك شيء بي الدي بوق هاته Link to comment
Master_MTA Posted December 24, 2016 Author Share Posted December 24, 2016 لو طلع كنت جبته ذذ+_+ يقولي getAccountPlayer got string كذا ويجيبلي اسم الحساب اللي كتبته Link to comment
iMr ~ MnHmAr Posted December 24, 2016 Share Posted December 24, 2016 Just now, Master_MTA said: لو طلع كنت جبته ذذ+_+ يقولي getAccountPlayer got string كذا ويجيبلي اسم الحساب اللي كتبته يقصد ذا local ks = getPlayerAccount(playername) Link to comment
Master_MTA Posted December 24, 2016 Author Share Posted December 24, 2016 Just now, iMr ~ MnHmAr said: يقصد ذا local ks = getPlayerAccount(playername) no getAccountPlayer Link to comment
MR.GRAND Posted December 24, 2016 Share Posted December 24, 2016 (edited) local account = getAccount( string theText ) local player = getAccountPlayer( account ) Required Arguments theAccount: The account you wish to get the player of. /// not string Edited December 24, 2016 by MR.GRAND Link to comment
Master_MTA Posted December 24, 2016 Author Share Posted December 24, 2016 (edited) 1 minute ago, MR.GRAND said: local account = getAccount( string theText ) local player = getAccountPlayer( account ) Required Arguments theAccount: The account you wish to get the player of. /// not string hmmmmmmmmmm thx man +_+ Edited December 24, 2016 by Master_MTA Link to comment
MR.GRAND Posted December 24, 2016 Share Posted December 24, 2016 (edited) player getAccountPlayer ( account theAccount ) player = اللاعب راح يرجعلك قيمة اللاعب نفسه Edited December 24, 2016 by MR.GRAND Link to comment
Master_MTA Posted December 24, 2016 Author Share Posted December 24, 2016 (edited) another question if i wanna check if the account name really is registered in the server what i will do local accountTable = getAccounts () -- return the table over accounts i will used that but after that what i will do? Edited December 24, 2016 by Master_MTA Link to comment
Kara Posted December 24, 2016 Share Posted December 24, 2016 استخدم هذي الوظيفه function getPlayerFromAccount ( accnt ) if accnt and type ( accnt ) == 'string' then for i, v in ipairs ( getElementsByType ( 'player' ) ) do if ( getAccountName ( getPlayerAccount ( v ) ) == accnt ) then return v; end end end return false end 1 Link to comment
MR.GRAND Posted December 24, 2016 Share Posted December 24, 2016 (edited) If you want to check if the specified account is already registered below you just need to put if after get account like this اذا تبي تتحقق اذا الحساب المحدد موجود ومسجل مسبقا انت تحتاج فقط تسوي كذا local account = getAccount( string accountName ) if ( account ~= false ) then ... end -- complete code if the account is already exists, return otherwise -- راح يكمل الوظيفة لو ان الحساب موجود, راح يرجع ويوقف الوظيفة لو العكس Edited December 24, 2016 by MR.GRAND Link to comment
Abu-Solo Posted December 24, 2016 Share Posted December 24, 2016 1 minute ago, MR.GRAND said: If you want to check if the specified account is already registered below you just need to put if after get account like this local account = getAccount( string accountName ) if ( account ~= false ) then ... end -- complete code if the account is already exists, return otherwise الحين تخيل انه ما يفهم انجليزي كيف بيفهم كلامك خخخخخ ي ليت تتكلم عربي Link to comment
MR.GRAND Posted December 24, 2016 Share Posted December 24, 2016 1 minute ago, Abu-Solo said: الحين تخيل انه ما يفهم انجليزي كيف بيفهم كلامك خخخخخ ي ليت تتكلم عربي ^ Up تم التعديل 1 Link to comment
Master_MTA Posted December 24, 2016 Author Share Posted December 24, 2016 3 minutes ago, MR.GRAND said: If you want to check if the specified account is already registered below you just need to put if after get account like this local account = getAccount( string accountName ) if ( account ~= false ) then ... end -- complete code if the account is already exists, return otherwise thx alot man 2 minutes ago, Abu-Solo said: الحين تخيل انه ما يفهم انجليزي كيف بيفهم كلامك خخخخخ ي ليت تتكلم عربي ابشر 1 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