Hamza Elsayed Posted June 17, 2015 Share Posted June 17, 2015 السلام عليكم أعمل في سكربت سباون سويت الـ SetCameraMatrix وتغيير الشخصية عند اختيار الاعب شخصية للسباون لكن عندما يضغط الاعب علي السهم الأيسر وهوا عند الشخصية الأولي لا يحدث شئ أريده عندما يضغط سهم أيسر وهوا محدد للشخصية الاولي يجيبه عـ الشخصية الأخيره أتمني تكونو فهمتوني وهذا الكود الخاص بأستعراض الشخصيات للسباون local table = {105,106,107,114,109,110,108,115,116,117,163,164,165,166,265,266,267,280,281,282,283,284,285,286,287,288,312,102,103,104,0,1,2,7,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,32,33,34,35,37,43,44,45,46,47,48,50,51,52,57,59,60,83,84,96,97,274,275,276} ped = createPed(105,428.39999389648, -56.700000762939, 1013.799987793,270) acs = getElementModel ( ped ) local var = 0 bindKey ("arrow_r","down",function() var = var + 1 setElementModel(ped, table[var]) end) bindKey ("arrow_l","down",function() var = var - 1 setElementModel(ped, table[var]) end) Link to comment
#Plair07 Posted June 17, 2015 Share Posted June 17, 2015 على حسب اللي اعرفه مع اني لسا م جربت انك تشيل var وتسوي جدول فيه ايديات الشخصيات وكل م ضغطت يمر عاللي بعدها , اظن باللوب جربها وشوف وإذا م نفع انتظر الشباب يفيدونك < متكاسل يجرب الكود Link to comment
H25 Posted June 17, 2015 Share Posted June 17, 2015 local table = {105,106,107,114,109,110,108,115,116,117,163,164,165,166,265,266,267,280,281,282,283,284,285,286,287,288,312,102,103,104,0,1,2,7,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,32,33,34,35,37,43,44,45,46,47,48,50,51,52,57,59,60,83,84,96,97,274,275,276} ped = createPed(105,428.39999389648, -56.700000762939, 1013.799987793,270) acs = getElementModel ( ped ) local var = 0 bindKey ("arrow_r","down",function() if var == #table then var = 0 else var = var + 1 end setElementModel(ped, table[var]) end) bindKey ("arrow_l","down",function() if var == 0 then var = #table else var = var - 1 end setElementModel(ped, table[var]) end) Link to comment
TAPL Posted June 17, 2015 Share Posted June 17, 2015 local table = {105,106,107,114,109,110,108,115,116,117,163,164,165,166,265,266,267,280,281,282,283,284,285,286,287,288,312,102,103,104,0,1,2,7,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,32,33,34,35,37,43,44,45,46,47,48,50,51,52,57,59,60,83,84,96,97,274,275,276} ped = createPed(105, 428.4, -56.7, 1013.8, 270) acs = getElementModel(ped) local var = 0 bindKey("arrow_r", "down", function() var = var + 1 if var > #table then var = 1 end setElementModel(ped, table[var]) end) bindKey("arrow_l", "down", function() var = var - 1 if var < 1 then var = #table end setElementModel(ped, table[var]) end) و يفضل تغير اسم الجدول عشان ما يتعارض مع فنكشات مثل table.insert table.remove table.sort Link to comment
Hamza Elsayed Posted June 17, 2015 Author Share Posted June 17, 2015 شكراً لردودكم وجاري التجربة Link to comment
Hamza Elsayed Posted June 17, 2015 Author Share Posted June 17, 2015 local table = {105,106,107,114,109,110,108,115,116,117,163,164,165,166,265,266,267,280,281,282,283,284,285,286,287,288,312,102,103,104,0,1,2,7,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,32,33,34,35,37,43,44,45,46,47,48,50,51,52,57,59,60,83,84,96,97,274,275,276} ped = createPed(105, 428.4, -56.7, 1013.8, 270) acs = getElementModel(ped) local var = 0 bindKey("arrow_r", "down", function() var = var + 1 if var > #table then var = 1 end setElementModel(ped, table[var]) end) bindKey("arrow_l", "down", function() var = var - 1 if var < 1 then var = #table end setElementModel(ped, table[var]) end) و يفضل تغير اسم الجدول عشان ما يتعارض مع فنكشات مثل table.insert table.remove table.sort مشكوووووووووووووور 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