Mohamed Posted April 27, 2015 Posted April 27, 2015 addEventHandler("onPlayerQuit", getRootElement(), function () local Serial = getPlayerSerial (source) if Serial then local NoAccount = getElementData(source, "NoAccount") setAccountData(Serial, "NoAccount", NoAccount) end end) هل هذا الكود صحيح
</Mr.Tn6eL> Posted April 27, 2015 Posted April 27, 2015 bool setAccountData ( account theAccount, string key, string value ) skype : 011101000110111000110110011001010110110000110000001110010011000000111001
Mohamed Posted April 27, 2015 Author Posted April 27, 2015 Account مو على Serial تحفض على date انا بدي
Simple. Posted April 27, 2015 Posted April 27, 2015 Account مو على Serial تحفض على date انا بدي استخدم وظيفة مجنون فيك setSerialData * واضحة من الاسم setSerialData(serial , key , value) function setSerialData(serial,key,value) if( value and type(serial) == "string") then setElementData(root,serial.."&"..key,value) end end getSerialData getSerialData(serial , key) function getSerialData(serial,key) if ( key and type(serial) == "string") then value = getElementData(root,serial.."&"..key) end return value end h3x#2020
Mohamed Posted April 27, 2015 Author Posted April 27, 2015 يعني كيف يستعمل هذ الكود هل يوجود مثال او اي شي
yazan Posted April 27, 2015 Posted April 27, 2015 تقدر تستخدم هذه المود و في شرح له https://community.multitheftauto.com/in ... ls&id=6313 bool setPlayerSerialData( player thePlayer, string key, value ) string getPlayerSerialData( player thePlayer, string key ) bool removePlayerSerialData( player thePlayer, string key ) table getAllPlayerSerialData( player thePlayer ) سبحان الله ---------------------------------- LUA 56%
yazan Posted April 27, 2015 Posted April 27, 2015 bool setPlayerSerialData( player thePlayer, string key, value ) player thePlayer لاعب string key المفتاح value القيمه سبحان الله ---------------------------------- LUA 56%
yazan Posted April 27, 2015 Posted April 27, 2015 for k,v in ipairs(getElementsByType("player")) do -------- عمل لوب للاعبين my = getPlayerMoney(v) جلب الفلوس يلي مع لاعب if (my) then يعمل شرط اذا نجلبت bool setPlayerSerialData( v, Money, my ) و القيمه الفلوسMoney يحط داتا للسيريل بالمفتاح سبحان الله ---------------------------------- LUA 56%
yazan Posted April 27, 2015 Posted April 27, 2015 هذي مفتاح انت تحطه للقيمه يعني شوف لو بتجيب قيمه الداتا يلي عند لاعب getPlayerSerialData( v, Mone ) و هذه الشرح ينطبق بعد على وظيفة مجنون فيك setSerialData سبحان الله ---------------------------------- LUA 56%
Mohamed Posted April 27, 2015 Author Posted April 27, 2015 هيك صحيح for k,v in ipairs(getElementsByType("player")) do ss= getElementData(v,"new") if (ss) then bool setPlayerSerialData( v, mohamed, ss)
yazan Posted April 27, 2015 Posted April 27, 2015 يب بس ليه حاط bool + اعمل ايفنت له + وين حاط الاداتا من الاصل سبحان الله ---------------------------------- LUA 56%
Mohamed Posted April 27, 2015 Author Posted April 27, 2015 محفوضة date مثل كيف اخليه لما يخرج و يدخل تبقى
Mr.R Posted April 27, 2015 Posted April 27, 2015 محفوضة date مثل كيف اخليه لما يخرج و يدخل تبقى bool مالها اي علاقه شيلها ^^ * There is no God but Allah, Mohammed is the Messenger Of Allah
yazan Posted April 27, 2015 Posted April 27, 2015 (edited) محفوضة date مثل كيف اخليه لما يخرج و يدخل تبقى اجل شرح فوق وش وضعه addEventHandler('onResourceStart', resourceRoot, --- لمن يشتغل المود function () for k,v in ipairs(getElementsByType("player")) do -- عمل لوب للاعبين f = getPlayerSerialData( v, "Mone" ) ----- Mone جلب الداتا المخزنه يلي قيمتها if (f) then --- اذا تحقق شرط جلب القيمه setPlayerMoney(v, f) --- يعطي لاعب فلوس بمقدار القيمه يلي خزنتها end end end) addEventHandler('onPlayerQuit', root, ------ لمن لاعب يخرج function () my = getPlayerMoney(source) ----- يجيب الفلوس حقته if (my) then ----- اذا تحقق جلب فلوس لاعب setPlayerSerialData( source, "Money", my ) ---- Money يحط داتا للسيريل بقيمة الفلوس بمفتاح end end) Edited April 28, 2015 by Guest سبحان الله ---------------------------------- LUA 56%
ALw7sH Posted April 28, 2015 Posted April 28, 2015 @yazan أنت جالس تشرح له الفنكشنات وانت ماتعرف تقرا الساينتكس صح؟ ._. bool setPlayerSerialData( player thePlayer, string key, value ) اسم الداتا يكون سترنق
Simple. Posted April 28, 2015 Posted April 28, 2015 جرب فنكشن مجنون فيك مجرب حتى لو طلعت ودخلت الداتا موجوده على السيريآل ! h3x#2020
yazan Posted April 28, 2015 Posted April 28, 2015 ممكن الطريقة حق الاخ مجنون فيك + مثال ---------------------- عتذر على الغلط عدلت الكود فوق تقدر تستخدمه سبحان الله ---------------------------------- LUA 56%
Mohamed Posted April 28, 2015 Author Posted April 28, 2015 وش الغلط هون function setSerialData(serial,key,value) if( value and type(serial) == "string") then setElementData(root,serial.."&"..key,value) end end function getSerialData(serial,key) if ( key and type(serial) == "string") then value = getElementData(root,serial.."&"..key) end return value end addEventHandler('onResourceStart', resourceRoot, function () for k,v in ipairs(getElementsByType("player")) do f = getSerialData(v, "snhwa" ) if (f) then setElementData(v, f) end end end) addEventHandler('onPlayerQuit', root, function () my = getElementData(source,"snhwa") if (my) then getSerialData (getPlayerSerial(),my) end end)
TAPL Posted April 29, 2015 Posted April 29, 2015 وش الغلط هون function setSerialData(serial,key,value) if( value and type(serial) == "string") then setElementData(root,serial.."&"..key,value) end end function getSerialData(serial,key) if ( key and type(serial) == "string") then value = getElementData(root,serial.."&"..key) end return value end addEventHandler('onResourceStart', resourceRoot, function () for k,v in ipairs(getElementsByType("player")) do f = getSerialData(v, "snhwa" ) if (f) then setElementData(v, f) end end end) addEventHandler('onPlayerQuit', root, function () my = getElementData(source,"snhwa") if (my) then getSerialData (getPlayerSerial(),my) end end) سطر 20 مو حاط اسم مفتاح الداتا و مو حاط المنت اللاعب الي تبي تجيب سيرياله و مو حاط اسم مفتاح الداتا set بدل get سطر 29 جايب العيد مستخدم و يفترض انك تحط المتغيرات لوكل في سطر 18 و 27 ينمسح لما تسوي ريستارت للسيرفر root و عموماً ترا الألمنت داتا على الـ
Mohamed Posted April 29, 2015 Author Posted April 29, 2015 يصير هيك يعني function setSerialData(serial,key,value) if( value and type(serial) == "string") then setElementData(root,serial.."&"..key,value) end end function getSerialData(serial,key) if ( key and type(serial) == "string") then value = getElementData(root,serial.."&"..key) end return value end addEventHandler('onResourceStart', resourceRoot, function () for k,v in ipairs(getElementsByType("player")) do f = getSerialData(v, "snhwa" ) if (f) then setElementData(v,"snhwa", f) end end end) addEventHandler('onPlayerQuit', root, function () my = getElementData(source,"snhwa") if (my) then setSerialData (root,getPlayerSerial(),"snhwa",my) end end)
Simple. Posted April 29, 2015 Posted April 29, 2015 function setSerialData(serial,key,value) if( value and type(serial) == "string") then setElementData(root,serial.."&"..key,value) end end function getSerialData(serial,key) if ( key and type(serial) == "string") then value = getElementData(root,serial.."&"..key) end return value end addEventHandler('onResourceStart', resourceRoot, function () for _,v in ipairs(getElementsByType("player")) do f = getSerialData(v, "snhwa1" ) if (f) then setElementData(v,"snhwa", f) end end end) addEventHandler('onPlayerQuit', root, function () my = getElementData(source,"snhwa") if (my) then setSerialData (getPlayerSerial(source),"snhwa1",my) end end) h3x#2020
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