Crisi# Posted December 26, 2013 Share Posted December 26, 2013 ابي اذا لمس ماركر يعطي فلوس ما بين 4000 و 5000 حلو كذا لحين ابي بعد 3 دقايق يروحو فلوس ممكن تزبطو تايم addEventHandler,('onMarkerHit',marker, function (hitElemtnt) if (getElementType)(hitElmenet)=='Player' givePlayerMoney(player,math.random(3000,4134)) end end) Link to comment
max-mohammed Posted December 26, 2013 Share Posted December 26, 2013 جرب ذا addEventHandler,('onMarkerHit',marker, function ms (hitElemtnt) if (getElementType)(hitElmenet)=='Player' givePlayerMoney(player,math.random(3000,4134)) end) setTimer(ms,الوقت هنا) Link to comment
Crisi# Posted December 26, 2013 Author Share Posted December 26, 2013 ممكن اعرف وش ms Link to comment
max-mohammed Posted December 26, 2013 Share Posted December 26, 2013 هذا اسم اختياري اسم الوظيفة تقدر تغييره Link to comment
iPrestege Posted December 26, 2013 Share Posted December 26, 2013 خطأ يفضل تسوي تيبل تايمر للاعب عشان الاق و تحديد التايمر اساساً للاعب نفسة و تقتل التايمر و تسوي داتا تخزنها فيه او تخزنة بنفس التيبل اذا تبي .. Link to comment
Mr.AL#PLaYeR Posted December 26, 2013 Share Posted December 26, 2013 ^ معك حق #! يفضل ذلكـ Link to comment
#DRAGON!FIRE Posted December 26, 2013 Share Posted December 26, 2013 جرب ذا addEventHandler,('onMarkerHit',marker, function ms (hitElemtnt) if (getElementType)(hitElmenet)=='Player' givePlayerMoney(player,math.random(3000,4134)) end) setTimer(ms,الوقت هنا) # عفسةةة . , ججرب marker = createMarker ( ..... ); Timer = {}; local Time, timeExecute = 5000, 1 addEventHandler ( "onMarkerHit", marker, function ( player ) if getElementType ( player ) == "player" then money = math.random( 3000, 4134 ); givePlayerMoney( player, money) setElementData ( player, "HaveMoney", true ) setElementData ( player, "Money", tonumber( money ) ) if not ( isTimer ( Timer [ player ] ) ) then Timer [ player ] = setTimer ( RemoveMoney, Time, timeExecute, player ) end end end ) RemoveMoney = function ( plr ) if ( getElementData( plr, "HaveMoney" ) ) then if ( getElementData( plr, "Money" ) ~= nil ) then takePlayerMoney ( plr, getElementData( plr, "Money" ) ) end end 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