Adham Posted May 12, 2016 Share Posted May 12, 2016 سلام عليكم الكود ذا اليخش علي المركر ياخد فلوس انا عاوز بقا لما يضعط علي حرف K يستلم الفلوس والمركر موجود برده. local marker = createMarker ( 2490.96240, -1684.29456, 13.50838, 'cylinder', 1, 255, 255, 255, 255 ) local Cplayer = getLocalPlayer() addEventHandler( 'onClientMarkerHit', marker, function(player) if (player == localPlayer) then triggerServerEvent( 'Money', Cplayer ) end end, false) addEvent( 'Money', true ) addEventHandler( 'Money', root, function() if doesPedHaveJetPack( source ) then removePedJetPack( source ) end givePlayerMoney( source, 1000 ) killPed( source ) end ) Link to comment
#|_oskar_|# Posted May 12, 2016 Share Posted May 12, 2016 bindKey ("K","down",function () if isElementWithinMarker(Cplayer,marker) then triggerServerEvent( 'Money', Cplayer ) end end) Link to comment
Adham Posted May 12, 2016 Author Share Posted May 12, 2016 ? local marker = createMarker ( 2490.96240, -1684.29456, 13.50838, 'cylinder', 1, 255, 255, 255, 255 ) local Cplayer = getLocalPlayer() bindKey ("K","down",function () if isElementWithinMarker(Cplayer,marker) then triggerServerEvent( 'Money', Cplayer ) end end) addEventHandler( 'onClientMarkerHit', marker, Link to comment
#|_oskar_|# Posted May 12, 2016 Share Posted May 12, 2016 ? local marker = createMarker ( 2490.96240, -1684.29456, 13.50838, 'cylinder', 1, 255, 255, 255, 255 ) local Cplayer = getLocalPlayer() bindKey ("K","down",function () if isElementWithinMarker(Cplayer,marker) then triggerServerEvent( 'Money', Cplayer ) end end) addEventHandler( 'onClientMarkerHit', marker, انسخ كود واستبدله بكودك بس خلي الماركر Link to comment
Adham Posted May 12, 2016 Author Share Posted May 12, 2016 اوهه شكرا.؟ طيب لو ابي اعمله اذا ادخل اخد الفلوس يجي وقت معين عشان ياخد الفلوس التاني Link to comment
#|_oskar_|# Posted May 12, 2016 Share Posted May 12, 2016 اوههشكرا.؟ طيب لو ابي اعمله اذا ادخل اخد الفلوس يجي وقت معين عشان ياخد الفلوس التاني setTimer Link to comment
Adham Posted May 12, 2016 Author Share Posted May 12, 2016 ? local marker = createMarker ( 2490.96240, -1684.29456, 13.50838, 'cylinder', 1, 255, 255, 255, 255 ) setElementAlpha(marker, 0) local Cplayer = getLocalPlayer() bindKey ("K","down",function () if isElementWithinMarker(Cplayer,marker) then setTimer ( 1000, 1 ) triggerServerEvent( 'Money', Cplayer ) end end) Link to comment
Adham Posted May 12, 2016 Author Share Posted May 12, 2016 طيب لو انا عاوز الكود دا local marker = createMarker ( 2490.96240, -1684.29456, 13.50838, 'cylinder', 1, 255, 255, 255, 255 ) setElementAlpha(marker, 0) local Cplayer = getLocalPlayer() bindKey ("K","down",function () if isElementWithinMarker(Cplayer,marker) then triggerServerEvent( 'Money', Cplayer ) end end) لما يضعط حرف K ويستلم الفلوس يجيلو لوحة انا هسويها وش استخدم؟ addEvent( 'Money', true ) addEventHandler( 'Money', root, function() if doesPedHaveJetPack( source ) then removePedJetPack( source ) end givePlayerMoney( source, 1000 ) end ) Link to comment
nxFairlywell Posted May 12, 2016 Share Posted May 12, 2016 local marker = createMarker ( 2490.96240, -1684.29456, 13.50838, 'cylinder', 1, 255, 255, 255, 255 ) bindKey ("K","down",function () if isElementWithinMarker(Cplayer,marker) then if not getElementData(Cplayer, "example-data") then triggerServerEvent( 'Money', Cplayer ) setElementData( Cplayer, "example-data", true ) setTimer(setElementData, 60000, 1, Cplayer, "example-data", false) else outputChatBox("يجب عليك الإنتظار") end end end) Link to comment
iMr.SFA7 Posted May 12, 2016 Share Posted May 12, 2016 CPY الداتا تستخدم الـ فالأفـضل اذا كان التحقق من الداتا والداتا بنفس الملف تستخدم المتغـيرات! local marker = createMarker ( 2490.96240, -1684.29456, 13.50838, 'cylinder', 1, 255, 255, 255, 255 ) isMoney = false bindKey ('K','down', function() if isElementWithinMarker(localPlayer,marker) then if not isMoney then triggerServerEvent( 'Money', localPlayer) setHaveMoney(true) setTimer(setHaveMoney, 60000, 1, false) else outputChatBox("يجب عليك الإنتظار") end end end) function setHaveMoney(state) if state == true or state == false then isMoney = state end end !وعندي سؤال: ليه الكود كلنت وسيرفر دامك تقدر تحطه سيرفر فقط Link to comment
Mr.CoR Posted May 12, 2016 Share Posted May 12, 2016 !وعندي سؤال: ليه الكود كلنت وسيرفر دامك تقدر تحطه سيرفر فقط الكود مطروح بموضوع ثاني والي مسوي الكود هو مستر جراند وهذا ناسخه Link to comment
Adham Posted May 12, 2016 Author Share Posted May 12, 2016 !وعندي سؤال: ليه الكود كلنت وسيرفر دامك تقدر تحطه سيرفر فقط الكود مطروح بموضوع ثاني والي مسوي الكود هو مستر جراند وهذا ناسخه ادري اني ناسخه كنت ابيه اعمل شي عليه Link to comment
#DRAGON!FIRE Posted May 12, 2016 Share Posted May 12, 2016 CPY الداتا تستخدم الـ معليش ع المداخلة بس تصحيح : CPY -> CPU 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