αвυ-wαleed Posted January 23, 2014 Share Posted January 23, 2014 ابغى ماركين تقوم بالوظيفة مو ماركرواحد -- # Server Side # -- local marker = createMarker ( 2013.8099365234,1544.779296875,11.310423851013, "cylinder", 2, 255, 0, 0 ); addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, p in ipairs( getElementsByType ( "player" ) ) do bindKey ( p, "tab", "down", Animation ); end end ); addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, "tab", "down", Animation ); end ); function Animation ( plr ) if isElementWithinMarker ( plr, marker ) then setPedAnimation ( plr, "FOOD", "EAT_Burger", _, false, _, _, false); end end وابغى اختصر هذا ولا مايختصر createBlip ( 2098.3999 , 1452 , 10.5 , 56 ) createBlip ( 1649.09998 , 1977.09998 , 10.3 , 56 ) createBlip ( 2379 , 2722.69995 , 10.2 , 56 ) كذا شغال لكن ابغى اختصار بدل التكرار createBlip ؟؟ Link to comment
al-Kobra Posted January 23, 2014 Share Posted January 23, 2014 thePositions = { { x, y, z }, { x, y, z }, { x, y, z }, } for _, AllPositions in ipairs ( thePositions ) do createBlip ( AllPositions [1], AllPositions [2], AllPositions [3], ID ) end تقدر تستخدمه حتى للماركر Link to comment
#DRAGON!FIRE Posted January 23, 2014 Share Posted January 23, 2014 table for -- Loop createMarker createBlip 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