aL.Kfo Posted June 15, 2014 Share Posted June 15, 2014 هـأي ي حلوين ككيفككم زمان عن المواضيع و الخ تعرفون طفشنا وكذا ولا فهمنا شي المهم ما علينا شفت نفسي سهران قلت افرفر شويات ب المنتدى شوفت فنكشات لاضغطت زر تسوي حركه لزم تكون في الماركر المخصص ذذ ادري انة خطاء ولا جربته حتى لان مستحيل يعني يضبط وانا مني خبرةة خخ الكود الاول dutymarker = createMarker( y, x, z, 'cylinder', 2, 255, 0, 0, 150) bindKey ( source, "1", "down") isElementWithinMarker ( Player, dutymarker) setPedAnimation ( source, "BIKEV", "BIKEv_Fwd") and ) الكود الثاني dutymarker = createMarker( y, x, z, 'cylinder', 2, 255, 0, 0, 150) bindKey ( source,"1", "down",setPedAnimation ) isElementWithinMarker ( Player, dutymarker) setPedAnimation( source, "BIKEV", "BIKEv_Fwd") and ) كل الاكواد نفس الشي الي بس فرقت عنهم الكود الثاني حطيت وظيفه مع الزر باختصار الكود مايلزمني بشي مجرد زياده خبرة الاي ما يبي يساعد مو مهم Link to comment
aL.Kfo Posted June 15, 2014 Author Share Posted June 15, 2014 جـايب هـريسة مـزيـنة , كيف هريسه مزينـــه خلك محـترم يالبى ولو هريسه كلها اجل ذذ Link to comment
jafar Posted June 15, 2014 Share Posted June 15, 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 Link to comment
aL.Kfo Posted June 15, 2014 Author Share Posted June 15, 2014 هذا الكود مشابه لكودك. local marker = createMarker ( 2013.8099365234,1544.779296875,11.310423851013, "cylinder", 1, 255, 252, 255 ); 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 ( plr ) if isElementWithinMarker ( plr, marker ) then local PlayerMoney = getPlayerMoney ( plr ); if ( PlayerMoney >= 150 ) then takePlayerMoney ( plr, 150 ); setPedAnimation ( plr, "FOOD", "EAT_Burger", _, false, _, _, false ); setPedArmor ( plr, 100 ); outputChatBox ( "* لقد قمت بشراء الدرع !", plr, 0, 255, 0, true ); else outputChatBox ( "* لا يوجد لديك المال الكافي لشراء الدرع !", plr, 255, 0, 0, true ); 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