Doffy Posted February 11, 2017 Share Posted February 11, 2017 Colnum ابي اسوي في زر التاب يكون اسمه Money يظهر فلوس اللاعبين Link to comment
' A F . Posted February 11, 2017 Share Posted February 11, 2017 exports -- 'scoreboardAddColumn' setTimer getElementsByType getPlayerMoney setElementData 1 Link to comment
Doffy Posted February 11, 2017 Author Share Posted February 11, 2017 Just now, Default said: exports -- 'scoreboardAddColumn' setTimer getElementsByType getPlayerMoney setElementData طيب وش فايدة التايمر فهذا ؟ Link to comment
' A F . Posted February 11, 2017 Share Posted February 11, 2017 مثلأ تسوي كل 3 دقائق يتحدث التايمر يمكن لاعب زادت فلوسة او العكس Link to comment
Doffy Posted February 11, 2017 Author Share Posted February 11, 2017 Just now, Default said: مثلأ تسوي كل 3 دقائق يتحدث التايمر يمكن لاعب زادت فلوسة او العكس طيب عادي اخلي التايمر كل 5 ثواني ؟ Link to comment
^iiEcoo'x_) Posted February 11, 2017 Share Posted February 11, 2017 1 minute ago, Default said: مثلأ تسوي كل 3 دقائق يتحدث التايمر يمكن لاعب زادت فلوسة او العكس + عشان م يصير لاق صح ؟ Link to comment
' A F . Posted February 11, 2017 Share Posted February 11, 2017 @KinG_Himoo12 : يب تقدر @#_iMr.[E]coo : نعم .. Link to comment
Abdul KariM Posted February 11, 2017 Share Posted February 11, 2017 في حدث مسويه الاخ دابل Wind 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 ) بيساعدك كثير 3 Link to comment
Doffy Posted February 11, 2017 Author Share Posted February 11, 2017 15 minutes ago, Abdul KariM said: في حدث مسويه الاخ دابل بيساعدك كثير محاولتي ما اشتغلت exports.scoreboard:addScoreboardColumn('Money') addEventHandler("onResourceStart",root, setTimer(function() if getElementsByType ( "Money" ) then getPlayerMoney( source ) setElementData ( source, "getPlayerMoney;players", Money ) end end,500,1) Link to comment
' A F . Posted February 11, 2017 Share Posted February 11, 2017 exports.scoreboard:addScoreboardColumn('Money') addEventHandler ( "onResourceStart" , resourceRoot , function ( ) for index,values in ipairs ( getElementsByType ( "player" ) ) do setElementData ( values , "Money" , getPlayerMoney ( values ) ); end --- # Timer setTimer ( function ( ) for index,values in ipairs ( getElementsByType ( "player" ) ) do setElementData ( values , "Money" , getPlayerMoney ( values ) ); end end,3000,0) end ); 1 Link to comment
Doffy Posted February 11, 2017 Author Share Posted February 11, 2017 8 minutes ago, Default said: exports.scoreboard:addScoreboardColumn('Money') addEventHandler ( "onResourceStart" , resourceRoot , function ( ) for index,values in ipairs ( getElementsByType ( "player" ) ) do setElementData ( values , "Money" , getPlayerMoney ( values ) ); end --- # Timer setTimer ( function ( ) for index,values in ipairs ( getElementsByType ( "player" ) ) do setElementData ( values , "Money" , getPlayerMoney ( values ) ); end end,3000,0) end ); كيف اجيب جنبه علامة دولار الي هي كذا $ Link to comment
' A F . Posted February 11, 2017 Share Posted February 11, 2017 عدل على الارقمنت الثالث بـ setElementData getPlayerMoney ( values ).." $" Link to comment
Doffy Posted February 11, 2017 Author Share Posted February 11, 2017 1 minute ago, Default said: عدل على الارقمنت الثالث بـ setElementData getPlayerMoney ( values ).." $" م نفع ابيها تظهر قبل الفلوس مو بعد الفلوس Link to comment
' A F . Posted February 11, 2017 Share Posted February 11, 2017 exports.scoreboard:addScoreboardColumn('Money') addEventHandler ( "onResourceStart" , resourceRoot , function ( ) for index,values in ipairs ( getElementsByType ( "player" ) ) do setElementData ( values , "Money" , "$"..getPlayerMoney ( values ) ); end --- # Timer setTimer ( function ( ) for index,values in ipairs ( getElementsByType ( "player" ) ) do setElementData ( values , "Money" , "$"..getPlayerMoney ( values ) ); end end,3000,0) end ); 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