mohameeda Posted October 16, 2016 Share Posted October 16, 2016 السلام عليكم ورحمة الله وبركاته للجميع,, اريد ان تصنعولي كود في جيم مود الريس وهو ماركر اذا لمسته يعطيني اقدر اضرب صاروخ في الديربي (فقط صاروخ واحد)ء مثال:: انا في سيرفر ديربي ,اذا لمست ماركر يعطيني صاروخ في السيارة ,, وشكرا لتعاونكم معي Link to comment
#BrosS Posted October 16, 2016 Share Posted October 16, 2016 createMarker -- انشاء ماركر onMarkerHit createProjectile -- انشاء صاروخ attachElements -- Vehicle https://wiki.multitheftauto.com/wiki/CreateProjectile اسف الأكواد ملخبطة فاتح جوال Link to comment
' A F . Posted October 17, 2016 Share Posted October 17, 2016 createMarker onClientMarkerHit getElementType getPedOccupiedVehicle setElementData bindKey getElementData createProjectile setElementData Link to comment
Abdul KariM Posted October 17, 2016 Share Posted October 17, 2016 ^ لو يستخدم المتغيرات افضله من الالمنت داتا Link to comment
mohameeda Posted October 17, 2016 Author Share Posted October 17, 2016 (edited) server marker createMarker ( 955,45,654 [, string theType = "corona", float size = 4.0, int r = 0, int g = 0, int b = 255, int a = 255, visibleTo = getRootElement( ) ] ) function MarkerHit ( hitPlayer, matchingDimension ) outputChatBox ( getPlayerName(hitPlayer) .. " entered a marker" ) end addEventHandler ( "onClientMarkerHit", getRootElement(), MarkerHit ) function onPlayerTarget ( targetElem ) -- if the targeted object is a haystack (an object with model ID 3374) remove it from the game if getElementType ( targetElem ) == "object" and getElementModel ( targetElem ) == 3374 then destroyElement ( targetElem ) end end addEventHandler ( "onPlayerTarget", root, onPlayerTarget ) -- add above function as handler for targeting event function showVehicleName ( thePlayer ) local theVehicle = getPedOccupiedVehicle ( thePlayer ) if theVehicle then outputChatBox ( "Name of the Vehicle: " .. getVehicleName ( theVehicle ), thePlayer ) else outputChatBox ( "You do not have a Vehicle!", thePlayer, 255, 0, 0, true ) end end addCommandHandler ( "getcarname", showVehicleName ) bool setElementData ( element theElement, string key, var value [, bool synchronize = true ] ) bool bindKey ( player thePlayer, string key, string keyState, function handlerFunction, [ var arguments, ... ] ) -- وين اكتب ال bind key الي اريده . var getElementData ( element theElement, string key [, inherit = true] ) function shootProjectile() local vehicle = getPedOccupiedVehicle(localPlayer) -- Only create projectile if we are inside a vehicle if(vehicle)then local x, y, z = getElementPosition(vehicle) createProjectile(vehicle, 19, x, y, z) end end bindKey("vehicle_fire", "down", shootProjectile) bool setElementData ( element theElement, string key, var value [, bool synchronize = true ] ) لو سمحتم صلحو . end حطو له وكملو الاخطاء وكذا يا احبائي انا جربت اكواد الي طرحهن default. ورح اجرب اكواد #Bross هلأ صلحولي هذا فضلا وليس امراً Edited October 17, 2016 by mohameeda Link to comment
mohameeda Posted October 17, 2016 Author Share Posted October 17, 2016 14 minutes ago, Abdul KariM said: تستهبل صح ؟ لا,انا مبتدأ في البرمجه فأرجو تساعدني ولا تهيني Link to comment
Abdul KariM Posted October 17, 2016 Share Posted October 17, 2016 يعني ناسخ لي امثلة الويكي وتقولي مبتدأ بالبرمجة اعرف المبتدأ يحاول ويعطينا اكواده نصححها له مايعطينا امثلة الويكي عشان ياخذ جاهز ويمشي 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