Mr.Mostafa Posted January 18, 2019 Share Posted January 18, 2019 سلام عليكم في ايفنت , للفلوس لما تتغير ؟ Link to comment
' A F . Posted January 18, 2019 Share Posted January 18, 2019 فيه شخص من الشباب مسويها شوف بموضوع الوظائف المُفيدة . Link to comment
Mr.Mostafa Posted January 18, 2019 Author Share Posted January 18, 2019 22 minutes ago, Default#^ said: فيه شخص من الشباب مسويها شوف بموضوع الوظائف المُفيدة . ما تعرف اسمها طيب Link to comment
' A F . Posted January 18, 2019 Share Posted January 18, 2019 هذا حق @#x1AhMeD-09 addEvent "onPlayerMoneyChange" function onPreFunction(sourceResource, functionName, isAllowedByACL, luaFilename, luaLineNumber, ...) local args = {...} if functionName == "setPlayerMoney" or functionName == "takePlayerMoney" or functionName == "givePlayerMoney" and #args == 2 and isElement(args[1]) then triggerEvent("onPlayerMoneyChange", args[1], args[2]) end end addDebugHook("preFunction", onPreFunction) -- مثال addEventHandler("onPlayerMoneyChange", root, function(newMoney) outputChatBox(getPlayerName(source).."'s money changed to "..newMoney, root, 255, 0, 0, true) end ) Link to comment
Mr.Mostafa Posted January 18, 2019 Author Share Posted January 18, 2019 5 minutes ago, Default#^ said: هذا حق @#x1AhMeD-09 addEvent "onPlayerMoneyChange" function onPreFunction(sourceResource, functionName, isAllowedByACL, luaFilename, luaLineNumber, ...) local args = {...} if functionName == "setPlayerMoney" or functionName == "takePlayerMoney" or functionName == "givePlayerMoney" and #args == 2 and isElement(args[1]) then triggerEvent("onPlayerMoneyChange", args[1], args[2]) end end addDebugHook("preFunction", onPreFunction) -- مثال addEventHandler("onPlayerMoneyChange", root, function(newMoney) outputChatBox(getPlayerName(source).."'s money changed to "..newMoney, root, 255, 0, 0, true) end ) يب وحصلت واحد تاني بعد في اليوزفل فنكشنس بس هادا ما يجيب لاق؟ Link to comment
Mr.Mostafa Posted January 18, 2019 Author Share Posted January 18, 2019 4 minutes ago, Default#^ said: لأ في مشكله يعني فلوسي كانت 0 , ضفت علي فلوسي 5 , كتبلي ان فلوسك صارت 5 , بعد ثانية كتبلي فلوسك صارت 0 يرجعلي القيمة القديمة بعد الرسالة الاصلية بثانية Link to comment
SycroX Posted January 21, 2019 Share Posted January 21, 2019 On 01/04/2016 at 09:06, Jupiter said: 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 ) 1 Link to comment
Mr.Mostafa Posted January 23, 2019 Author Share Posted January 23, 2019 On 21/01/2019 at 08:34, #x1AhMeD-09 said: يب هادا حصلته , بس هل هادا يجيب لاق ؟ Link to comment
Guest Posted January 23, 2019 Share Posted January 23, 2019 39 minutes ago, Mr.Mostafa said: يب هادا حصلته , بس هل هادا يجيب لاق ؟ nope. 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