فاّرس Posted May 17, 2013 Share Posted May 17, 2013 يعني تخليها مثل السباون الي بسيرفر العقرب تدور Link to comment
3ssol Posted May 17, 2013 Author Share Posted May 17, 2013 الي تدور احسها معقده شوي ولاكن هذا الي قدرت عليه addEventHandler ( "onClientRender", root, function (player) local xc,yc,zc = getElementRotation ( player ) local x, y, z = getElementPosition ( player ) car = createVehicle ( 432, x, y, z , xc ,yc ,zc ) local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) setVehicleColor( car, r, g, b ) end) Link to comment
iPrestege Posted May 17, 2013 Share Posted May 17, 2013 -- # Client Side local vehicle = createVehicle ( id,x,y,z ) addEventHandler("onClientRender",getRootElement(), function ( ) if isElement ( vehicle ) then local x,y,z = getElementRotation ( vehicle ) local r,g,b = math.random(255),math.random(255),math.random(255) setVehicleColor( vehicle,r,g,b ) setElementRotation( vehicle,x,y,z + 0.5 ) end end ) شغله وعب ارقمنت السيارة وشوف ( ( = ! Link to comment
3ssol Posted May 17, 2013 Author Share Posted May 17, 2013 كفووو هههههه طيب عطنا اختبار غيره لاهنت Link to comment
iPrestege Posted May 17, 2013 Share Posted May 17, 2013 ابيك تسوي لي كود اذا ما كان الاعب بـ تيم شرطة و سيارات محددهـ بـ استخدام : table getElementModel addEventHandler "onVehicleStartEnter" getPlayerTeam getTeamName cancelEvent() outputChatBox مايخلية يركبها ويقولة انها للشرطة بس ~ Link to comment
3ssol Posted May 17, 2013 Author Share Posted May 17, 2013 التيبل ماعرفله ولاكن اعتقد عندي طريقه ثاانيه عطني وقت اضبط الكود Link to comment
iPrestege Posted May 17, 2013 Share Posted May 17, 2013 اي عادي اهم شيء سوية خذ وقتك .. Link to comment
3ssol Posted May 17, 2013 Author Share Posted May 17, 2013 local vehicle = createVehicle ( 445,2128.83301, 1522.96802, 10.82031 ) function prstege ( thePlayer ) if ( getTeamName(getPlayerTeam(thePlayer)) == "Police" ) then outputChatBox ( "welcome", thePlayer ) else cancelEvent() outputChatBox ( "this car For group 3ssol", thePlayer ) end end addEventHandler ( "onVehicleStartEnter",vehicle, prstege ) تم وبحمد الله ولاكن انت قلتلي getElementModel هذا يتحقق من الشخصيه !! المهم شوف انا مابي اكذب انا الي اخذته من عندي جاهز if ( getTeamName(getPlayerTeam(thePlayer)) == "Police" ) then اما الباقي كله من صنعي تتسلم ي برستيج + اسف تعبتك مععي Link to comment
iPrestege Posted May 17, 2013 Share Posted May 17, 2013 اممم شيء حلو سويتة بس عندك خطأ بسيط المفروض يصير تحقق التيم كذآ : if ( getPlayerTeam ( thePlayer ) and getTeamName(getPlayerTeam(thePlayer)) == "Police" ) then السبب : نفرض واحد مامعه تيم؟ بيجي ايرور اكيد .. اممم تقولي getElementModel ? هذي بس للشخصيات نو وي !لا مستحيل ذذ هذي تجيب اي شيء متاح بالويكي اوبجكت سيارة لاعب الخ ذذ Link to comment
3ssol Posted May 17, 2013 Author Share Posted May 17, 2013 اهاا طيب ممكن اختبار اخير اخ لو عندي واحد زيك كل يوم يعلمني ويختبرني اووف Link to comment
3ssol Posted May 17, 2013 Author Share Posted May 17, 2013 سهل ذذ Preestege = createPed ( 0, x, y, z ) addPedClothes ( Preestege, "tshirtilovels", "tshirt", 0 ) طبعا الملابس جبتهم من الويكي عشان ماتقول كوبي بست خخخخخ + عارف يبيله onResourceStart ولاكن اختصرت الموضوع ^^ Link to comment
iPrestege Posted May 17, 2013 Share Posted May 17, 2013 حلو صح عليك .. بس مايحتاج ريسورس ستارت اصلا دامه تجارب عادي ذذ Link to comment
3ssol Posted May 17, 2013 Author Share Posted May 17, 2013 هههههههه برستيج فله لما تعطيني اختبار وانا اسوي وتشوف صح او خطا ممكن اختبار اخييير هههههههههههههههه والله اذا تعبتك خلاص مولازم Link to comment
iPrestege Posted May 17, 2013 Share Posted May 17, 2013 اممم ابيك تسوي لي كوماند يعطي لاعب نفاثة لو كتبة ولو كتبة ثانية يسحبة : addCommandHandler givePedJetPack doesPedHaveJetPack Link to comment
3ssol Posted May 17, 2013 Author Share Posted May 17, 2013 اوكي بسويها بس ليه ماستخدمنا removePedJetPack بدال doesPedHaveJetPack ليه ؟؟؟ او وش الفرق Link to comment
iPrestege Posted May 17, 2013 Share Posted May 17, 2013 اوهـ معليش نسيتها استخدمها معهم .. كلهم لازم ذذ Link to comment
3ssol Posted May 17, 2013 Author Share Posted May 17, 2013 شوف انا لقيت بل ويكي مثال ولاكن مابي اسوي نفس الويكي وسويت طريقه من عندي addCommandHandler ( "give", function (player) if not polo then givePedJetPack ( player ) outputChatBox ( "تم اعطائك نفاثة", player, 255, 255, 255, true ) else removePedJetPack ( player ) outputChatBox ( "تم سحب النفاثة", player, 255, 255, 255, true ) end end) Link to comment
iPrestege Posted May 17, 2013 Share Posted May 17, 2013 addCommandHandler("give", function ( player ) if doesPedHaveJetPack ( player ) then removePedJetPack ( player ) outputChatBox ( "تم سحب النفاثة", player, 255, 255, 255, true ) else givePedJetPack ( player ) outputChatBox ( "تم اعطائك نفاثة", player, 255, 255, 255, true ) end end ) حقك ماراح يصير ذذ Link to comment
3ssol Posted May 17, 2013 Author Share Posted May 17, 2013 ههههه ايه انا كنت اقدر اسوي زيك ولاكن خفت انك تقولي ناسخها من الويكي ^^ عشان كذا غيرت الطريقه Link to comment
iPrestege Posted May 17, 2013 Share Posted May 17, 2013 حقك يصير كذا : polo = false addCommandHandler ( "give", function (player) if not polo then givePedJetPack ( player ) outputChatBox ( "تم اعطائك نفاثة", player, 255, 255, 255, true ) polo = true else removePedJetPack ( player ) outputChatBox ( "تم سحب النفاثة", player, 255, 255, 255, true ) polo = false end end ) Link to comment
3ssol Posted May 17, 2013 Author Share Posted May 17, 2013 طيب لو عكسناهم polo = true addCommandHandler ( "give", function (player) if not polo then givePedJetPack ( player ) outputChatBox ( "تم اعطائك نفاثة", player, 255, 255, 255, true ) polo = false else removePedJetPack ( player ) outputChatBox ( "تم سحب النفاثة", player, 255, 255, 255, true ) polo = true end end ) ووش فوائد الـ true + false? Link to comment
iPrestege Posted May 17, 2013 Share Posted May 17, 2013 خلها بعقلك بـ حسب الفنكشن هذا اعطاء نفاثة بيكون اكيد مامعه اصلا بنسبة 99 % نفاثة بتكون فولس يوم نعطية تكون ترو يوم نسحبها ترو وحقك ماراح يشتغل .. لانك عاكس العملية Link to comment
iMr.Dawix~# Posted May 17, 2013 Share Posted May 17, 2013 طيب لو عكسناهم polo = true addCommandHandler ( "give", function (player) if not polo then givePedJetPack ( player ) outputChatBox ( "تم اعطائك نفاثة", player, 255, 255, 255, true ) polo = false else removePedJetPack ( player ) outputChatBox ( "تم سحب النفاثة", player, 255, 255, 255, true ) polo = true end end ) ووش فوائد الـ true + false? ترو وفالس هذي مثل الخدعه تحط للكلمه قيمة ترو وتخليه اذا كانت ترو يخليها فالس واذا كانت فالس يخليها ترو وتصير كذا كل شوي تصير العكس Link to comment
3NAD Posted May 18, 2013 Share Posted May 18, 2013 هي نفسها لو تسوي شرط خآرجي بـ الكلمات polo = "not jetpack" addCommandHandler ( "give", function (player) if polo == "not jetpack" then givePedJetPack ( player ) outputChatBox ( "تم اعطائك نفاثة", player, 255, 255, 255, true ) polo = "jetpack" else removePedJetPack ( player ) outputChatBox ( "تم سحب النفاثة", player, 255, 255, 255, true ) polo = "not jetpack" 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