ayman1998 Posted April 20, 2014 Share Posted April 20, 2014 ما يشتغل انا بدي اذا كان جوا المي يموت و اذا كان معاة سيارة تسنحب و يموت setTimer ( function () if isElementInWater( localPlayer ) then setElementHealth(localPlayer,0) destroyElement ( getPedOccupiedVehicle( localPlayer) ) end end end, 1000, 0 ) Link to comment
ALw7sH Posted April 20, 2014 Share Posted April 20, 2014 setTimer ( function () if isElementInWater( localPlayer ) then setElementHealth(localPlayer,0) destroyElement ( getPedOccupiedVehicle( localPlayer) ) end end, 1000, 0 ) Link to comment
ayman1998 Posted April 20, 2014 Author Share Posted April 20, 2014 يب اشتغل بس لما اكون في سيارة ما بسحبها ولا بموت Link to comment
ALw7sH Posted April 20, 2014 Share Posted April 20, 2014 setTimer ( function () if isElementInWater( localPlayer ) then setElementHealth(localPlayer,0) if isElementInWater( localPlayer ) and getPedOccupiedVehicle(source) then destroyElement ( getPedOccupiedVehicle(source) ) end end end, 1000, 0 ) Link to comment
!#NssoR_) Posted April 20, 2014 Share Posted April 20, 2014 ججرب # setTimer ( function () if isElementInWater( localPlayer ) then setElementHealth(localPlayer,0) local myCar = getPedOccupiedVehicle(localPlayer) if ( myCar ) then destroyElement ( myCar ) end end end, 1000, 0 ) 1 Link to comment
!#NssoR_) Posted April 20, 2014 Share Posted April 20, 2014 ججربت كودي ؟؟ + انت حاط الكود كلنت ولا سيرفر ؟ 1 Link to comment
ayman1998 Posted April 20, 2014 Author Share Posted April 20, 2014 حاطة كلنت و جرتة كودك التنين لما ادخل من دون سيارة يقتلني بس مع سيارة ولا يسوي اشي Link to comment
!#NssoR_) Posted April 20, 2014 Share Posted April 20, 2014 شوف سويتلك كذا بـ الطريقة هاذي -# Client setTimer ( function () triggerServerEvent('des',localPlayer) end, 800, 0 ) -#Server addEvent('des',true) addEventHandler('des',root, function () for _, theCar in pairs ( getElementsByType 'vehicle' ) do if isElement(theCar) and isElementInWater(theCar) then destroyElement(theCar) end end if isElementInWater(source) then killPed(source) end end) Brb. 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