Snakegold Posted July 28, 2018 Posted July 28, 2018 (edited) السلام عليكم بدي اسوي مود لما أصدم شخص بسيارة يموت فورا اي 1 Hit = - 200 Dmg ممكن تقول لي اي فنكشن و ايفنت يجب الإستعمال؟ Edited July 28, 2018 by Snakegold
Snakegold Posted July 28, 2018 Author Posted July 28, 2018 هذا كود ال onVehicleDamage function displayVehicleLoss(loss) local thePlayer = getVehicleOccupant(source) if(thePlayer) then -- Check there is a player in the vehicle outputChatBox("Your vehicle just lost " .. tonumber(loss) .. " health.", thePlayer) -- Display the message end end addEventHandler("onVehicleDamage", root, displayVehicleLoss) ما إتوقع انو في شي يغير قيمة داماج السيارات ؟
#Sn[i]pêŘ Posted July 28, 2018 Posted July 28, 2018 3 minutes ago, Snakegold said: هذا كود ال onVehicleDamage function displayVehicleLoss(loss) local thePlayer = getVehicleOccupant(source) if(thePlayer) then -- Check there is a player in the vehicle outputChatBox("Your vehicle just lost " .. tonumber(loss) .. " health.", thePlayer) -- Display the message end end addEventHandler("onVehicleDamage", root, displayVehicleLoss) ما إتوقع انو في شي يغير قيمة داماج السيارات ؟ وين ؟ setElementHealth
Snakegold Posted July 28, 2018 Author Posted July 28, 2018 انا مازلت مبتدأ والله صعبة كثير ما فهمت شي 1
Snakegold Posted July 29, 2018 Author Posted July 29, 2018 (edited) هل فهمتم ما أقصده؟؟ Edited July 29, 2018 by Snakegold
Rockyz Posted July 29, 2018 Posted July 29, 2018 (edited) deleted Edited July 29, 2018 by #,+( _xiRoc[K]; > Nothing
Rockyz Posted July 29, 2018 Posted July 29, 2018 اعذرني كنت فاهم الموضوع غلط, جرب هذا الكود : addEventHandler('onClientVehicleCollision', root, function(player) if isElement(player) and (getElementType(player) == 'player' or getElementType(player) == 'ped') and getElementHealth(player) > 0 then killPed(player) end end)
#DRAGON!FIRE Posted July 29, 2018 Posted July 29, 2018 ممكن توضح اكثر ؟ مين اللي يموت اللي داخل السياره ولا اللي خارجها ؟ 1
Snakegold Posted July 29, 2018 Author Posted July 29, 2018 أنت تسوق فأي سيارة و عند صدمك لشخص سوف يخسر 10 بالمائة من صحته انا بدي أغير الدامج يعني لما اصدمه ينقص 200 بالمائة من صحته أي الشخص الخارج السيارة يموت إلي انا صدمته
Rockyz Posted July 29, 2018 Posted July 29, 2018 5 hours ago, Snakegold said: أنت تسوق فأي سيارة و عند صدمك لشخص سوف يخسر 10 بالمائة من صحته انا بدي أغير الدامج يعني لما اصدمه ينقص 200 بالمائة من صحته أي الشخص الخارج السيارة يموت إلي انا صدمته 15 hours ago, #,+( _xiRoc[K]; > said: اعذرني كنت فاهم الموضوع غلط, جرب هذا الكود : addEventHandler('onClientVehicleCollision', root, function(player) if isElement(player) and (getElementType(player) == 'player' or getElementType(player) == 'ped') and getElementHealth(player) > 0 then killPed(player) end end) 1
Snakegold Posted July 29, 2018 Author Posted July 29, 2018 مشككور هذا الفنكشن لي كنت ابحث عليه onClientVehicleCollision
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