Snakegold Posted July 28, 2018 Posted July 28, 2018 في عندي لوحة تشتري منها طائرات و بدي اللاعب ما يقدر ينزل طيارة من اللوحة أذا هو في طائرة هذا جزء من المود addEvent ("carBuy", true) addEventHandler( "isPedInVehicle", getRootElement(), addEventHandler ("carBuy", getRootElement(), function(id2, cost2, name2,x, y, z, sRz) if (getPlayerMoney (source) >= tonumber(cost2)) then outputChatBox ("#006400You Bought A : #FFFFFF" .. name2, source, 255, 255, 255, true) outputChatBox ("#006400ID: #FFFFFF" .. id2, source, 255, 255, 255, true) outputChatBox ("#006400Costs: #FFFFFF" .. cost2, source, 255, 0, 0, true) takePlayerMoney (source, tonumber (cost2)) local x,y,z = getElementPosition (source) local vehicle = createVehicle (id2, x, y, z, 0, 0, sRz ) warpPedIntoVehicle(source, vehicle) else outputChatBox ("#006400You Don't Have Enough #FFFFFFMoney", source, 255, 255, 255, true) if isPedInVehicle (source) then cancelEvent() outputChatBox ("#ff0000Leave your vehicle to spawn another vehicle", source, 255, 255, 255, true) end end end)) ممكن تصليح للمود؟
Ra7-TnGLD Posted July 28, 2018 Posted July 28, 2018 ودك إياه ما ينزل غير طيارة وحده , ولا إذا كان بطيارة ما يقدر يشتري وحدة ثانية , ولازم ينزل عشان يشتري ؟
Snakegold Posted July 28, 2018 Author Posted July 28, 2018 (edited) نعم لو هو بطيارة ما يقدر يشتري لازم ينزل Edited July 28, 2018 by Snakegold
!#NssoR_) Posted July 28, 2018 Posted July 28, 2018 addEvent("carBuy", true) addEventHandler("carBuy", getRootElement(), function (id2, cost2, name2,x, y, z, sRz) if ( getPlayerMoney(source) >= tonumber(cost2) ) then if ( getPedOccupiedVehicle(source) ) then outputChatBox ("#ff0000Leave your vehicle to spawn another vehicle", source, 255, 255, 255, true) return end outputChatBox ("#006400You Bought A : #FFFFFF" .. name2, source, 255, 255, 255, true) outputChatBox ("#006400ID: #FFFFFF" .. id2, source, 255, 255, 255, true) outputChatBox ("#006400Costs: #FFFFFF" .. cost2, source, 255, 0, 0, true) takePlayerMoney (source, tonumber (cost2)) local x,y,z = getElementPosition (source) local vehicle = createVehicle (id2, x, y, z, 0, 0, sRz ) warpPedIntoVehicle(source, vehicle) else outputChatBox ("#006400You Don't Have Enough #FFFFFFMoney", source, 255, 255, 255, true) end end) 1
Snakegold Posted July 28, 2018 Author Posted July 28, 2018 (edited) شكرا شغال بس ايش شيء الغلط لي كتبته انا؟ و ايش قصد كلمة return Edited July 28, 2018 by Snakegold
#Major . Posted July 28, 2018 Posted July 28, 2018 15 minutes ago, !#NssoR_) said: addEvent("carBuy", true) addEventHandler("carBuy", getRootElement(), function (id2, cost2, name2,x, y, z, sRz) if ( getPlayerMoney(source) >= tonumber(cost2) ) then if ( getPedOccupiedVehicle(source) ) then outputChatBox ("#ff0000Leave your vehicle to spawn another vehicle", source, 255, 255, 255, true) return end outputChatBox ("#006400You Bought A : #FFFFFF" .. name2, source, 255, 255, 255, true) outputChatBox ("#006400ID: #FFFFFF" .. id2, source, 255, 255, 255, true) outputChatBox ("#006400Costs: #FFFFFF" .. cost2, source, 255, 0, 0, true) takePlayerMoney (source, tonumber (cost2)) local x,y,z = getElementPosition (source) local vehicle = createVehicle (id2, x, y, z, 0, 0, sRz ) warpPedIntoVehicle(source, vehicle) else outputChatBox ("#006400You Don't Have Enough #FFFFFFMoney", source, 255, 255, 255, true) end end) من زمان م شفناك تعلق منورر الحتةةء ي سطى 1
Master_MTA Posted July 28, 2018 Posted July 28, 2018 29 minutes ago, !#NssoR_) said: عاش من شافك تساعد حسبتك اختفيت +_+ 27 minutes ago, Snakegold said: return ابحث بقسم الشروحات اتوقع اني شرحتها بالتفصيل 1
#Sn[i]pêŘ Posted July 28, 2018 Posted July 28, 2018 1 hour ago, Snakegold said: شكرا شغال بس ايش شيء الغلط لي كتبته انا؟ و ايش قصد كلمة return return = ترجعلك القيمة
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