karzkani Posted May 6, 2013 Share Posted May 6, 2013 سلام عليكم شباب سويت كود بس مدري صح لو خطأ وامبيكم تعدلون فيه شوية اشياء امبي الكود يسحب فلوس ادا دعمت بسيارة لكن مو كل السيارات بس السيارة الي انت مشترنها من عندي function displayVehicleLoss(loss) local thePlayer = getVehicleOccupant(source) if(thePlayer) then if (getPlayerMoney (source) >= 5000) then takePlayerMoney(source, 5000) end end addEventHandler("onVehicleDamage", getRootElement(), displayVehicleLoss) Link to comment
iPrestege Posted May 6, 2013 Share Posted May 6, 2013 setElementData if getElementData .. Link to comment
فاّرس Posted May 6, 2013 Share Posted May 6, 2013 الحين تبي السيارة ولا اللاعب؟ انت تقدر تدعم بالسيارة وحاط تدمج السيارة؟ استخدم , onPlayerWasted Link to comment
karzkani Posted May 6, 2013 Author Share Posted May 6, 2013 لا قصدي ادا دعم الاعب بالسيارة الي هو مشتريها مو اي سيارة تنسحب من عنده فلوس Link to comment
iPrestege Posted May 6, 2013 Share Posted May 6, 2013 شوف وظائفي وسوي الداتا للسيارهـ <> Link to comment
فاّرس Posted May 6, 2013 Share Posted May 6, 2013 حدد متغير السيارة, Vehicle = {} function() Vehicle[source] = createVehicle(...) if Vehicle[source] then + onPlayerWasted او سوي مثل ما قالك برستيج, Link to comment
karzkani Posted May 6, 2013 Author Share Posted May 6, 2013 كدا if ( getElementData(source,"Car") == true ) then Link to comment
iPrestege Posted May 6, 2013 Share Posted May 6, 2013 addEventHandler("onVehicleDamage", getRootElement(), function ( ) if source ~= MyVehicle then return end if not getElementData(source,"Car") == true then return end local thePlayer = getVehicleOccupant(source) if(thePlayer) then if (getPlayerMoney (thePlayer) >= 5000) then takePlayerMoney(thePlayer, 5000) end end ) Link to comment
iPrestege Posted May 6, 2013 Share Posted May 6, 2013 addEventHandler("onVehicleDamage", getRootElement(), function ( ) if source ~= MyVehicle then return end if not getElementData(source,"Car") == true then return end local thePlayer = getVehicleOccupant(source) if(thePlayer) then if (getPlayerMoney (thePlayer) >= 5000) then takePlayerMoney(thePlayer, 5000) end 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