saef Posted December 2, 2015 Share Posted December 2, 2015 السلام عليكم كيفكمء شباب عسسآكم بخير انا اليوم معي مود الحمايه من الضرب لكن ي عيال المود هو لم تضرب احد في المنطقه المحدده م ينقص دمه ولا يتضرر و كمان ينسحب موتره بس انا عندي م ينسحب ابيكم تضيفون سب السياره الكلنت addEvent("enableGodMode", true) addEvent("disableGodMode", true) addEventHandler ("enableGodMode", getRootElement(), function() addEventHandler ("onClientPlayerDamage", getRootElement(), cancelEventEvent) end) addEventHandler ("disableGodMode", getRootElement(), function() removeEventHandler ("onClientPlayerDamage", getRootElement(), cancelEventEvent) end) function cancelEventEvent () cancelEvent() end --liedje in piratenschip pirShipMusicCol = createColCuboid (1997.58,1523.16,8,6,17.66,4) addEventHandler ("onClientColShapeHit", getRootElement(), function(hitElement, matchingDimension) if (source == pirShipMusicCol) and (hitElement == getLocalPlayer()) then setRadioChannel (7) end end) addEventHandler ("onClientColShapeLeave", getRootElement(), function(leaveElement, matchingDimension) if (source == pirShipMusicCol) and (leaveElement == getLocalPlayer()) then setRadioChannel (0) end end) السيرفر addEventHandler ("onResourceStart", getRootElement(), function() setTimer (moneyZoneTimerFunction, 2500, 0) local allGreenzones = getElementsByType ("radararea") for i,v in ipairs (allGreenzones) do local r,g,b,a = getRadarAreaColor (v) if (r == 0) and (g == 255) and (b == 0) and (a == 127) then local x,y = getElementPosition (v) local sx,sy = getRadarAreaSize (v) local col = createColCuboid (x,y, -50, sx,sy, 7500) setElementID (col, "greenzoneColshape") end end end) addEventHandler ("onColShapeHit", getRootElement(), function(hitElement, matchingDimension) if (getElementType (hitElement) == "player") and (getElementID (source) == "greenzoneColshape") then outputChatBox ("", hitElement, 255, 0, 0, false) toggleControl (hitElement, "fire", false) toggleControl (hitElement, "next_weapon", false) toggleControl (hitElement, "previous_weapon", false) showPlayerHudComponent (hitElement, "car", false) toggleControl (hitElement, "sprint", true) toggleControl (hitElement, "aim_weapon", false) toggleControl (hitElement, "vehicle_fire", false) toggleControl (hitElement, "vehicle", false) showPlayerHudComponent (hitElement, "ammo", false) showPlayerHudComponent (hitElement, "weapon", false) triggerClientEvent (hitElement, "enableGodMode", hitElement) end if (source == moneyZoneCol) and (getElementType (hitElement) == "vehicle") then setElementVelocity (hitElement, 0, 0, 0) setElementPosition (hitElement, 2018.33, 1534.77, 12.37) setVehicleRotation (hitElement, 0,0,270) if (getVehicleOccupant (hitElement, 0)) then outputChatBox ("You can't enter the moneyzone with your car!", getVehicleOccupant (hitElement, 0), 255, 0, 0, false) end end end) addEventHandler ("onColShapeLeave", getRootElement(), function(leaveElement, matchingDimension) if (getElementType (leaveElement) == "player") and (getElementID (source) == "greenzoneColshape") then outputChatBox ("", leaveElement, 255, 0, 0, false) toggleControl (leaveElement, "fire", true) toggleControl (leaveElement, "next_weapon", true) toggleControl (leaveElement, "previous_weapon", true) toggleControl (leaveElement, "sprint", true) toggleControl (leaveElement, "aim_weapon", true) toggleControl (leaveElement, "vehicle_fire", true) showPlayerHudComponent (leaveElement, "ammo", true) showPlayerHudComponent (leaveElement, "weapon", true) triggerClientEvent (leaveElement, "disableGodMode", leaveElement) end end) --money zone col moneyZoneCol = createColCuboid (1993.12, 1519.14, -100, 17.43, 54.24, 117) --stop moneyzone col function moneyZoneTimerFunction () local allPlayersInCol = getElementsWithinColShape (moneyZoneCol, "player") for i,v in ipairs (allPlayersInCol) do givePlayerMoney (v, 5) end end -- marker bij hospital createMarker (1607.36, 1814.24, -10, "cylinder", 24, 0, 255, 0, 190, getRootElement()) Link to comment
Abdul KariM Posted December 2, 2015 Share Posted December 2, 2015 عليكم السلام الدي بوق وش يطلع لك debugscript 3 Link to comment
saef Posted December 2, 2015 Author Share Posted December 2, 2015 عليكم السلام الدي بوق وش يطلع لك debugscript 3 م طلع شيء ي خوي المود ييشتغل بس م تنسحب السياره لو جا بي المنطقه المحميه Link to comment
iMr.Omar Posted December 2, 2015 Share Posted December 2, 2015 ضيف هاذا الكود يوم يخش المنطقة المحمية if (getPedOccupiedVehicle(hitElement)) then destroyElement (getPedOccupiedVehicle(hitElement)) end Link to comment
Rockyz Posted December 3, 2015 Share Posted December 3, 2015 Server .. : addEventHandler ("onResourceStart", getRootElement(), function() setTimer (moneyZoneTimerFunction, 2500, 0) local allGreenzones = getElementsByType ("radararea") for i,v in ipairs (allGreenzones) do local r,g,b,a = getRadarAreaColor (v) if (r == 0) and (g == 255) and (b == 0) and (a == 127) then local x,y = getElementPosition (v) local sx,sy = getRadarAreaSize (v) local col = createColCuboid (x,y, -50, sx,sy, 7500) setElementID (col, "greenzoneColshape") end end end) addEventHandler ("onColShapeHit", getRootElement(), function(hitElement, matchingDimension) if (getElementType (hitElement) == "player") and (getElementID (source) == "greenzoneColshape") then outputChatBox ("", hitElement, 255, 0, 0, false) if (isPedInVehicle(hitElement)) then setElementData (hitElement, "getTheVehh", getVehicleModelFromName (getVehicleName (getPedOccupiedVehicle(hitElement)))) destroyElement (getPedOccupiedVehicle(hitElement)) end toggleControl (hitElement, "fire", false) toggleControl (hitElement, "next_weapon", false) toggleControl (hitElement, "previous_weapon", false) showPlayerHudComponent (hitElement, "car", false) toggleControl (hitElement, "sprint", true) toggleControl (hitElement, "aim_weapon", false) toggleControl (hitElement, "vehicle_fire", false) toggleControl (hitElement, "vehicle", false) showPlayerHudComponent (hitElement, "ammo", false) showPlayerHudComponent (hitElement, "weapon", false) triggerClientEvent (hitElement, "enableGodMode", hitElement) end if (source == moneyZoneCol) and (getElementType (hitElement) == "vehicle") then setElementVelocity (hitElement, 0, 0, 0) setElementPosition (hitElement, 2018.33, 1534.77, 12.37) setVehicleRotation (hitElement, 0,0,270) if (getVehicleOccupant (hitElement, 0)) then outputChatBox ("You can't enter the moneyzone with your car!", getVehicleOccupant (hitElement, 0), 255, 0, 0, false) end end end) addEventHandler ("onColShapeLeave", getRootElement(), function(leaveElement, matchingDimension) if (getElementType (leaveElement) == "player") and (getElementID (source) == "greenzoneColshape") then outputChatBox ("", leaveElement, 255, 0, 0, false) local yrVEH = getElementData (leaveElement, "getTheVehh") if (yrVEH) then local x, y, z = getElementPosition (leaveElement) local rx, ry, rz = getElementRotation (leaveElement) createVehicle (tonumber (yrVEH), x, y, z, rx, ry, rz) removeElementData ( leaveElement, "getTheVehh" ) end toggleControl (leaveElement, "fire", true) toggleControl (leaveElement, "next_weapon", true) toggleControl (leaveElement, "previous_weapon", true) toggleControl (leaveElement, "sprint", true) toggleControl (leaveElement, "aim_weapon", true) toggleControl (leaveElement, "vehicle_fire", true) showPlayerHudComponent (leaveElement, "ammo", true) showPlayerHudComponent (leaveElement, "weapon", true) triggerClientEvent (leaveElement, "disableGodMode", leaveElement) end end) --money zone col moneyZoneCol = createColCuboid (1993.12, 1519.14, -100, 17.43, 54.24, 117) --stop moneyzone col function moneyZoneTimerFunction () local allPlayersInCol = getElementsWithinColShape (moneyZoneCol, "player") for i,v in ipairs (allPlayersInCol) do givePlayerMoney (v, 5) end end -- marker bij hospital createMarker (1607.36, 1814.24, -10, "cylinder", 24, 0, 255, 0, 190, getRootElement()) Link to comment
saef Posted December 3, 2015 Author Share Posted December 3, 2015 Server .. : addEventHandler ("onResourceStart", getRootElement(), function() setTimer (moneyZoneTimerFunction, 2500, 0) local allGreenzones = getElementsByType ("radararea") for i,v in ipairs (allGreenzones) do local r,g,b,a = getRadarAreaColor (v) if (r == 0) and (g == 255) and (b == 0) and (a == 127) then local x,y = getElementPosition (v) local sx,sy = getRadarAreaSize (v) local col = createColCuboid (x,y, -50, sx,sy, 7500) setElementID (col, "greenzoneColshape") end end end) addEventHandler ("onColShapeHit", getRootElement(), function(hitElement, matchingDimension) if (getElementType (hitElement) == "player") and (getElementID (source) == "greenzoneColshape") then outputChatBox ("", hitElement, 255, 0, 0, false) if (isPedInVehicle(hitElement)) then setElementData (hitElement, "getTheVehh", getVehicleModelFromName (getVehicleName (getPedOccupiedVehicle(hitElement)))) destroyElement (getPedOccupiedVehicle(hitElement)) end toggleControl (hitElement, "fire", false) toggleControl (hitElement, "next_weapon", false) toggleControl (hitElement, "previous_weapon", false) showPlayerHudComponent (hitElement, "car", false) toggleControl (hitElement, "sprint", true) toggleControl (hitElement, "aim_weapon", false) toggleControl (hitElement, "vehicle_fire", false) toggleControl (hitElement, "vehicle", false) showPlayerHudComponent (hitElement, "ammo", false) showPlayerHudComponent (hitElement, "weapon", false) triggerClientEvent (hitElement, "enableGodMode", hitElement) end if (source == moneyZoneCol) and (getElementType (hitElement) == "vehicle") then setElementVelocity (hitElement, 0, 0, 0) setElementPosition (hitElement, 2018.33, 1534.77, 12.37) setVehicleRotation (hitElement, 0,0,270) if (getVehicleOccupant (hitElement, 0)) then outputChatBox ("You can't enter the moneyzone with your car!", getVehicleOccupant (hitElement, 0), 255, 0, 0, false) end end end) addEventHandler ("onColShapeLeave", getRootElement(), function(leaveElement, matchingDimension) if (getElementType (leaveElement) == "player") and (getElementID (source) == "greenzoneColshape") then outputChatBox ("", leaveElement, 255, 0, 0, false) local yrVEH = getElementData (leaveElement, "getTheVehh") if (yrVEH) then local x, y, z = getElementPosition (leaveElement) local rx, ry, rz = getElementRotation (leaveElement) createVehicle (tonumber (yrVEH), x, y, z, rx, ry, rz) removeElementData ( leaveElement, "getTheVehh" ) end toggleControl (leaveElement, "fire", true) toggleControl (leaveElement, "next_weapon", true) toggleControl (leaveElement, "previous_weapon", true) toggleControl (leaveElement, "sprint", true) toggleControl (leaveElement, "aim_weapon", true) toggleControl (leaveElement, "vehicle_fire", true) showPlayerHudComponent (leaveElement, "ammo", true) showPlayerHudComponent (leaveElement, "weapon", true) triggerClientEvent (leaveElement, "disableGodMode", leaveElement) end end) --money zone col moneyZoneCol = createColCuboid (1993.12, 1519.14, -100, 17.43, 54.24, 117) --stop moneyzone col function moneyZoneTimerFunction () local allPlayersInCol = getElementsWithinColShape (moneyZoneCol, "player") for i,v in ipairs (allPlayersInCol) do givePlayerMoney (v, 5) end end -- marker bij hospital createMarker (1607.36, 1814.24, -10, "cylinder", 24, 0, 255, 0, 190, getRootElement()) م زبط حقتك ولا حق الي فوق Link to comment
Abdul KariM Posted December 4, 2015 Share Posted December 4, 2015 انت مسوي منطقتين في الكلينت وحده والسيرفر اكثر من وحده اي وحده تبي يوم يخشها احد ينسحب موتره حقت الكلينت ولا السيرفر ؟ Link to comment
SycroX Posted December 4, 2015 Share Posted December 4, 2015 المفروض المنطقة تكون كلنت Link to comment
Rockyz Posted December 4, 2015 Share Posted December 4, 2015 addEventHandler ("onResourceStart", getRootElement(), function() setTimer (moneyZoneTimerFunction, 2500, 0) local allGreenzones = getElementsByType ("radararea") for i,v in ipairs (allGreenzones) do local r,g,b,a = getRadarAreaColor (v) if (r == 0) and (g == 255) and (b == 0) and (a == 127) then local x,y = getElementPosition (v) local sx,sy = getRadarAreaSize (v) local col = createColCuboid (x,y, -50, sx,sy, 7500) setElementID (col, "greenzoneColshape") end end end) addEventHandler ("onColShapeHit", getRootElement(), function(hitElement, matchingDimension) if (getElementType (hitElement) == "player") and (getElementID (source) == "greenzoneColshape") then outputChatBox ("", hitElement, 255, 0, 0, false) if (isPedInVehicle(hitElement)) then setElementData (hitElement, "getTheVehh", getVehicleModelFromName (getVehicleName (getPedOccupiedVehicle(hitElement)))) destroyElement (getPedOccupiedVehicle(hitElement)) end toggleControl (hitElement, "fire", false) toggleControl (hitElement, "next_weapon", false) toggleControl (hitElement, "previous_weapon", false) showPlayerHudComponent (hitElement, "car", false) toggleControl (hitElement, "sprint", true) toggleControl (hitElement, "aim_weapon", false) toggleControl (hitElement, "vehicle_fire", false) toggleControl (hitElement, "vehicle", false) showPlayerHudComponent (hitElement, "ammo", false) showPlayerHudComponent (hitElement, "weapon", false) triggerClientEvent (hitElement, "enableGodMode", hitElement) end if (source == moneyZoneCol) and (getElementType (hitElement) == "vehicle") then setElementVelocity (hitElement, 0, 0, 0) setElementPosition (hitElement, 2018.33, 1534.77, 12.37) setVehicleRotation (hitElement, 0,0,270) if (getVehicleOccupant (hitElement, 0)) then outputChatBox ("You can't enter the moneyzone with your car!", getVehicleOccupant (hitElement, 0), 255, 0, 0, false) end end end) addEventHandler ("onColShapeLeave", getRootElement(), function(leaveElement, matchingDimension) if (getElementType (leaveElement) == "player") and (getElementID (source) == "greenzoneColshape") then outputChatBox ("", leaveElement, 255, 0, 0, false) local yrVEH = getElementData (leaveElement, "getTheVehh") if (yrVEH) then local x, y, z = getElementPosition (leaveElement) local rx, ry, rz = getElementRotation (leaveElement) local hveh = createVehicle (tonumber (yrVEH), x + 3, y + 3, z, rx, ry, rz) warpPedIntoVehicle (leaveElement, hveh) removeElementData (leaveElement, "getTheVehh") end toggleControl (leaveElement, "fire", true) toggleControl (leaveElement, "next_weapon", true) toggleControl (leaveElement, "previous_weapon", true) toggleControl (leaveElement, "sprint", true) toggleControl (leaveElement, "aim_weapon", true) toggleControl (leaveElement, "vehicle_fire", true) showPlayerHudComponent (leaveElement, "ammo", true) showPlayerHudComponent (leaveElement, "weapon", true) triggerClientEvent (leaveElement, "disableGodMode", leaveElement) end end) --money zone col moneyZoneCol = createColCuboid (1993.12, 1519.14, -100, 17.43, 54.24, 117) --stop moneyzone col function moneyZoneTimerFunction () local allPlayersInCol = getElementsWithinColShape (moneyZoneCol, "player") for i,v in ipairs (allPlayersInCol) do givePlayerMoney (v, 5) end end -- marker bij hospital createMarker (1607.36, 1814.24, -10, "cylinder", 24, 0, 255, 0, 190, getRootElement()) Link to comment
xBeSoOo Posted December 4, 2015 Share Posted December 4, 2015 (edited) ضيف ذا الكود addEventHandler ( "onColShapeHit", اسم المتغير حق المنطة, function (HE) if getElementType (HE) == "vehicle" then destroyElement (HE) end end ) Edited December 5, 2015 by Guest Link to comment
TAPL Posted December 4, 2015 Share Posted December 4, 2015 ضيف ذا الكود addEventHandler ( "onColShapeHit", اسم المتغير حق المنطة, function (HE) if getElementType (HE) == "vehicle" then destroyElement (HE) else cancelEvent () end end ) cancelEvent??! Link to comment
saef Posted December 5, 2015 Author Share Posted December 5, 2015 ضيف ذا الكود addEventHandler ( "onColShapeHit", اسم المتغير حق المنطة, function (HE) if getElementType (HE) == "vehicle" then destroyElement (HE) else cancelEvent () end end ) cancelEvent??! ووووش؟؟!! Link to comment
saef Posted December 5, 2015 Author Share Posted December 5, 2015 addEventHandler ("onResourceStart", getRootElement(), function() setTimer (moneyZoneTimerFunction, 2500, 0) local allGreenzones = getElementsByType ("radararea") for i,v in ipairs (allGreenzones) do local r,g,b,a = getRadarAreaColor (v) if (r == 0) and (g == 255) and (b == 0) and (a == 127) then local x,y = getElementPosition (v) local sx,sy = getRadarAreaSize (v) local col = createColCuboid (x,y, -50, sx,sy, 7500) setElementID (col, "greenzoneColshape") end end end) addEventHandler ("onColShapeHit", getRootElement(), function(hitElement, matchingDimension) if (getElementType (hitElement) == "player") and (getElementID (source) == "greenzoneColshape") then outputChatBox ("", hitElement, 255, 0, 0, false) if (isPedInVehicle(hitElement)) then setElementData (hitElement, "getTheVehh", getVehicleModelFromName (getVehicleName (getPedOccupiedVehicle(hitElement)))) destroyElement (getPedOccupiedVehicle(hitElement)) end toggleControl (hitElement, "fire", false) toggleControl (hitElement, "next_weapon", false) toggleControl (hitElement, "previous_weapon", false) showPlayerHudComponent (hitElement, "car", false) toggleControl (hitElement, "sprint", true) toggleControl (hitElement, "aim_weapon", false) toggleControl (hitElement, "vehicle_fire", false) toggleControl (hitElement, "vehicle", false) showPlayerHudComponent (hitElement, "ammo", false) showPlayerHudComponent (hitElement, "weapon", false) triggerClientEvent (hitElement, "enableGodMode", hitElement) end if (source == moneyZoneCol) and (getElementType (hitElement) == "vehicle") then setElementVelocity (hitElement, 0, 0, 0) setElementPosition (hitElement, 2018.33, 1534.77, 12.37) setVehicleRotation (hitElement, 0,0,270) if (getVehicleOccupant (hitElement, 0)) then outputChatBox ("You can't enter the moneyzone with your car!", getVehicleOccupant (hitElement, 0), 255, 0, 0, false) end end end) addEventHandler ("onColShapeLeave", getRootElement(), function(leaveElement, matchingDimension) if (getElementType (leaveElement) == "player") and (getElementID (source) == "greenzoneColshape") then outputChatBox ("", leaveElement, 255, 0, 0, false) local yrVEH = getElementData (leaveElement, "getTheVehh") if (yrVEH) then local x, y, z = getElementPosition (leaveElement) local rx, ry, rz = getElementRotation (leaveElement) local hveh = createVehicle (tonumber (yrVEH), x + 3, y + 3, z, rx, ry, rz) warpPedIntoVehicle (leaveElement, hveh) removeElementData (leaveElement, "getTheVehh") end toggleControl (leaveElement, "fire", true) toggleControl (leaveElement, "next_weapon", true) toggleControl (leaveElement, "previous_weapon", true) toggleControl (leaveElement, "sprint", true) toggleControl (leaveElement, "aim_weapon", true) toggleControl (leaveElement, "vehicle_fire", true) showPlayerHudComponent (leaveElement, "ammo", true) showPlayerHudComponent (leaveElement, "weapon", true) triggerClientEvent (leaveElement, "disableGodMode", leaveElement) end end) --money zone col moneyZoneCol = createColCuboid (1993.12, 1519.14, -100, 17.43, 54.24, 117) --stop moneyzone col function moneyZoneTimerFunction () local allPlayersInCol = getElementsWithinColShape (moneyZoneCol, "player") for i,v in ipairs (allPlayersInCol) do givePlayerMoney (v, 5) end end -- marker bij hospital createMarker (1607.36, 1814.24, -10, "cylinder", 24, 0, 255, 0, 190, getRootElement()) م زبط Link to comment
Rockyz Posted December 5, 2015 Share Posted December 5, 2015 ضيف ذا الكود addEventHandler ( "onColShapeHit", اسم المتغير حق المنطة, function (HE) if getElementType (HE) == "vehicle" then destroyElement (HE) else cancelEvent () end end ) يقصد لك تابل هريس ؟؟؟! Link to comment
xBeSoOo Posted December 5, 2015 Share Posted December 5, 2015 ضيف ذا الكود addEventHandler ( "onColShapeHit", اسم المتغير حق المنطة, function (HE) if getElementType (HE) == "vehicle" then destroyElement (HE) else cancelEvent () end end ) يقصد لك تابل هريس ؟؟؟! يالحبيب الكود مجربه انا وشغال بمجرد ما المس المنطقة تنسحب السيارة او الطيارة وعدلت الكود ترا مب حرب هي الكل جاي يتعلم ويستفيد وشكرا لتابل علي التوضيح addEventHandler ( "onColShapeHit", اسم المتغير حق المنطة, function (HE) if getElementType (HE) == "vehicle" then destroyElement (HE) end end ) Link to comment
saef Posted December 5, 2015 Author Share Posted December 5, 2015 ضيف ذا الكود addEventHandler ( "onColShapeHit", اسم المتغير حق المنطة, function (HE) if getElementType (HE) == "vehicle" then destroyElement (HE) else cancelEvent () end end ) يقصد لك تابل هريس ؟؟؟! يالحبيب الكود مجربه انا وشغال بمجرد ما المس المنطقة تنسحب السيارة او الطيارة وعدلت الكود ترا مب حرب هي الكل جاي يتعلم ويستفيد وشكرا لتابل علي التوضيح addEventHandler ( "onColShapeHit", اسم المتغير حق المنطة, function (HE) if getElementType (HE) == "vehicle" then destroyElement (HE) end end ) طيب وين احط الكود في اي ملف و وين موقع بين الكواد Link to comment
xBeSoOo Posted December 5, 2015 Share Posted December 5, 2015 طيب وين احط الكود في اي ملف و وين موقع بين الكواد حط ذا الكود اخر ملف السيرفر addEventHandler ( "onColShapeHit", col, function (HE) if getElementType (HE) == "vehicle" then destroyElement (HE) end end ) Link to comment
saef Posted December 6, 2015 Author Share Posted December 6, 2015 طيب وين احط الكود في اي ملف و وين موقع بين الكواد حط ذا الكود اخر ملف السيرفر addEventHandler ( "onColShapeHit", col, function (HE) if getElementType (HE) == "vehicle" then destroyElement (HE) end end ) يب زبط + ي الحب لو انل يياره وسط الماكه م تروح لزم اطلع بر الماركه و ارجع ادخل كذا تنسب اما لو من جوة الماركه نزلت سياره م تروح + اول م اطلع من الحمايه ترجع لي السياره ابي لما يطلع مترجع له السياره + لم ينزل جو الماركه تروح حلوههــــــــــ تكفون Link to comment
Rockyz Posted December 6, 2015 Share Posted December 6, 2015 تقصد كودي ؟ لان كودي هو الي اذا طلعت من المنطقة يرجع السيارة addEventHandler ("onResourceStart", getRootElement(), function() setTimer (moneyZoneTimerFunction, 2500, 0) local allGreenzones = getElementsByType ("radararea") for i,v in ipairs (allGreenzones) do local r,g,b,a = getRadarAreaColor (v) if (r == 0) and (g == 255) and (b == 0) and (a == 127) then local x,y = getElementPosition (v) local sx,sy = getRadarAreaSize (v) local col = createColCuboid (x,y, -50, sx,sy, 7500) setElementID (col, "greenzoneColshape") end end end) addEventHandler ("onColShapeHit", getRootElement(), function(hitElement, matchingDimension) if (getElementType (hitElement) == "player") and (getElementID (source) == "greenzoneColshape") then outputChatBox ("", hitElement, 255, 0, 0, false) if (isPedInVehicle(hitElement)) then setElementData (hitElement, "getTheVehh", getVehicleModelFromName (getVehicleName (getPedOccupiedVehicle(hitElement)))) destroyElement (getPedOccupiedVehicle(hitElement)) end toggleControl (hitElement, "fire", false) toggleControl (hitElement, "next_weapon", false) toggleControl (hitElement, "previous_weapon", false) showPlayerHudComponent (hitElement, "car", false) toggleControl (hitElement, "sprint", true) toggleControl (hitElement, "aim_weapon", false) toggleControl (hitElement, "vehicle_fire", false) toggleControl (hitElement, "vehicle", false) showPlayerHudComponent (hitElement, "ammo", false) showPlayerHudComponent (hitElement, "weapon", false) triggerClientEvent (hitElement, "enableGodMode", hitElement) end if (source == moneyZoneCol) and (getElementType (hitElement) == "vehicle") then setElementVelocity (hitElement, 0, 0, 0) setElementPosition (hitElement, 2018.33, 1534.77, 12.37) setVehicleRotation (hitElement, 0,0,270) if (getVehicleOccupant (hitElement, 0)) then outputChatBox ("You can't enter the moneyzone with your car!", getVehicleOccupant (hitElement, 0), 255, 0, 0, false) end end end) addEventHandler ("onColShapeLeave", getRootElement(), function(leaveElement, matchingDimension) if (getElementType (leaveElement) == "player") and (getElementID (source) == "greenzoneColshape") then outputChatBox ("", leaveElement, 255, 0, 0, false) local yrVEH = getElementData (leaveElement, "getTheVehh") if (yrVEH) then local x, y, z = getElementPosition (leaveElement) local rx, ry, rz = getElementRotation (leaveElement) local hveh = createVehicle (tonumber (yrVEH), x + 3, y + 3, z, rx, ry, rz) warpPedIntoVehicle (leaveElement, hveh) removeElementData (leaveElement, "getTheVehh") end toggleControl (leaveElement, "fire", true) toggleControl (leaveElement, "next_weapon", true) toggleControl (leaveElement, "previous_weapon", true) toggleControl (leaveElement, "sprint", true) toggleControl (leaveElement, "aim_weapon", true) toggleControl (leaveElement, "vehicle_fire", true) showPlayerHudComponent (leaveElement, "ammo", true) showPlayerHudComponent (leaveElement, "weapon", true) triggerClientEvent (leaveElement, "disableGodMode", leaveElement) end end) --money zone col moneyZoneCol = createColCuboid (1993.12, 1519.14, -100, 17.43, 54.24, 117) --stop moneyzone col function moneyZoneTimerFunction () local allPlayersInCol = getElementsWithinColShape (moneyZoneCol, "player") for i,v in ipairs (allPlayersInCol) do givePlayerMoney (v, 5) end end -- marker bij hospital createMarker (1607.36, 1814.24, -10, "cylinder", 24, 0, 255, 0, 190, getRootElement()) جرب كذا اذا ماتبيه يرجع addEventHandler ("onResourceStart", getRootElement(), function() setTimer (moneyZoneTimerFunction, 2500, 0) local allGreenzones = getElementsByType ("radararea") for i,v in ipairs (allGreenzones) do local r,g,b,a = getRadarAreaColor (v) if (r == 0) and (g == 255) and (b == 0) and (a == 127) then local x,y = getElementPosition (v) local sx,sy = getRadarAreaSize (v) local col = createColCuboid (x,y, -50, sx,sy, 7500) setElementID (col, "greenzoneColshape") end end end) addEventHandler ("onColShapeHit", getRootElement(), function(hitElement, matchingDimension) if (getElementType (hitElement) == "player") and (getElementID (source) == "greenzoneColshape") then outputChatBox ("", hitElement, 255, 0, 0, false) if (isPedInVehicle(hitElement)) then destroyElement (getPedOccupiedVehicle(hitElement)) end toggleControl (hitElement, "fire", false) toggleControl (hitElement, "next_weapon", false) toggleControl (hitElement, "previous_weapon", false) showPlayerHudComponent (hitElement, "car", false) toggleControl (hitElement, "sprint", true) toggleControl (hitElement, "aim_weapon", false) toggleControl (hitElement, "vehicle_fire", false) toggleControl (hitElement, "vehicle", false) showPlayerHudComponent (hitElement, "ammo", false) showPlayerHudComponent (hitElement, "weapon", false) triggerClientEvent (hitElement, "enableGodMode", hitElement) end if (source == moneyZoneCol) and (getElementType (hitElement) == "vehicle") then setElementVelocity (hitElement, 0, 0, 0) setElementPosition (hitElement, 2018.33, 1534.77, 12.37) setVehicleRotation (hitElement, 0,0,270) if (getVehicleOccupant (hitElement, 0)) then outputChatBox ("You can't enter the moneyzone with your car!", getVehicleOccupant (hitElement, 0), 255, 0, 0, false) end end end) addEventHandler ("onColShapeLeave", getRootElement(), function(leaveElement, matchingDimension) if (getElementType (leaveElement) == "player") and (getElementID (source) == "greenzoneColshape") then outputChatBox ("", leaveElement, 255, 0, 0, false) toggleControl (leaveElement, "fire", true) toggleControl (leaveElement, "next_weapon", true) toggleControl (leaveElement, "previous_weapon", true) toggleControl (leaveElement, "sprint", true) toggleControl (leaveElement, "aim_weapon", true) toggleControl (leaveElement, "vehicle_fire", true) showPlayerHudComponent (leaveElement, "ammo", true) showPlayerHudComponent (leaveElement, "weapon", true) triggerClientEvent (leaveElement, "disableGodMode", leaveElement) end end) --money zone col moneyZoneCol = createColCuboid (1993.12, 1519.14, -100, 17.43, 54.24, 117) --stop moneyzone col function moneyZoneTimerFunction () local allPlayersInCol = getElementsWithinColShape (moneyZoneCol, "player") for i,v in ipairs (allPlayersInCol) do givePlayerMoney (v, 5) end end -- marker bij hospital createMarker (1607.36, 1814.24, -10, "cylinder", 24, 0, 255, 0, 190, getRootElement()) Link to comment
saef Posted December 6, 2015 Author Share Posted December 6, 2015 تقصد كودي ؟ لان كودي هو الي اذا طلعت من المنطقة يرجع السيارة addEventHandler ("onResourceStart", getRootElement(), function() setTimer (moneyZoneTimerFunction, 2500, 0) local allGreenzones = getElementsByType ("radararea") for i,v in ipairs (allGreenzones) do local r,g,b,a = getRadarAreaColor (v) if (r == 0) and (g == 255) and (b == 0) and (a == 127) then local x,y = getElementPosition (v) local sx,sy = getRadarAreaSize (v) local col = createColCuboid (x,y, -50, sx,sy, 7500) setElementID (col, "greenzoneColshape") end end end) addEventHandler ("onColShapeHit", getRootElement(), function(hitElement, matchingDimension) if (getElementType (hitElement) == "player") and (getElementID (source) == "greenzoneColshape") then outputChatBox ("", hitElement, 255, 0, 0, false) if (isPedInVehicle(hitElement)) then setElementData (hitElement, "getTheVehh", getVehicleModelFromName (getVehicleName (getPedOccupiedVehicle(hitElement)))) destroyElement (getPedOccupiedVehicle(hitElement)) end toggleControl (hitElement, "fire", false) toggleControl (hitElement, "next_weapon", false) toggleControl (hitElement, "previous_weapon", false) showPlayerHudComponent (hitElement, "car", false) toggleControl (hitElement, "sprint", true) toggleControl (hitElement, "aim_weapon", false) toggleControl (hitElement, "vehicle_fire", false) toggleControl (hitElement, "vehicle", false) showPlayerHudComponent (hitElement, "ammo", false) showPlayerHudComponent (hitElement, "weapon", false) triggerClientEvent (hitElement, "enableGodMode", hitElement) end if (source == moneyZoneCol) and (getElementType (hitElement) == "vehicle") then setElementVelocity (hitElement, 0, 0, 0) setElementPosition (hitElement, 2018.33, 1534.77, 12.37) setVehicleRotation (hitElement, 0,0,270) if (getVehicleOccupant (hitElement, 0)) then outputChatBox ("You can't enter the moneyzone with your car!", getVehicleOccupant (hitElement, 0), 255, 0, 0, false) end end end) addEventHandler ("onColShapeLeave", getRootElement(), function(leaveElement, matchingDimension) if (getElementType (leaveElement) == "player") and (getElementID (source) == "greenzoneColshape") then outputChatBox ("", leaveElement, 255, 0, 0, false) local yrVEH = getElementData (leaveElement, "getTheVehh") if (yrVEH) then local x, y, z = getElementPosition (leaveElement) local rx, ry, rz = getElementRotation (leaveElement) local hveh = createVehicle (tonumber (yrVEH), x + 3, y + 3, z, rx, ry, rz) warpPedIntoVehicle (leaveElement, hveh) removeElementData (leaveElement, "getTheVehh") end toggleControl (leaveElement, "fire", true) toggleControl (leaveElement, "next_weapon", true) toggleControl (leaveElement, "previous_weapon", true) toggleControl (leaveElement, "sprint", true) toggleControl (leaveElement, "aim_weapon", true) toggleControl (leaveElement, "vehicle_fire", true) showPlayerHudComponent (leaveElement, "ammo", true) showPlayerHudComponent (leaveElement, "weapon", true) triggerClientEvent (leaveElement, "disableGodMode", leaveElement) end end) --money zone col moneyZoneCol = createColCuboid (1993.12, 1519.14, -100, 17.43, 54.24, 117) --stop moneyzone col function moneyZoneTimerFunction () local allPlayersInCol = getElementsWithinColShape (moneyZoneCol, "player") for i,v in ipairs (allPlayersInCol) do givePlayerMoney (v, 5) end end -- marker bij hospital createMarker (1607.36, 1814.24, -10, "cylinder", 24, 0, 255, 0, 190, getRootElement()) جرب كذا اذا ماتبيه يرجع addEventHandler ("onResourceStart", getRootElement(), function() setTimer (moneyZoneTimerFunction, 2500, 0) local allGreenzones = getElementsByType ("radararea") for i,v in ipairs (allGreenzones) do local r,g,b,a = getRadarAreaColor (v) if (r == 0) and (g == 255) and (b == 0) and (a == 127) then local x,y = getElementPosition (v) local sx,sy = getRadarAreaSize (v) local col = createColCuboid (x,y, -50, sx,sy, 7500) setElementID (col, "greenzoneColshape") end end end) addEventHandler ("onColShapeHit", getRootElement(), function(hitElement, matchingDimension) if (getElementType (hitElement) == "player") and (getElementID (source) == "greenzoneColshape") then outputChatBox ("", hitElement, 255, 0, 0, false) if (isPedInVehicle(hitElement)) then destroyElement (getPedOccupiedVehicle(hitElement)) end toggleControl (hitElement, "fire", false) toggleControl (hitElement, "next_weapon", false) toggleControl (hitElement, "previous_weapon", false) showPlayerHudComponent (hitElement, "car", false) toggleControl (hitElement, "sprint", true) toggleControl (hitElement, "aim_weapon", false) toggleControl (hitElement, "vehicle_fire", false) toggleControl (hitElement, "vehicle", false) showPlayerHudComponent (hitElement, "ammo", false) showPlayerHudComponent (hitElement, "weapon", false) triggerClientEvent (hitElement, "enableGodMode", hitElement) end if (source == moneyZoneCol) and (getElementType (hitElement) == "vehicle") then setElementVelocity (hitElement, 0, 0, 0) setElementPosition (hitElement, 2018.33, 1534.77, 12.37) setVehicleRotation (hitElement, 0,0,270) if (getVehicleOccupant (hitElement, 0)) then outputChatBox ("You can't enter the moneyzone with your car!", getVehicleOccupant (hitElement, 0), 255, 0, 0, false) end end end) addEventHandler ("onColShapeLeave", getRootElement(), function(leaveElement, matchingDimension) if (getElementType (leaveElement) == "player") and (getElementID (source) == "greenzoneColshape") then outputChatBox ("", leaveElement, 255, 0, 0, false) toggleControl (leaveElement, "fire", true) toggleControl (leaveElement, "next_weapon", true) toggleControl (leaveElement, "previous_weapon", true) toggleControl (leaveElement, "sprint", true) toggleControl (leaveElement, "aim_weapon", true) toggleControl (leaveElement, "vehicle_fire", true) showPlayerHudComponent (leaveElement, "ammo", true) showPlayerHudComponent (leaveElement, "weapon", true) triggerClientEvent (leaveElement, "disableGodMode", leaveElement) end end) --money zone col moneyZoneCol = createColCuboid (1993.12, 1519.14, -100, 17.43, 54.24, 117) --stop moneyzone col function moneyZoneTimerFunction () local allPlayersInCol = getElementsWithinColShape (moneyZoneCol, "player") for i,v in ipairs (allPlayersInCol) do givePlayerMoney (v, 5) end end -- marker bij hospital createMarker (1607.36, 1814.24, -10, "cylinder", 24, 0, 255, 0, 190, getRootElement()) طيب اخوي الان لم انزل جو الماركه السياره م تروح لكن لم اروح اطلع بر المارك و ارجع بي سياره ادخل الماركه يسحبه ابي ل ينزل جو الماركه تنسحب كمان Link to comment
Rockyz Posted December 6, 2015 Share Posted December 6, 2015 اذا السباون في المنطقة المحمية ف هذا شي اكيد Link to comment
iMr.Omar Posted December 6, 2015 Share Posted December 6, 2015 https://wiki.multitheftauto.com/wiki/IsElementWithinColShape Link to comment
a7zan Posted December 6, 2015 Share Posted December 6, 2015 @saef ماركه = ماركر حاول لما تتكلم تكلم بلهجة يفهمها الجميع عشان يقدرون يفهمون ويساعدونك بالتوفيق Link to comment
saef Posted December 6, 2015 Author Share Posted December 6, 2015 @saefماركه = ماركر حاول لما تتكلم تكلم بلهجة يفهمها الجميع عشان يقدرون يفهمون ويساعدونك بالتوفيق ابشر بس كنت مستععجل 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