αвυ-wαleed Posted February 3, 2014 Posted February 3, 2014 local marker = createMarker ( 2759.8745117188,-2015.3276367188,12.9000000, "cylinder", 0.75, 0, 252, 0 ); local bind = { } addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, p in ipairs( getElementsByType ( "player" ) ) do bindKey ( p, "h", "down", Animation ); end end ); addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, "h", "down", Animation ); end ); addEventHandler ( "onMarkerLeave", marker, function ( player ) if ( getElementType ( player ) == "player" ) then if not ( bind[ player ] ) then bind[ player ] = nil else bind[ player ] = nil end end end ) function Animation ( plr ) if isElementWithinMarker ( plr, marker ) then setElementFrozen ( plr, true ) setTimer (setElementFrozen, 5500, 1, plr, false) setPedAnimation ( plr, "FOOD", "EAT_Burger", _, false, _, _, false ); end bind[ plr ] = true end end ابغى ماركرين تفوم بنفس الوظيفة الحركة اكل البورقر
#DRAGON!FIRE Posted February 3, 2014 Posted February 3, 2014 الكود مخبص .. الموضوع اللي ناسخ منه الكود ناسخه غلط انت وفي اشياء ما لها داعي بالكود ذذ
αвυ-wαleed Posted February 3, 2014 Author Posted February 3, 2014 زاحف اتوقع الزيادات ماتأثر لاني شغلته واعطاني الشيء الي ابغاه المطلوووب الحين ابغى ماركرين ؟؟؟
Mr.T9 Posted February 3, 2014 Posted February 3, 2014 زاحف اتوقع الزيادات ماتأثر لاني شغلته واعطاني الشيء الي ابغاه المطلوووب الحين ابغى ماركرين ؟؟؟ سو جدول
TAPL Posted February 3, 2014 Posted February 3, 2014 local marker1 = createMarker(2759.88, -2015.33, 12.9, "cylinder", 0.75, 0, 252, 0) local marker2 = createMarker(x, y, z, "cylinder", 0.75, 0, 252, 0) -- عدل الأحداثيات addEventHandler("onResourceStart", resourceRoot, function() for _, p in ipairs(getElementsByType("player")) do bindKey(p, "h", "down", Animation) end end) addEventHandler("onPlayerJoin", root, function() bindKey(source, "h", "down", Animation) end) function Animation(player) if isElementWithinMarker(player, marker1) or isElementWithinMarker(player, marker2) then setElementFrozen(player, true) setTimer(setElementFrozen, 5500, 1, player, false) setPedAnimation(player, "FOOD", "EAT_Burger", _, false, _, _, false) end end
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