baba Posted February 9, 2015 Share Posted February 9, 2015 سلام عليكم شباب لو سمحتو رح اتعبكم معي ابي كود منطقه محميه من السلحه + سياره _________________ يعني اذا حد دخل وحاط في ايده سلاح يختفي ويطلع بدال السلاح ايدو واذا دخل واحد في المنطقه المحميه ومعاه سياره تختفي وارجو التوضيح ___________ بتوفيق انشاء الله Link to comment
#MFGR7OM Posted February 9, 2015 Share Posted February 9, 2015 شوفـها هنـا element +موجوده بالنت Link to comment
nxFairlywell Posted February 9, 2015 Share Posted February 9, 2015 EVENT : "onColShapeHit" getElementType takeWeapon vehicle = getPedOccupiedVehicle destroyElement(vehicle) Link to comment
Professional Posted February 10, 2015 Share Posted February 10, 2015 جرب createColSphere(x,y,z,1) ------------------------- حدد الحجم function onColShapeHit (player) if element and getElementType(element) == "player" then takeWeapon ( thePlayer, 0 ) ---------------------- هنا حطات فقط يستعمل البقس local vehicle = getPedOccupiedVehicle ( source ) destroyElement(vehicle) addEventHandler ( "onColShapeHit", turf[id].col, onColShapeHit ) Link to comment
nxFairlywell Posted February 10, 2015 Share Posted February 10, 2015 جرب createColSphere(x,y,z,1) ------------------------- حدد الحجم function onColShapeHit (player) if element and getElementType(element) == "player" then takeWeapon ( thePlayer, 0 ) ---------------------- هنا حطات فقط يستعمل البقس local vehicle = getPedOccupiedVehicle ( source ) destroyElement(vehicle) addEventHandler ( "onColShapeHit", turf[id].col, onColShapeHit ) Oops ^ *_* !! Link to comment
baba Posted February 10, 2015 Author Share Posted February 10, 2015 سيرفر createColSphere(-6399.22754,472.36685,6.91622,1) ------------------------- حدد الحجم function onColShapeHit (player) if element and getElementType(element) == "player" then takeWeapon ( thePlayer, 0 ) ---------------------- هنا حطات فقط يستعمل البقس local vehicle = getPedOccupiedVehicle ( source ) destroyElement(vehicle) addEventHandler ( "onColShapeHit", turf[id].col, onColShapeHit ) انا حاط الاحدثيات بس لما ادخل ما يسير شي السياره ماتختفي ولا سلاح Link to comment
The Killer Posted February 10, 2015 Share Posted February 10, 2015 الكود الي معطيك الاخ حسان ماهو حتى قريب من الصح عباره عن خرابيط متركبه استخدم الفنكشنات التاليه Event # 'onColShapeHit' function # createColCuboid getElementType setPedWeaponSlot destroyElement toggleControl Link to comment
baba Posted February 10, 2015 Author Share Posted February 10, 2015 -- create our hill area for our gamemode local hillArea = createColRectangle ( -2171.0678710938, 678.17950439453, 15, 15 ) -- add hill_Enter as a handler for when a player enters the hill area function hill_Enter ( thePlayer, matchingDimension ) if getElementType ( thePlayer ) == "player" then --if the element that entered was player --let's get the name of the player local nameOfThePlayer = getPlayerName ( thePlayer ) --announce to everyone that the player entered the hill outputChatBox ( nameOfThePlayer.." entered the zone!", getRootElement(), 255, 255, 109 ) end end addEventHandler ( "onColShapeHit", hillArea, hill_Enter ) -- add hill_Enter as a handler for when a player leaves the hill area function hill_Exit ( thePlayer, matchingDimension ) if getElementType ( thePlayer ) == "player" then --if the element that left was player --check if the player is not dead if isPlayerDead ( thePlayer ) ~= true then --let's get the name of the player local nameOfThePlayer = getPlayerName ( thePlayer ) --if he was alive, announce to everyone that the player has left the hill outputChatBox ( nameOfThePlayer.." left the zone!", getRootElement(), 255, 255, 109 ) end end end addEventHandler ( "onColShapeLeave", hillArea, hill_Exit ) ممكن توضحو لي؟ Link to comment
The Killer Posted February 10, 2015 Share Posted February 10, 2015 local col = createColCuboid( x, y, z, width, depth, height ) addEventHandler ("onColShapeHit", col, function (hitElement) if getElementType (hitElement) == "player" then if isPedInVehicle (hitElement) then local veh = getPedOccupiedVehicle (hitElement) destroyElement (veh) outputChatBox ("You can't enter wth your vehicle.", hitElement, 255, 0, 0) toggleControl (hitElement, "fire", false) toggleControl (hitElement, "aim_weapon", false) setPedWeaponSlot (hitElement, 0) toggleControl (hitElement, "next_weapon", false) toggleControl (hitElement, "previous_weapon", false) else toggleControl (hitElement, "fire", false) toggleControl (hitElement, "aim_weapon", false) setPedWeaponSlot (hitElement, 0) toggleControl (hitElement, "next_weapon", false) toggleControl (hitElement, "previous_weapon", false) end end end ) addEventHandler ("onColShapeLeave", col, function (leaveElement) if getElementType (leaveElement) == "player" then toggleControl (leaveElement, "fire", true) toggleControl (leaveElement, "aim_weapon", true) toggleControl (leaveElement, "next_weapon", true) toggleControl (leaveElement, "previous_weapon", true) end end ) Link to comment
Professional Posted February 10, 2015 Share Posted February 10, 2015 انت وزعطيتوني هذا الكود شو دخلني انا اذا انتو عاطينو اكواد او بل اصح فنكشات غلط Link to comment
baba Posted February 10, 2015 Author Share Posted February 10, 2015 ممكن توصع لي الصطر الاول local col = createColCuboid( x, y, z, width, depth, height ) Link to comment
#DRAGON!FIRE Posted February 10, 2015 Share Posted February 10, 2015 ممكن توصع لي الصطر الاول local col = createColCuboid( x, y, z, width, depth, height ) صناعة الكول شيب نفسه . x = x الاحداثي y = y الاحداثي z = z الاحداثي w = العرض d = العمق h = الطول 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