MrSAUD1 Posted March 20, 2016 Share Posted March 20, 2016 ميزو ترا الجاي اديتور تقدر تسويه منو علي كل المقاسات بطريقة سهلة جدا ما تحتاج انزل تحت هتلاقي Absolute Relative -- هو يكون مختار Absolute تلقائي المود انتا كل الي عليك تخليه Relative و يظبت لكل المقاسات -- الحق يتقال يب بس ما راح يضبط على الخطوط ! فـ علشان كذا يستخدم الططريقة الى فوق + لو ضبطت راح تضبط على شي وحد بس ! يعني المربع الى حدده غير كذا ما راح يجي Link to comment
Jupi Posted April 1, 2016 Share Posted April 1, 2016 (edited) NOTE : هذا مو فنكشن لكنه ايفينت وما لقيت مواضيع وما يلزم موضوع جديد مشان ايفنت فقلت اطرححه هنا --------------------------- onClientPlayerMoneyChange ClientSide event الايفينت يتنفذ لما تتغير فلوس الاعب المحلي فيه Parameters _________________________________________________________ int OldMoney, int NewMoney • OldMoney : الفلوس اللي كانت مع الاعب قبل التغيير • NewMoney : الفلوس اللي مع الاعب بعد التغيير Source _________________________________________________________ (المصدرهو الاعب المحلي (اللي تغيرت فلوسه Source Code _________________________________________________________ local EventPlayerMoney = getPlayerMoney(localPlayer) addEventHandler("onClientRender", root, function () if EventPlayerMoney ~= getPlayerMoney(localPlayer) then triggerEvent("onClientPlayerMoneyChange", localPlayer, tonumber(EventPlayerMoney), tonumber(getPlayerMoney(localPlayer))) EventPlayerMoney = getPlayerMoney(localPlayer) end end ) addEvent "onClientPlayerMoneyChange" Example _________________________________________________________ المثال ذا يتحقق كل مرة لما تتغير فلوسه اذا كانت فوق 8000 ويطلع نص بلشات VehiclePrice = 8000 addEventHandler("onClientPlayerMoneyChange", root, function (OldMoney, NewMoney) if NewMoney >= VehiclePrice then outputChatBox("Now you can buy the vehicle !", 0, 255, 0) elseif OldMoney < VehiclePrice then outputChatBox("get more money to buy the vehicle", 255, 0, 0) end end ) Edited May 13, 2016 by Guest 1 Link to comment
MrSAUD1 Posted April 1, 2016 Share Posted April 1, 2016 وضيفة جميلة دبولة , ورينا ابداعاتك 1 Link to comment
ALw7sH Posted April 1, 2016 Share Posted April 1, 2016 NOTE : هذا مو فنكشن لكنه ايفينت وما لقيت مواضيع وما يلزم موضوع جديد مشان ايفنت فقلت اطرححه هنا--------------------------- onClientPlayerMoneyChange ClientSide event الايفينت يتنفذ لما تتغير فلوس الاعب المحلي فيه Parameters _________________________________________________________ int OldMoney, int NewMoney • OldMoney : الفلوس اللي كانت مع الاعب قبل التغيير • NewMoney : الفلوس اللي مع الاعب بعد التغيير Source _________________________________________________________ (المصدرهو الاعب المحلي (اللي تغيرت فلوسه Source Code _________________________________________________________ local EventPlayerMoney = getPlayerMoney(localPlayer) addEventHandler("onClientRender", root, function () if EventPlayerMoney ~= getPlayerMoney(localPlayer) then triggerEvent("onClientPlayerMoneyChange", localPlayer, tonumber(EventPlayerMoney), tonumber(getPlayerMoney(localPlayer))) EventPlayerMoney = getPlayerMoney(localPlayer) end end ) addEvent("onClientPlayerMoneyChange", true) Example _________________________________________________________ المثال ذا يتحقق كل مرة لما تتغير فلوسه اذا كانت فوق 8000 ويطلع نص بلشات VehiclePrice = 8000 addEventHandler("onClientPlayerMoneyChange", root, function (OldMoney, NewMoney) if NewMoney >= VehiclePrice then outputChatBox("Now you can buy the vehicle !", 0, 255, 0) elseif OldMoney < VehiclePrice then outputChatBox("get more money to but the vehicle", 255, 0, 0) end end ) ايفنت حلو, بس تقدر تسويه بطريقه افضل منها انك تقدر تستخدمها كلاينت وسيرفر ومنها انك تبتعد عن التحقق بكل فريم ويمكن تكون أدق local fType = "client" _setPlayerMoney = setPlayerMoney _givePlayerMoney = givePlayerMoney _takePlayerMoney = takePlayerMoney function setPlayerMoney(...) local args = {...} local plr,money = (fType == "server") and args[1] or localPlayer, (fType == "server") and arg[2] or arg[1] triggerEvent("on".. (fType == "client" and "Client" or "") .."PlayerMoneyChanged",plr,money,money) return _setPlayerMoney(...) end function givePlayerMoney(...) local args = {...} local plr,money = (fType == "server") and args[1] or localPlayer, (fType == "server") and arg[2] or arg[1] triggerEvent("on".. (fType == "client" and "Client" or "") .."PlayerMoneyChanged",plr,money,getPlayerMoney(plr)+money) return _givePlayerMoney(...) end function takePlayerMoney(...) local args = {...} local plr,money = (fType == "server") and args[1] or localPlayer, (fType == "server") and arg[2] or arg[1] triggerEvent("on".. (fType == "client" and "Client" or "") .."PlayerMoneyChanged",plr,money,getPlayerMoney(plr)-money) return _takePlayerMoney(...) end 1 Link to comment
Jupi Posted April 1, 2016 Share Posted April 1, 2016 ايفنت حلو, بس تقدر تسويه بطريقه افضل منها انك تقدر تستخدمها كلاينت وسيرفر ومنها انك تبتعد عن التحقق بكل فريم ويمكن تكون أدق local fType = "client" _setPlayerMoney = setPlayerMoney _givePlayerMoney = givePlayerMoney _takePlayerMoney = takePlayerMoney function setPlayerMoney(...) local args = {...} local plr,money = (fType == "server") and args[1] or localPlayer, (fType == "server") and arg[2] or arg[1] triggerEvent("on".. (fType == "client" and "Client" or "") .."PlayerMoneyChanged",plr,money,money) return _setPlayerMoney(...) end function givePlayerMoney(...) local args = {...} local plr,money = (fType == "server") and args[1] or localPlayer, (fType == "server") and arg[2] or arg[1] triggerEvent("on".. (fType == "client" and "Client" or "") .."PlayerMoneyChanged",plr,money,getPlayerMoney(plr)+money) return _givePlayerMoney(...) end function takePlayerMoney(...) local args = {...} local plr,money = (fType == "server") and args[1] or localPlayer, (fType == "server") and arg[2] or arg[1] triggerEvent("on".. (fType == "client" and "Client" or "") .."PlayerMoneyChanged",plr,money,getPlayerMoney(plr)-money) return _takePlayerMoney(...) end منور يا وحش طريقتك حلوة بس مشكلتها الطول >.< وضيفة جميلة دبولة , ورينا ابداعاتك نورت ام الموضوع يا سع سع وظيفه رائعة منور Link to comment
#J2mes Posted April 2, 2016 Share Posted April 2, 2016 getRealTimeFromNumber : احظار الوقت الحقيقي من الرقم Source Code : local times = {[1] = "hour",[2] = "minute",[3] = "second",[4] = "monthday" , [5] = "month" , [6] = "year" , [7] = "weekday" , [8] = "yearday" , [9] = "isdst" , [10] = "timestamp"} function getRealTimeFromNumber ( id ) return type ( id ) == "number" and getRealTime()[times[id]] end Ex : local times = {[1] = "hour",[2] = "minute",[3] = "second",[4] = "monthday" , [5] = "month" , [6] = "year" , [7] = "weekday" , [8] = "yearday" , [9] = "isdst" , [10] = "timestamp"} function getRealTimeFromNumber ( id ) return type ( id ) == "number" and getRealTime()[times[id]] end addCommandHandler ( "re" , function ( ) local rand = math["random"] ( #times ) outputChatBox ( tostring ( getRealTimeFromNumber ( rand ) ) ) end ) طبعا لاحد يجي ويقول الوظيقة سهله حقت getRealTime طبعا انا ادري انها سهله بس هاذي تختصر الوقت بـ التوفيق للجميع بأذن الله Link to comment
Ahmed Ly Posted April 2, 2016 Share Posted April 2, 2016 getRealTimeFromNumber : احظار الوقت الحقيقي من الرقم Source Code : local times = {[1] = "hour",[2] = "minute",[3] = "second",[4] = "monthday" , [5] = "month" , [6] = "year" , [7] = "weekday" , [8] = "yearday" , [9] = "isdst" , [10] = "timestamp"} function getRealTimeFromNumber ( id ) return type ( id ) == "number" and getRealTime()[times[id]] end Ex : local times = {[1] = "hour",[2] = "minute",[3] = "second",[4] = "monthday" , [5] = "month" , [6] = "year" , [7] = "weekday" , [8] = "yearday" , [9] = "isdst" , [10] = "timestamp"} function getRealTimeFromNumber ( id ) return type ( id ) == "number" and getRealTime()[times[id]] end addCommandHandler ( "re" , function ( ) local rand = math["random"] ( #times ) outputChatBox ( tostring ( getRealTimeFromNumber ( rand ) ) ) end ) طبعا لاحد يجي ويقول الوظيقة سهله حقت getRealTime طبعا انا ادري انها سهله بس هاذي تختصر الوقت بـ التوفيق للجميع بأذن الله وظيفه جميل بالتوفيق لك Link to comment
xBeSoOo Posted April 4, 2016 Share Posted April 4, 2016 getRealTimeFromNumber : احظار الوقت الحقيقي من الرقم Source Code : local times = {[1] = "hour",[2] = "minute",[3] = "second",[4] = "monthday" , [5] = "month" , [6] = "year" , [7] = "weekday" , [8] = "yearday" , [9] = "isdst" , [10] = "timestamp"} function getRealTimeFromNumber ( id ) return type ( id ) == "number" and getRealTime()[times[id]] end Ex : local times = {[1] = "hour",[2] = "minute",[3] = "second",[4] = "monthday" , [5] = "month" , [6] = "year" , [7] = "weekday" , [8] = "yearday" , [9] = "isdst" , [10] = "timestamp"} function getRealTimeFromNumber ( id ) return type ( id ) == "number" and getRealTime()[times[id]] end addCommandHandler ( "re" , function ( ) local rand = math["random"] ( #times ) outputChatBox ( tostring ( getRealTimeFromNumber ( rand ) ) ) end ) طبعا لاحد يجي ويقول الوظيقة سهله حقت getRealTime طبعا انا ادري انها سهله بس هاذي تختصر الوقت بـ التوفيق للجميع بأذن الله وظيفة رائعة , اضافة مميزة Link to comment
Me[Z]oO Posted April 4, 2016 Share Posted April 4, 2016 NOTE : هذا مو فنكشن لكنه ايفينت وما لقيت مواضيع وما يلزم موضوع جديد مشان ايفنت فقلت اطرححه هنا--------------------------- onClientPlayerMoneyChange ClientSide event الايفينت يتنفذ لما تتغير فلوس الاعب المحلي فيه Parameters _________________________________________________________ int OldMoney, int NewMoney • OldMoney : الفلوس اللي كانت مع الاعب قبل التغيير • NewMoney : الفلوس اللي مع الاعب بعد التغيير Source _________________________________________________________ (المصدرهو الاعب المحلي (اللي تغيرت فلوسه Source Code _________________________________________________________ local EventPlayerMoney = getPlayerMoney(localPlayer) addEventHandler("onClientRender", root, function () if EventPlayerMoney ~= getPlayerMoney(localPlayer) then triggerEvent("onClientPlayerMoneyChange", localPlayer, tonumber(EventPlayerMoney), tonumber(getPlayerMoney(localPlayer))) EventPlayerMoney = getPlayerMoney(localPlayer) end end ) addEvent("onClientPlayerMoneyChange", true) Example _________________________________________________________ المثال ذا يتحقق كل مرة لما تتغير فلوسه اذا كانت فوق 8000 ويطلع نص بلشات VehiclePrice = 8000 addEventHandler("onClientPlayerMoneyChange", root, function (OldMoney, NewMoney) if NewMoney >= VehiclePrice then outputChatBox("Now you can buy the vehicle !", 0, 255, 0) elseif OldMoney < VehiclePrice then outputChatBox("get more money to buy the vehicle", 255, 0, 0) end end ) ايفنت في منتهي الروعة امنور ضابل getRealTimeFromNumber : احظار الوقت الحقيقي من الرقم Source Code : local times = {[1] = "hour",[2] = "minute",[3] = "second",[4] = "monthday" , [5] = "month" , [6] = "year" , [7] = "weekday" , [8] = "yearday" , [9] = "isdst" , [10] = "timestamp"} function getRealTimeFromNumber ( id ) return type ( id ) == "number" and getRealTime()[times[id]] end Ex : local times = {[1] = "hour",[2] = "minute",[3] = "second",[4] = "monthday" , [5] = "month" , [6] = "year" , [7] = "weekday" , [8] = "yearday" , [9] = "isdst" , [10] = "timestamp"} function getRealTimeFromNumber ( id ) return type ( id ) == "number" and getRealTime()[times[id]] end addCommandHandler ( "re" , function ( ) local rand = math["random"] ( #times ) outputChatBox ( tostring ( getRealTimeFromNumber ( rand ) ) ) end ) طبعا لاحد يجي ويقول الوظيقة سهله حقت getRealTime طبعا انا ادري انها سهله بس هاذي تختصر الوقت بـ التوفيق للجميع بأذن الله مغيد الفنكشن استمرر Link to comment
Jupi Posted April 5, 2016 Share Posted April 5, 2016 guiGridListSetItemDataWithKey الفنكشن نفس شغل guiGridListSetItemData لكن الفرق انك تقدر تحط المفتاح الخاص Syntax _________________________________________________ bool guiGridListSetItemDataWithKey(element gridList, int rowIndex, int columnIndex, string key, var data) • gridlist : عنصر الجريد ليست اللي بتحط فيه الداتا • rowIndex : عنصر الرو اللي بتحط فيه الداتا • columnIndex : الكولمن حق الرو اللي بتحط فيه الداتا • key : المفتاح اللي تبي تحط له الداتا • data : الداتا اللي تبي تحطها Source Code _________________________________________________ function guiGridListSetItemDataWithKey(GridList, Row, Column, Key, Value) assert(isElement(GridList), "Bad Argument At Argument #1 got nil") assert(getElementType(GridList) == "gui-gridlist", "Bad Argument At Argument #1 got "..tostring(getElementType(GridList) or type(GridList))) assert(type(Row) == "number", "Bad Argument At Argument #2 got "..tostring(type(Row))) assert(type(Column) == "number", "Bad Argument At Argument #3 got "..tostring(type(Column))) assert(type(Key) == "string", "Bad Argument At Argument #4 got "..tostring(type(Key))) local Data1 = guiGridListGetItemData(GridList, Row, Column) if Data1 == nil or Data1["ATableOfData"] == false or Data1["ATableOfData"] == nil then guiGridListSetItemData(GridList, Row, Column, {["ATableOfData"] = true}) end local Data = guiGridListGetItemData(GridList, Row, Column) if Key ~= "ATableOfData" and Data["ATableOfData"] then local Table = {} local Data = guiGridListGetItemData(GridList, Row, Column) for Key, Value in pairs(Data) do Table[Key] = Value end Table[Key] = Value guiGridListSetItemData(GridList, Row, Column, Table) return true else error("Invalid Key At Argument #4 Change it") end end Returns _________________________________________________ ترجع true لو الداتا تم حطها بنجاح Example _________________________________________________ GridList = guiCreateGridList(464, 262, 396, 377, false) guiGridListAddColumn(GridList, "Col", 0.9) guiGridListAddRow(GridList) guiGridListSetItemDataWithKey(GridList, 0, 1, "Key", "SomeValue") guiGridListSetItemDataWithKey(GridList, 0, 1, "Key2", "SomeValue2") addCommandHandler("GetData", function (CMD, Key) outputChatBox(tostring(guiGridListGetItemDataWithKey(GridList, 0, 1, Key))) end ) --guiGridListGetItemDataWithKey Scroll Down .. --------------------------------------------------- guiGridListGetItemDataWithKey هذا الفنكشن يجيب الداتا الموضوعة بستعمال فنكشن guiGridListSetItemDataWithKey Syntax _________________________________________________ var guiGridListGetItemDataWithKey(element gridList, int rowIndex, int columnIndex, string key) • gridlist : عنصر الجريد ليست اللي بتجيب منه الداتا • rowIndex : الرو اللي بتجيب منه الداتا • columnIndex : الكولمن اللي بتجيب منه الداتا • key : المفتاح حق الداتا Source Code _________________________________________________ function guiGridListGetItemDataWithKey(GridList, Row, Column, Key) assert(getElementType(GridList) == "gui-gridlist", "Bad Argument At Argument #1 got "..tostring(getElementType(GridList) or type(GridList))) assert(type(Row) == "number", "Bad Argument At Argument #2 got "..tostring(type(Row))) assert(type(Column) == "number", "Bad Argument At Argument #3 got "..tostring(type(Column))) assert(type(Key) == "string", "Bad Argument At Argument #4 got "..tostring(type(Key))) assert(Key ~= "ATableOfData", "Invalid Key At Argument #4 Change it") local Data = guiGridListGetItemData(GridList, Row, Column) assert(type(Data) == "table", "Invalid Data Type got "..tostring(type(Data)).." (table expected) ") return Data[Key] end Returns _________________________________________________ ترجع الداتا المخزنة علي الرو Example _________________________________________________ نفس اللي فوق Note : قد تحتوي الوظيفة بعض الاخطاء البسيطة Link to comment
Jupi Posted April 5, 2016 Share Posted April 5, 2016 guiGridListSetItemDataWithKey الفنكشن نفس شغل guiGridListSetItemData لكن الفرق انك تقدر تحط المفتاح الخاص Syntax _________________________________________________ bool guiGridListSetItemDataWithKey(element gridList, int rowIndex, int columnIndex, string key, var data) • gridlist : عنصر الجريد ليست اللي بتحط فيه الداتا • rowIndex : عنصر الرو اللي بتحط فيه الداتا • columnIndex : الكولمن حق الرو اللي بتحط فيه الداتا • key : المفتاح اللي تبي تحط له الداتا • data : الداتا اللي تبي تحطها Source Code _________________________________________________ function guiGridListSetItemDataWithKey(GridList, Row, Column, Key, Value) assert(isElement(GridList), "Bad Argument At Argument #1 got nil") assert(getElementType(GridList) == "gui-gridlist", "Bad Argument At Argument #1 got "..tostring(getElementType(GridList) or type(GridList))) assert(type(Row) == "number", "Bad Argument At Argument #2 got "..tostring(type(Row))) assert(type(Column) == "number", "Bad Argument At Argument #3 got "..tostring(type(Column))) assert(type(Key) == "string", "Bad Argument At Argument #4 got "..tostring(type(Key))) local Data1 = guiGridListGetItemData(GridList, Row, Column) if Data1 == nil or Data1["ATableOfData"] == false or Data1["ATableOfData"] == nil then guiGridListSetItemData(GridList, Row, Column, {["ATableOfData"] = true}) end local Data = guiGridListGetItemData(GridList, Row, Column) if Key ~= "ATableOfData" and Data["ATableOfData"] then local Table = {} local Data = guiGridListGetItemData(GridList, Row, Column) for Key, Value in pairs(Data) do Table[Key] = Value end Table[Key] = Value guiGridListSetItemData(GridList, Row, Column, Table) return true else error("Invalid Key At Argument #4 Change it") end end Returns _________________________________________________ ترجع true لو الداتا تم حطها بنجاح Example _________________________________________________ GridList = guiCreateGridList(464, 262, 396, 377, false) guiGridListAddColumn(GridList, "Col", 0.9) guiGridListAddRow(GridList) guiGridListSetItemDataWithKey(GridList, 0, 1, "Key", "SomeValue") guiGridListSetItemDataWithKey(GridList, 0, 1, "Key2", "SomeValue2") addCommandHandler("GetData", function (CMD, Key) outputChatBox(tostring(guiGridListGetItemDataWithKey(GridList, 0, 1, Key))) end ) --guiGridListGetItemDataWithKey Scroll Down .. --------------------------------------------------- guiGridListGetItemDataWithKey هذا الفنكشن يجيب الداتا الموضوعة بستعمال فنكشن guiGridListSetItemDataWithKey Syntax _________________________________________________ var guiGridListGetItemDataWithKey(element gridList, int rowIndex, int columnIndex, string key) • gridlist : عنصر الجريد ليست اللي بتجيب منه الداتا • rowIndex : الرو اللي بتجيب منه الداتا • columnIndex : الكولمن اللي بتجيب منه الداتا • key : المفتاح حق الداتا Source Code _________________________________________________ function guiGridListGetItemDataWithKey(GridList, Row, Column, Key) assert(getElementType(GridList) == "gui-gridlist", "Bad Argument At Argument #1 got "..tostring(getElementType(GridList) or type(GridList))) assert(type(Row) == "number", "Bad Argument At Argument #2 got "..tostring(type(Row))) assert(type(Column) == "number", "Bad Argument At Argument #3 got "..tostring(type(Column))) assert(type(Key) == "string", "Bad Argument At Argument #4 got "..tostring(type(Key))) assert(Key ~= "ATableOfData", "Invalid Key At Argument #4 Change it") local Data = guiGridListGetItemData(GridList, Row, Column) assert(type(Data) == "table", "Invalid Data Type got "..tostring(type(Data)).." (table expected) ") return Data[Key] end Returns _________________________________________________ ترجع الداتا المخزنة علي الرو Example _________________________________________________ نفس اللي فوق Note : قد تحتوي الوظيفة بعض الاخطاء البسيطة Link to comment
Jupi Posted April 5, 2016 Share Posted April 5, 2016 مجهود كبير يادابل , اهنيك منور بوند Link to comment
Jupi Posted April 5, 2016 Share Posted April 5, 2016 مجهود كبير يادابل , اهنيك منور بوند Link to comment
#Mr.Rajo~,< Posted April 6, 2016 Share Posted April 6, 2016 يالله وش ذا ابدعت يادابل :] اهنيك والله على هذا الابداع الجميل جدا واصل ياكنق Link to comment
#Mr.Rajo~,< Posted April 6, 2016 Share Posted April 6, 2016 يالله وش ذا ابدعت يادابل :] اهنيك والله على هذا الابداع الجميل جدا واصل ياكنق Link to comment
SycroX Posted April 6, 2016 Share Posted April 6, 2016 ههه ارحم شوي يا دابل كل يوم كود جديد واصل يا بطل ابداعت صراحة علي راي راجو Link to comment
SycroX Posted April 6, 2016 Share Posted April 6, 2016 ههه ارحم شوي يا دابل كل يوم كود جديد واصل يا بطل ابداعت صراحة علي راي راجو 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