MR.President Posted March 11, 2017 Share Posted March 11, 2017 في امر تتحقق من ان السياره مصلحه او لا ؟ Link to comment
^iiEcoo'x_) Posted March 12, 2017 Share Posted March 12, 2017 15 hours ago, #Soking said: getElementHealth + math.ceil Link to comment
#BrosS Posted March 12, 2017 Share Posted March 12, 2017 23 minutes ago, #_iMr.[E]coo said: + math.ceil مافي داعي Link to comment
^iiEcoo'x_) Posted March 12, 2017 Share Posted March 12, 2017 1 hour ago, #BrosS said: مافي داعي اذا ما حطها الصحة تطلع :- 999.7273838373 1 Link to comment
AHMED MOSTAFA Posted March 12, 2017 Share Posted March 12, 2017 (edited) 18 hours ago, MR.President said: في امر تتحقق من ان السياره مصلحه او لا ؟ جرب ذا -- Client function myVehicleHealth () local isVehicle = getPedOccupiedVehicle ( localPlayer ) if isVehicle then local theVehicle = getElementHealth ( isVehicle ) outputChatBox ( "vehicle's health: "..theVehicle.."." ) if theVehicle == 1000 then outputChatBox ( "vehicle's health: very good." ) elseif theVehicle < 1000 and theVehicle >= 800 then outputChatBox ( "vehicle's health: good." ) elseif theVehicle < 800 and theVehicle >= 500 then outputChatBox ( "vehicle's health: معقولة ض1." ) elseif theVehicle < 500 and theVehicle >= 0 then outputChatBox ( "vehicle's health: bad vehicle." ) end else outputChatBox ( "You are not inside vehicle." ) end end addCommandHandler ( "myCarH", myVehicleHealth ) Edited March 12, 2017 by Killer Project 1 Link to comment
Master_MTA Posted March 12, 2017 Share Posted March 12, 2017 2 hours ago, Killer Project said: جرب ذا -- Client function myVehicleHealth () local isVehicle = getPedOccupiedVehicle ( localPlayer ) if isVehicle then local theVehicle = getElementHealth ( isVehicle ) outputChatBox ( "vehicle's health: "..theVehicle.."." ) if theVehicle == 1000 then outputChatBox ( "vehicle's health: very good." ) elseif theVehicle < 1000 and theVehicle >= 800 then outputChatBox ( "vehicle's health: good." ) elseif theVehicle < 800 and theVehicle >= 500 then outputChatBox ( "vehicle's health: معقولة ض1." ) elseif theVehicle < 500 and theVehicle >= 0 then outputChatBox ( "vehicle's health: bad vehicle." ) end else outputChatBox ( "You are not inside vehicle." ) end end addCommandHandler ( "myCarH", myVehicleHealth ) اعذرني لكن ذا ما يصلح يقلبي من قالك ان الرجال يبي يستخدمه بكلنت Link to comment
^iiEcoo'x_) Posted March 12, 2017 Share Posted March 12, 2017 2 minutes ago, Master_MTA said: اعذرني لكن ذا ما يصلح يقلبي من قالك ان الرجال يبي يستخدمه بكلنت وعنده اخطاء -____- elseif theVehicle < 500 and theVehicle >= 0 then Link to comment
#Soking Posted March 12, 2017 Share Posted March 12, 2017 9 minutes ago, #_iMr.[E]coo said: وعنده اخطاء -____- elseif theVehicle < 500 and theVehicle >= 0 then وين الخطء هنا 1 Link to comment
^iiEcoo'x_) Posted March 12, 2017 Share Posted March 12, 2017 متحقق انه السيارة صحتها 500 وبنفس الوقت صحتها اكبر او يسواي 0 Link to comment
AHMED MOSTAFA Posted March 12, 2017 Share Posted March 12, 2017 33 minutes ago, #_iMr.[E]coo said: متحقق انه السيارة صحتها 500 وبنفس الوقت صحتها اكبر او يسواي 0 من جدك ؟ مب شايف العلامة هاذي مثلاً < لا اله الا الله Link to comment
#Soking Posted March 12, 2017 Share Posted March 12, 2017 39 minutes ago, #_iMr.[E]coo said: متحقق انه السيارة صحتها 500 وبنفس الوقت صحتها اكبر او يسواي 0 هو متحقق انها اقل من ٥٠٠ بس اكبر من صفر 1 Link to comment
Master_MTA Posted March 12, 2017 Share Posted March 12, 2017 الزبده ليه التعب ذا كله التحقق بيكون كذا local veh=math.floor(getElementHealth(getPedOccupiedVehicle ( player ))) if veh~=1000 then return end player بدله باللاعب اللي تبي بالنسبه للاخ ايكو math.ceil تحذف الارقام اللي بعد الفاصله math.floor تقرب Link to comment
AHMED MOSTAFA Posted March 12, 2017 Share Posted March 12, 2017 1 minute ago, Master_MTA said: الزبده ليه التعب ذا كله التحقق بيكون كذا local veh=math.floor(getElementHealth(getPedOccupiedVehicle ( player ))) if veh~=1000 then return end player بدله باللاعب اللي تبي وش يعرفني انا انه يبيه سيرفر ؟ هو ما حدد واذا حدد ترا عادي اسويها بترايجر Link to comment
Master_MTA Posted March 12, 2017 Share Posted March 12, 2017 7 minutes ago, Killer Project said: وش يعرفني انا انه يبيه سيرفر ؟ هو ما حدد واذا حدد ترا عادي اسويها بترايجر الله يهديك وش تقول انت وش دخل التراجر بالموضوع؟ getElementHealth يصلح بالجهتين الله يهديك @_@ راجع كودي وبتفهم تقدر تستخدمه كلنت وسيرفر Link to comment
AHMED MOSTAFA Posted March 12, 2017 Share Posted March 12, 2017 (edited) 7 minutes ago, Master_MTA said: الله يهديك وش تقول انت وش دخل التراجر بالموضوع؟ getElementHealth يصلح بالجهتين الله يهديك @_@ راجع كودي وبتفهم تقدر تستخدمه كلنت وسيرفر يخي انا اقصد اني ما اعرف اذا يبيه سيرفر او كلينت وبما انك تقول وش دخل الترايجر اذا تبيه سيرفر او كلينت اياً كان -- Client function myVehicleHealth () local isVehicle = getPedOccupiedVehicle ( localPlayer ) if isVehicle then local theVehicle = getElementHealth ( isVehicle ) outputChatBox ( "vehicle's health: "..theVehicle.."." ) if theVehicle == 1000 then outputChatBox ( "vehicle's health: very good." ) triggerServerEvent("send1", localPlayer ) elseif theVehicle < 1000 and theVehicle >= 800 then outputChatBox ( "vehicle's health: good." ) triggerServerEvent("send2", localPlayer ) elseif theVehicle < 800 and theVehicle >= 500 then outputChatBox ( "vehicle's health: معقولة ض1." ) triggerServerEvent("send3", localPlayer ) elseif theVehicle < 500 and theVehicle >= 0 then outputChatBox ( "vehicle's health: bad vehicle." ) triggerServerEvent("send4", localPlayer ) end else outputChatBox ( "You are not inside vehicle." ) end end addCommandHandler ( "myCarH", myVehicleHealth ) -- Server addEvent("send1", true) addEventHandler("send1", root, function( ) exports["guimessages"]:outputServer(client, "message", 255, 255, 0) -- eny code end ) addEvent("send2", true) addEventHandler("send2", root, function( ) exports["guimessages"]:outputServer(client, "message", 255, 255, 0) -- eny code end ) addEvent("send3", true) addEventHandler("send3", root, function( ) exports["guimessages"]:outputServer(client, "message", 255, 255, 0) -- eny code end ) addEvent("send4", true) addEventHandler("send4", root, function( ) exports["guimessages"]:outputServer(client, "message", 255, 255, 0) -- eny code end ) تراني احب اطول الاكواد هذا السبب للسؤال اللي رح تطرحه Edited March 12, 2017 by Killer Project Link to comment
Master_MTA Posted March 12, 2017 Share Posted March 12, 2017 Just now, Killer Project said: يخي انا اقصد اني ما اعرف اذا يبيه سيرفر او كلينت وبما انك تقول وش دخل الترايجر اذا تبيه سيرفر او كلينت اياً كان -- Client function myVehicleHealth () local isVehicle = getPedOccupiedVehicle ( localPlayer ) if isVehicle then local theVehicle = getElementHealth ( isVehicle ) outputChatBox ( "vehicle's health: "..theVehicle.."." ) if theVehicle == 1000 then outputChatBox ( "vehicle's health: very good." ) triggerServerEvent("send1", localPlayer ) elseif theVehicle < 1000 and theVehicle >= 800 then outputChatBox ( "vehicle's health: good." ) triggerServerEvent("send2", localPlayer ) elseif theVehicle < 800 and theVehicle >= 500 then outputChatBox ( "vehicle's health: معقولة ض1." ) triggerServerEvent("send3", localPlayer ) elseif theVehicle < 500 and theVehicle >= 0 then outputChatBox ( "vehicle's health: bad vehicle." ) triggerServerEvent("send4", localPlayer ) end else outputChatBox ( "You are not inside vehicle." ) end end addCommandHandler ( "myCarH", myVehicleHealth ) -- Server addEvent("send1", true) addEventHandler("send1", root, function( ) exports["guimessages"]:outputServer(client, "message", 255, 255, 0) -- eny code end ) addEvent("send2", true) addEventHandler("send2", root, function( ) exports["guimessages"]:outputServer(client, "message", 255, 255, 0) -- eny code end ) addEvent("send3", true) addEventHandler("send3", root, function( ) exports["guimessages"]:outputServer(client, "message", 255, 255, 0) -- eny code end ) addEvent("send4", true) addEventHandler("send4", root, function( ) exports["guimessages"]:outputServer(client, "message", 255, 255, 0) -- eny code end ) تراني احب اطول الاكواد هذا السبب للسؤال اللي رح تطرحه شف اخوي اعذرني 30 سطر ذا يسوي تحميل على اللاعب اول شي فما انصحك بتطويل الاكواد + ليه 3 ايفينتات بالسيرفر الله يهديك التراقر مال امه داعي هنا ابد ابد بما ان getElementHealth shared function ليه ليه بس جلطتني الله يهديك والتراقر كله تخبيص ترا Link to comment
AHMED MOSTAFA Posted March 12, 2017 Share Posted March 12, 2017 15 minutes ago, Master_MTA said: شف اخوي اعذرني 30 سطر ذا يسوي تحميل على اللاعب اول شي فما انصحك بتطويل الاكواد + ليه 3 ايفينتات بالسيرفر الله يهديك التراقر مال امه داعي هنا ابد ابد بما ان getElementHealth shared function ليه ليه بس جلطتني الله يهديك والتراقر كله تخبيص ترا بما انه تخبيص جربه وشوف بنفسك .. واتأكد اني ما جربت ولا كود من اللي ساعدت بهم الباقيين من زمااااااااااااااان لأنو بكل بساطة ما اشغل اللعبة وخصوصاً ان كل ال30 سطر هدول رد فقط على 28 minutes ago, Master_MTA said: الله يهديك وش تقول انت وش دخل التراجر بالموضوع؟ Link to comment
N3xT Posted March 12, 2017 Share Posted March 12, 2017 35 minutes ago, Killer Project said: يخي انا اقصد اني ما اعرف اذا يبيه سيرفر او كلينت وبما انك تقول وش دخل الترايجر اذا تبيه سيرفر او كلينت اياً كان -- Client function myVehicleHealth () local isVehicle = getPedOccupiedVehicle ( localPlayer ) if isVehicle then local theVehicle = getElementHealth ( isVehicle ) outputChatBox ( "vehicle's health: "..theVehicle.."." ) if theVehicle == 1000 then outputChatBox ( "vehicle's health: very good." ) triggerServerEvent("send1", localPlayer ) elseif theVehicle < 1000 and theVehicle >= 800 then outputChatBox ( "vehicle's health: good." ) triggerServerEvent("send2", localPlayer ) elseif theVehicle < 800 and theVehicle >= 500 then outputChatBox ( "vehicle's health: معقولة ض1." ) triggerServerEvent("send3", localPlayer ) elseif theVehicle < 500 and theVehicle >= 0 then outputChatBox ( "vehicle's health: bad vehicle." ) triggerServerEvent("send4", localPlayer ) end else outputChatBox ( "You are not inside vehicle." ) end end addCommandHandler ( "myCarH", myVehicleHealth ) -- Server addEvent("send1", true) addEventHandler("send1", root, function( ) exports["guimessages"]:outputServer(client, "message", 255, 255, 0) -- eny code end ) addEvent("send2", true) addEventHandler("send2", root, function( ) exports["guimessages"]:outputServer(client, "message", 255, 255, 0) -- eny code end ) addEvent("send3", true) addEventHandler("send3", root, function( ) exports["guimessages"]:outputServer(client, "message", 255, 255, 0) -- eny code end ) addEvent("send4", true) addEventHandler("send4", root, function( ) exports["guimessages"]:outputServer(client, "message", 255, 255, 0) -- eny code end ) تراني احب اطول الاكواد هذا السبب للسؤال اللي رح تطرحه لا تطولها وهي قصيرة addCommandHandler ( "myCarH", function () local isVehicle = getPedOccupiedVehicle ( localPlayer ) if isVehicle then local theVehicle = math.floor(getElementHealth ( isVehicle )) outputChatBox ( "vehicle's health: "..theVehicle.."." ) if theVehicle == 100 then outputChatBox ( "vehicle's health: very good." ) triggerServerEvent("newMessage", localPlayer, localPlayer, "myMessage." ) elseif theVehicle < 100 and theVehicle >= 80 then outputChatBox ( "vehicle's health: good." ) triggerServerEvent("newMessage", localPlayer, localPlayer, "myMessage." ) elseif theVehicle < 80 and theVehicle >= 50 then outputChatBox ( "vehicle's health: معقولة ض1." ) triggerServerEvent("newMessage", localPlayer, localPlayer, "myMessage." ) elseif theVehicle < 50 and theVehicle >= 0 then outputChatBox ( "vehicle's health: bad vehicle." ) triggerServerEvent("newMessage", localPlayer, localPlayer, "myMessage." ) end else outputChatBox ( "You are not inside vehicle." ) end end ) -- Server addEvent("newMessage", true) addEventHandler("newMessage", root, function ( player , stringValue ) if ( player ) and ( getElementType(player) == "player" ) then if ( stringValue and stringValue ~= "" ) then exports["guimessages"]:outputServer(player, stringValue, 255, 255, 0) end end end ) Link to comment
AHMED MOSTAFA Posted March 12, 2017 Share Posted March 12, 2017 1 minute ago, N3xT said: لا تطولها وهي قصيرة addCommandHandler ( "myCarH", function () local isVehicle = getPedOccupiedVehicle ( localPlayer ) if isVehicle then local theVehicle = math.floor(getElementHealth ( isVehicle )) outputChatBox ( "vehicle's health: "..theVehicle.."." ) if theVehicle == 100 then outputChatBox ( "vehicle's health: very good." ) triggerServerEvent("newMessage", localPlayer, localPlayer, "myMessage." ) elseif theVehicle < 100 and theVehicle >= 80 then outputChatBox ( "vehicle's health: good." ) triggerServerEvent("newMessage", localPlayer, localPlayer, "myMessage." ) elseif theVehicle < 80 and theVehicle >= 50 then outputChatBox ( "vehicle's health: معقولة ض1." ) triggerServerEvent("newMessage", localPlayer, localPlayer, "myMessage." ) elseif theVehicle < 50 and theVehicle >= 0 then outputChatBox ( "vehicle's health: bad vehicle." ) triggerServerEvent("newMessage", localPlayer, localPlayer, "myMessage." ) end else outputChatBox ( "You are not inside vehicle." ) end end ) -- Server addEvent("newMessage", true) addEventHandler("newMessage", root, function ( player , stringValue ) if ( player ) and ( getElementType(player) == "player" ) then if ( stringValue and stringValue ~= "" ) then exports["guimessages"]:outputServer(player, stringValue, 255, 255, 0) end end end ) ما يخالف المهم ما يكون فيه اخطاء Link to comment
Master_MTA Posted March 12, 2017 Share Posted March 12, 2017 25 minutes ago, Killer Project said: بما انه تخبيص جربه وشوف بنفسك .. واتأكد اني ما جربت ولا كود من اللي ساعدت بهم الباقيين من زمااااااااااااااان لأنو بكل بساطة ما اشغل اللعبة وخصوصاً ان كل ال30 سطر هدول رد فقط على الله الله ماشاء الله تبارك الله مبدع يعيال كلر مافي منه 2 اف يسوي وما يشوف اللعبه افففففف فنان يبوي يرحم امك غنتوني تعالي نصور مستعد للحظر لكن ذا غبني صراحه كيف الرجال بيعرف رقم الصحه حقة السياره اتوقع بسطت الامر كله في سطرين انا هو قال يبي يتاكد متصلحه او لا يجيك واحد يتفلسف يحطلك 30 سطر ياخي غبنه اف اعوذ بالله نصور حظر لا هنت @!#NssoR_) Link to comment
AHMED MOSTAFA Posted March 12, 2017 Share Posted March 12, 2017 كودك صح ولا ما صح ما يهمني انا اعطيته فكرة مب على اساس متصلحة ولا غيره انا اعطيه حالة السيارة بالنسبة لصحتها على العموم انهي الموضوع وكمان انا احب اتفلسف وحياك الله @Master_MTA@!#NssoR_) شوف صاحب الموضوع اذا يبي شي من هذا الموضوع او اغلقه يا نسور 1 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