' A F . Posted May 24, 2017 Share Posted May 24, 2017 رائعه الوظيفة صراحتاً , بس لو تعدل عليها مو شرط لوحة اي شيء من العناصر الي بـ gui 1 Link to comment
Master_MTA Posted May 25, 2017 Share Posted May 25, 2017 event onPlayerMoneyChanged addEventHandler('onPlayerLogin',root,function() local acc=getPlayerAccount(source) if not getAccountData(acc,'money') then setAccountData(acc,'money',getPlayerMoney(source)) end end) setTimer(function() for k,plr in ipairs(getElementsByType('player'))do if getElementType(plr)=='player' then if getPlayerMoney(plr)~=tonumber(getAccountData(getPlayerAccount(plr),'money')) then local acc=getPlayerAccount(plr) if not isGuestAccount(acc) then setAccountData(acc,'money',money) triggerEvent('onPlayerMoneyChanged',root,getAccountName(acc),getPlayerMoney(plr),plr) end end end end end,1000,0) addEvent('onPlayerMoneyChanged',true) parameters: string accname,number money, player plr accname=اسم حساب اللي تغيرت فلوسه money=الفلوس الجديده بعد التغير plr=اللاعب اللي تغيرت فلوسه مثال: Example: addEventHandler('onPlayerMoneyChanged',root,function(accname,money,plr) setAccountData(getAccount(accname),'mymoney',money) end) بالتوفيق للجميع Link to comment
^iiEcoo'x_) Posted May 25, 2017 Share Posted May 25, 2017 Just now, Master_MTA said: event onPlayerMoneyChanged addEventHandler('onPlayerLogin',root,function() local acc=getPlayerAccount(source) if not getAccountData(acc,'money') then setAccountData(acc,'money',getPlayerMoney(source)) end end) setTimer(function() for k,plr in ipairs(getElementsByType('player'))do if getElementType(plr)=='player' then if getPlayerMoney(plr)~=tonumber(getAccountData(getPlayerAccount(plr),'money')) then local acc=getPlayerAccount(plr) if not isGuestAccount(acc) then setAccountData(acc,'money',money) triggerEvent('onPlayerMoneyChanged',root,getAccountName(acc),getPlayerMoney(plr),plr) end end end end end,1000,0) addEvent('onPlayerMoneyChanged',true) parameters: string accname,number money, player plr accname=اسم حساب اللي تغيرت فلوسه money=الفلوس الجديده بعد التغير plr=اللاعب اللي تغيرت فلوسه مثال: Example: addEventHandler('onPlayerMoneyChanged',root,function(accname,money,plr) setAccountData(getAccount(accname),'mymoney',money) end) بالتوفيق للجميع موجودة من قبل Link to comment
Master_MTA Posted May 25, 2017 Share Posted May 25, 2017 Just now, #_iMr.[E]coo said: موجودة من قبل والله مدري انا صنعتها لنفسي وقلت خلني اشاركها معكم على العموم منك نستفيد يا مستر ايكو لكني بحثت عنها يا عسل ولم اجدها تقدر توريني وين موجوده +_+ Link to comment
^iiEcoo'x_) Posted May 25, 2017 Share Posted May 25, 2017 1 minute ago, Master_MTA said: والله مدري انا صنعتها لنفسي وقلت خلني اشاركها معكم على العموم منك نستفيد يا مستر ايكو لكني بحثت عنها يا عسل ولم اجدها تقدر توريني وين موجوده +_+ https://forum.multitheftauto.com/topic/42698-تحت-التطوير-كود-useful-arab-functions/?do=findComment&comment=770503 Link to comment
Master_MTA Posted May 25, 2017 Share Posted May 25, 2017 Just now, #_iMr.[E]coo said: https://forum.multitheftauto.com/topic/42698-تحت-التطوير-كود-useful-arab-functions/?do=findComment&comment=770503 ClientSide event ركز فيها يعسل Link to comment
^iiEcoo'x_) Posted May 25, 2017 Share Posted May 25, 2017 Just now, Master_MTA said: ClientSide event ركز فيها يعسل كمان في كود الوحش تحت رده بنفس الصفحة ، تقدر تستفيد منه Link to comment
Master_MTA Posted May 25, 2017 Share Posted May 25, 2017 Just now, #_iMr.[E]coo said: كمان في كود الوحش تحت رده بنفس الصفحة ، تقدر تستفيد منه يعطيك العافيه والله لو اني ادري ما كنت سويتها لاني بحثت عنها في اليوزفل فنكشن ما حصلتها على العموم مشكور +_+ Link to comment
^iiEcoo'x_) Posted May 25, 2017 Share Posted May 25, 2017 Just now, Master_MTA said: يعطيك العافيه والله لو اني ادري ما كنت سويتها لاني بحثت عنها في اليوزفل فنكشن ما حصلتها على العموم مشكور +_+ اهلا Link to comment
#Soking Posted May 25, 2017 Share Posted May 25, 2017 (edited) 17 hours ago, Default said: رائعه الوظيفة صراحتاً , بس لو تعدل عليها مو شرط لوحة اي شيء من العناصر الي بـ gui شكرا على رايك :* local Check = { [ 'window' ] = true , [ 'button' ] = true , [ 'label' ] = true , [ 'memo' ] = true , [ 'combobox' ] = true , [ 'radiobutton' ] = true , [ 'edit' ] = true , [ 'tab' ] = true , [ 'tabpanel' ] = true } function guiGetElement ( Name , Type ) if ( type ( Name ) == 'string' and Check [ Type ] ) then for _ , v in ipairs ( getElementsByType ( 'gui-' .. Type ) ) do if ( guiGetText ( v ) == Name ) then return v end end end return false end Edited May 25, 2017 by #Soking 2 Link to comment
#Soking Posted May 26, 2017 Share Posted May 26, 2017 (edited) aBlip , aCounter = { } , { } function createFlashingBlip ( Player , iCon , xPos , yPos , Number ) if ( getElementType ( Player ) == 'player' and type ( iCon ) == 'number' and type ( xPos ) == 'number' and type ( yPos ) == 'number' and type ( Number ) == 'number' ) then aBlip [ Player ] , aCounter [ Player ] = nil , 0 setTimer ( function ( Player ) setTimer ( function ( Player ) if ( isElement ( aBlip [ Player ] ) ) then destroyElement ( aBlip [ Player ] ) aCounter [ Player ] = aCounter [ Player ] + 1 if ( aCounter [ Player ] == 20 ) then aBlip [ Player ] = createBlip ( xPos , yPos , 0 , iCon ) setElementData ( aBlip [ Player ] , 'Owner' , Player ) setElementData ( aBlip [ Player ] , 'Number' , Number ) end end end , 50 , 1 , Player ) aBlip [ Player ] = createBlip ( xPos , yPos , 0 , iCon ) end , 200 , 20 , Player ) end ------------- ----------- ---- function getFlashingBlip ( Player , iCon , Number ) if ( getElementType ( Player ) == 'player' and type ( iCon ) == 'number' and type ( Number ) == 'number' ) then for _ , v in ipairs ( getElementsByType ( 'blip' ) ) do local Owner , aNumber = getElementData ( v , 'Owner' ) , getElementData ( v , 'Number' ) if ( getBlipIcon ( v ) == iCon and Owner == Player and aNumber == Number ) then return v end end end return false end سلام عليكم اليوم اطرح لكم وظيفتين بمناسبه حلول شهر رمضان الكريم , بالبدايه كل عام وانتم بخير , واسف لو في اخطاء ( جوال )- المهم الفكره أنها تسوي لك بليب ( علامه ) تختفي و تظهر بسرعه بغرض لفت نظر الاعب لهأ Server Side ولكل علامه تسوي لها رقم معين عشان تستدعي العلامه عبرهأ مثل مأ تلاحظون في xPos , yPos مأفي z لآنه مأله أهميه للعلآمه , المهم createFlashingBlip ( Player , iCon , xPos , yPos , Number ) الاعب و اي دي العلامه و الاحدثيات و الرقم الخاص عشان تستدعي العلامه و عشان تستدعيها مثلا destroyElement ( getFlashingBlip ( Player , iCon , Number ) ) و تعبي الباينات أترككم للتجربه يا ليت اي خطء او بق خبروني Edited May 26, 2017 by #Soking 3 Link to comment
MR.StoRm Posted May 27, 2017 Share Posted May 27, 2017 9 hours ago, #Soking said: aBlip , aCounter = { } , { } function createFlashingBlip ( Player , iCon , xPos , yPos , Number ) if ( getElementType ( Player ) == 'player' and type ( iCon ) == 'number' and type ( xPos ) == 'number' and type ( yPos ) == 'number' and type ( Number ) == 'number' ) then aBlip [ Player ] , aCounter [ Player ] = nil , 0 setTimer ( function ( Player ) setTimer ( function ( Player ) if ( isElement ( aBlip [ Player ] ) ) then destroyElement ( aBlip [ Player ] ) aCounter [ Player ] = aCounter [ Player ] + 1 if ( aCounter [ Player ] == 20 ) then aBlip [ Player ] = createBlip ( xPos , yPos , 0 , iCon ) setElementData ( aBlip [ Player ] , 'Owner' , Player ) setElementData ( aBlip [ Player ] , 'Number' , Number ) end end end , 50 , 1 , Player ) aBlip [ Player ] = createBlip ( xPos , yPos , 0 , iCon ) end , 200 , 20 , Player ) end ------------- ----------- ---- function getFlashingBlip ( Player , iCon , Number ) if ( getElementType ( Player ) == 'player' and type ( iCon ) == 'number' and type ( Number ) == 'number' ) then for _ , v in ipairs ( getElementsByType ( 'blip' ) ) do local Owner , aNumber = getElementData ( v , 'Owner' ) , getElementData ( v , 'Number' ) if ( getBlipIcon ( v ) == iCon and Owner == Player and aNumber == Number ) then return v end end end return false end سلام عليكم اليوم اطرح لكم وظيفتين بمناسبه حلول شهر رمضان الكريم , بالبدايه كل عام وانتم بخير , واسف لو في اخطاء ( جوال )- المهم الفكره أنها تسوي لك بليب ( علامه ) تختفي و تظهر بسرعه بغرض لفت نظر الاعب لهأ Server Side ولكل علامه تسوي لها رقم معين عشان تستدعي العلامه عبرهأ مثل مأ تلاحظون في xPos , yPos مأفي z لآنه مأله أهميه للعلآمه , المهم createFlashingBlip ( Player , iCon , xPos , yPos , Number ) الاعب و اي دي العلامه و الاحدثيات و الرقم الخاص عشان تستدعي العلامه و عشان تستدعيها مثلا destroyElement ( getFlashingBlip ( Player , iCon , Number ) ) و تعبي الباينات أترككم للتجربه يا ليت اي خطء او بق خبروني رآئع , لكن ناقص إيند لسطر 4 ..@#Soking Link to comment
#Soking Posted May 27, 2017 Share Posted May 27, 2017 3 hours ago, MR.StoRm said: رآئع , لكن ناقص إيند لسطر 4 ..@#Soking ماعتقد ناسي شي Link to comment
MR.StoRm Posted May 27, 2017 Share Posted May 27, 2017 1 minute ago, #Soking said: ماعتقد ناسي شي راجعه . Link to comment
#Soking Posted May 27, 2017 Share Posted May 27, 2017 Just now, MR.StoRm said: راجعه . انت شغلته و طلعلك غلط ؟ Link to comment
MR.StoRm Posted May 27, 2017 Share Posted May 27, 2017 Just now, #Soking said: انت شغلته و طلعلك غلط ؟ لا بس ناقص إيند لسطر خمسة آسف مب اربعة ض بالتوفيق 1 Link to comment
#Soking Posted May 27, 2017 Share Posted May 27, 2017 1 minute ago, MR.StoRm said: لا بس ناقص إيند لسطر خمسة آسف مب اربعة ض بالتوفيق اوك براجعه ولو في خطء بصلحه 19 minutes ago, MR.StoRm said: لا بس ناقص إيند لسطر خمسة آسف مب اربعة ض بالتوفيق aBlip , aCounter = { } , { } function createFlashingBlip ( Player , iCon , xPos , yPos , Number ) if ( getElementType ( Player ) == 'player' and type ( iCon ) == 'number' and type ( xPos ) == 'number' and type ( yPos ) == 'number' and type ( Number ) == 'number' ) then aBlip [ Player ] , aCounter [ Player ] = nil , 0 setTimer ( function ( Player ) setTimer ( function ( Player ) if ( isElement ( aBlip [ Player ] ) ) then destroyElement ( aBlip [ Player ] ) aCounter [ Player ] = aCounter [ Player ] + 1 if ( aCounter [ Player ] == 20 ) then aBlip [ Player ] = createBlip ( xPos , yPos , 0 , iCon ) setElementData ( aBlip [ Player ] , 'Owner' , Player ) setElementData ( aBlip [ Player ] , 'Number' , Number ) end end end , 50 , 1 , Player ) aBlip [ Player ] = createBlip ( xPos , yPos , 0 , iCon ) end , 200 , 20 , Player ) end end ------------- ----------- ---- function getFlashingBlip ( Player , iCon , Number ) if ( getElementType ( Player ) == 'player' and type ( iCon ) == 'number' and type ( Number ) == 'number' ) then for _ , v in ipairs ( getElementsByType ( 'blip' ) ) do local Owner , aNumber = getElementData ( v , 'Owner' ) , getElementData ( v , 'Number' ) if ( getBlipIcon ( v ) == iCon and Owner == Player and aNumber == Number ) then return v end end end return false end شكرا على الملاحظه تم التعديل Link to comment
Abdul KariM Posted May 27, 2017 Share Posted May 27, 2017 @#Soking مفروض تسوي حدث اول مايموت الاعب واول مايخرج وتحذف العلامة منه بالتوفيق 1 Link to comment
#Soking Posted May 27, 2017 Share Posted May 27, 2017 11 minutes ago, Abdul KariM said: @#Soking مفروض تسوي حدث اول مايموت الاعب واول مايخرج وتحذف العلامة منه بالتوفيق هو حر حسب استخدامه منور كركر Link to comment
MR.StoRm Posted May 27, 2017 Share Posted May 27, 2017 2 hours ago, #Soking said: اوك براجعه ولو في خطء بصلحه aBlip , aCounter = { } , { } function createFlashingBlip ( Player , iCon , xPos , yPos , Number ) if ( getElementType ( Player ) == 'player' and type ( iCon ) == 'number' and type ( xPos ) == 'number' and type ( yPos ) == 'number' and type ( Number ) == 'number' ) then aBlip [ Player ] , aCounter [ Player ] = nil , 0 setTimer ( function ( Player ) setTimer ( function ( Player ) if ( isElement ( aBlip [ Player ] ) ) then destroyElement ( aBlip [ Player ] ) aCounter [ Player ] = aCounter [ Player ] + 1 if ( aCounter [ Player ] == 20 ) then aBlip [ Player ] = createBlip ( xPos , yPos , 0 , iCon ) setElementData ( aBlip [ Player ] , 'Owner' , Player ) setElementData ( aBlip [ Player ] , 'Number' , Number ) end end end , 50 , 1 , Player ) aBlip [ Player ] = createBlip ( xPos , yPos , 0 , iCon ) end , 200 , 20 , Player ) end end ------------- ----------- ---- function getFlashingBlip ( Player , iCon , Number ) if ( getElementType ( Player ) == 'player' and type ( iCon ) == 'number' and type ( Number ) == 'number' ) then for _ , v in ipairs ( getElementsByType ( 'blip' ) ) do local Owner , aNumber = getElementData ( v , 'Owner' ) , getElementData ( v , 'Number' ) if ( getBlipIcon ( v ) == iCon and Owner == Player and aNumber == Number ) then return v end end end return false end شكرا على الملاحظه تم التعديل 2 hours ago, #Soking said: اوك براجعه ولو في خطء بصلحه aBlip , aCounter = { } , { } function createFlashingBlip ( Player , iCon , xPos , yPos , Number ) if ( getElementType ( Player ) == 'player' and type ( iCon ) == 'number' and type ( xPos ) == 'number' and type ( yPos ) == 'number' and type ( Number ) == 'number' ) then aBlip [ Player ] , aCounter [ Player ] = nil , 0 setTimer ( function ( Player ) setTimer ( function ( Player ) if ( isElement ( aBlip [ Player ] ) ) then destroyElement ( aBlip [ Player ] ) aCounter [ Player ] = aCounter [ Player ] + 1 if ( aCounter [ Player ] == 20 ) then aBlip [ Player ] = createBlip ( xPos , yPos , 0 , iCon ) setElementData ( aBlip [ Player ] , 'Owner' , Player ) setElementData ( aBlip [ Player ] , 'Number' , Number ) end end end , 50 , 1 , Player ) aBlip [ Player ] = createBlip ( xPos , yPos , 0 , iCon ) end , 200 , 20 , Player ) end end ------------- ----------- ---- function getFlashingBlip ( Player , iCon , Number ) if ( getElementType ( Player ) == 'player' and type ( iCon ) == 'number' and type ( Number ) == 'number' ) then for _ , v in ipairs ( getElementsByType ( 'blip' ) ) do local Owner , aNumber = getElementData ( v , 'Owner' ) , getElementData ( v , 'Number' ) if ( getBlipIcon ( v ) == iCon and Owner == Player and aNumber == Number ) then return v end end end return false end شكرا على الملاحظه تم التعديل العفو حياك الله , وظيفة رائعة ! Link to comment
#Soking Posted May 27, 2017 Share Posted May 27, 2017 Just now, MR.StoRm said: العفو حياك الله , وظيفة رائعة ! منور ستروم Link to comment
#Soking Posted May 27, 2017 Share Posted May 27, 2017 1 minute ago, #BrosS said: وظيفة قادحة ي سوكين ^ منور يا قلبي انته Link to comment
MR.StoRm Posted May 27, 2017 Share Posted May 27, 2017 (edited) 2 hours ago, #Soking said: منور ستروم ستورم مو ستروم - + نورك ^ Edited May 27, 2017 by MR.StoRm 1 Link to comment
^iiEcoo'x_) Posted May 30, 2017 Share Posted May 30, 2017 @#Soking سوي تليون للبيلب ؟ Visible To وسوي بنفس فنكشن انشاء البلب لمين تظهر العلامة 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