Mostafa MohammeD Posted December 10, 2015 Share Posted December 10, 2015 شباب معي مود حماية بس الحماية حماية من كل شئ عدا السيارات لها حماية وحدها والسيارات محمية بي هاي الفنكشن createColCuboid ابي احد يعرفني كيف اخد احداثيات بي هاي الفنكشن او تقولولي كيف اخلي الحماية العاديه معها حماية سيارات اتمني تساعدوني وشكرا Link to comment
Me[Z]oO Posted December 10, 2015 Share Posted December 10, 2015 شبابمعي مود حماية بس الحماية حماية من كل شئ عدا السيارات لها حماية وحدها والسيارات محمية بي هاي الفنكشن createColCuboid ابي احد يعرفني كيف اخد احداثيات بي هاي الفنكشن او تقولولي كيف اخلي الحماية العاديه معها حماية سيارات اتمني تساعدوني وشكرا getElementType --(vehicle) destroyElement Link to comment
Mostafa MohammeD Posted December 10, 2015 Author Share Posted December 10, 2015 شبابمعي مود حماية بس الحماية حماية من كل شئ عدا السيارات لها حماية وحدها والسيارات محمية بي هاي الفنكشن createColCuboid ابي احد يعرفني كيف اخد احداثيات بي هاي الفنكشن او تقولولي كيف اخلي الحماية العاديه معها حماية سيارات اتمني تساعدوني وشكرا getElementType --(vehicle) destroyElement if getElementType (Vehicle) then destroyElement (Vehicle) سويته هيك وما اشتغل Link to comment
Mr.Ronaldo Posted December 10, 2015 Share Posted December 10, 2015 (edited) عشان تخلي السيارة تختفي --Events onColShapeHit --functions getPedOccupiedVehicle or getElementType destroyElement ذي طريقه للـتاكد من الاحداثيات createColRectangle -- الكول شيب createRadarArea --تتاكد من الاحداثيات سويها نفس احداثيات الكول شيب مثال موضحلك فيه createColRectangle ( x, y, width, height ) createRadarArea ( x, y, width, height, color, color, color, alpha ) Edited December 10, 2015 by Guest Link to comment
Mr.Ronaldo Posted December 10, 2015 Share Posted December 10, 2015 if getElementType (Vehicle) then destroyElement (Vehicle) سويته هيك وما اشتغل التصحيح if getElementType (Vehicle) == "vehicle" then destroyElement (Vehicle) end +تأكد من الارقمنت Vehicle Link to comment
Mostafa MohammeD Posted December 10, 2015 Author Share Posted December 10, 2015 if getElementType (Vehicle) then destroyElement (Vehicle) سويته هيك وما اشتغل التصحيح if getElementType (Vehicle) == "vehicle" then destroyElement (Vehicle) end +تأكد من الارقمنت Vehicle 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 ("You entered the greenzone", hitElement, 255, 0, 0, false) toggleControl (hitElement, "fire", false) toggleControl (hitElement, "next_weapon", false) toggleControl (hitElement, "previous_weapon", false) toggleControl (hitElement, "sprint", false) toggleControl (hitElement, "aim_weapon", false) toggleControl (hitElement, "vehicle_fire", 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 ("You left the greenzone", 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
Mr.Ronaldo Posted December 10, 2015 Share Posted December 10, 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 if not getElementType (hitElement) == "vehicle" then outputChatBox ("You entered the greenzone", hitElement, 255, 0, 0, false) toggleControl (hitElement, "fire", false) toggleControl (hitElement, "next_weapon", false) toggleControl (hitElement, "previous_weapon", false) toggleControl (hitElement, "sprint", false) toggleControl (hitElement, "aim_weapon", false) toggleControl (hitElement, "vehicle_fire", false) showPlayerHudComponent (hitElement, "ammo", false) showPlayerHudComponent (hitElement, "weapon", false) triggerClientEvent (hitElement, "enableGodMode", hitElement) else destroyElement (hitElement) end 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 ("You left the greenzone", 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
#CroSs Posted December 11, 2015 Share Posted December 11, 2015 function onColShapeEvent( theElement ) local theElementType = getElementType( theElement ) if ( getElementID( source ) == "greenzoneColshape" ) then if ( theElementType == "player" ) then local State = not ( eventName == "onColShapeHit" ) for _, Control in ipairs( { "fire", "next_weapon", "previous_weapon", "sprint", "aim_weapon", "vehicle_fire" } ) do toggleControl( theElement, Control, State ) end for _, Hud in ipairs( { "ammo", "weapon" } ) do showPlayerHudComponent( theElement, Hud, State ) end triggerClientEvent( theElement, ( State and "dis" or "en" ).."ableGodMode", theElement ) elseif ( theElementType == "vehicle" ) then destroyElement( theElement ) end elseif ( source == moneyZoneCol and eventName == "onColShapeHit" and theElementType == "vehicle" ) then setElementVelocity( theElement, 0, 0, 0 ) setElementPosition( theElement, 2018.33, 1534.77, 12.37 ) setElementRotation( theElement, 0, 0, 270 ) local Player = getVehicleOccupant( theElement, 0 ) if ( Player ) then outputChatBox( "You can't enter the moneyzone with your car!", Player, 255, 0, 0 ) end end end addEventHandler( "onColShapeHit", root, onColShapeEvent ) addEventHandler( "onColShapeLeave", root, onColShapeEvent ) Link to comment
Mostafa MohammeD Posted December 11, 2015 Author Share Posted December 11, 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 if not getElementType (hitElement) == "vehicle" then outputChatBox ("You entered the greenzone", hitElement, 255, 0, 0, false) toggleControl (hitElement, "fire", false) toggleControl (hitElement, "next_weapon", false) toggleControl (hitElement, "previous_weapon", false) toggleControl (hitElement, "sprint", false) toggleControl (hitElement, "aim_weapon", false) toggleControl (hitElement, "vehicle_fire", false) showPlayerHudComponent (hitElement, "ammo", false) showPlayerHudComponent (hitElement, "weapon", false) triggerClientEvent (hitElement, "enableGodMode", hitElement) else destroyElement (hitElement) end 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 ("You left the greenzone", 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
Mostafa MohammeD Posted December 11, 2015 Author Share Posted December 11, 2015 function onColShapeEvent( theElement ) local theElementType = getElementType( theElement ) if ( getElementID( source ) == "greenzoneColshape" ) then if ( theElementType == "player" ) then local State = not ( eventName == "onColShapeHit" ) for _, Control in ipairs( { "fire", "next_weapon", "previous_weapon", "sprint", "aim_weapon", "vehicle_fire" } ) do toggleControl( theElement, Control, State ) end for _, Hud in ipairs( { "ammo", "weapon" } ) do showPlayerHudComponent( theElement, Hud, State ) end triggerClientEvent( theElement, ( State and "dis" or "en" ).."ableGodMode", theElement ) elseif ( theElementType == "vehicle" ) then destroyElement( theElement ) end elseif ( source == moneyZoneCol and eventName == "onColShapeHit" and theElementType == "vehicle" ) then setElementVelocity( theElement, 0, 0, 0 ) setElementPosition( theElement, 2018.33, 1534.77, 12.37 ) setElementRotation( theElement, 0, 0, 270 ) local Player = getVehicleOccupant( theElement, 0 ) if ( Player ) then outputChatBox( "You can't enter the moneyzone with your car!", Player, 255, 0, 0 ) end end end addEventHandler( "onColShapeHit", root, onColShapeEvent ) addEventHandler( "onColShapeLeave", root, onColShapeEvent ) نفس الموضوع بردو اللاعب صار يموت في المنطقة والمود خرب وما صار هناك حماية Link to comment
#CroSs Posted December 11, 2015 Share Posted December 11, 2015 function onColShapeEvent( theElement ) local theElementType = getElementType( theElement ) if ( getElementID( source ) == "greenzoneColshape" ) then if ( theElementType == "player" ) then local State = not ( eventName == "onColShapeHit" ) for _, Control in ipairs( { "fire", "next_weapon", "previous_weapon", "sprint", "aim_weapon", "vehicle_fire" } ) do toggleControl( theElement, Control, State ) end for _, Hud in ipairs( { "ammo", "weapon" } ) do showPlayerHudComponent( theElement, Hud, State ) end triggerClientEvent( theElement, ( State and "dis" or "en" ).."ableGodMode", theElement ) elseif ( theElementType == "vehicle" ) then destroyElement( theElement ) end elseif ( source == moneyZoneCol and eventName == "onColShapeHit" and theElementType == "vehicle" ) then setElementVelocity( theElement, 0, 0, 0 ) setElementPosition( theElement, 2018.33, 1534.77, 12.37 ) setElementRotation( theElement, 0, 0, 270 ) local Player = getVehicleOccupant( theElement, 0 ) if ( Player ) then outputChatBox( "You can't enter the moneyzone with your car!", Player, 255, 0, 0 ) end end end addEventHandler( "onColShapeHit", root, onColShapeEvent ) addEventHandler( "onColShapeLeave", root, onColShapeEvent ) نفس الموضوع بردو اللاعب صار يموت في المنطقة والمود خرب وما صار هناك حماية اطرح كود السيرفر كامل بعد ما حطيت كودي + الكلنت Link to comment
Mostafa MohammeD Posted December 11, 2015 Author Share Posted December 11, 2015 السيرفر function onColShapeEvent( theElement ) local theElementType = getElementType( theElement ) if ( getElementID( source ) == "greenzoneColshape" ) then if ( theElementType == "player" ) then local State = not ( eventName == "onColShapeHit" ) for _, Control in ipairs( { "fire", "next_weapon", "previous_weapon", "sprint", "aim_weapon", "vehicle_fire" } ) do toggleControl( theElement, Control, State ) end for _, Hud in ipairs( { "ammo", "weapon" } ) do showPlayerHudComponent( theElement, Hud, State ) end triggerClientEvent( theElement, ( State and "dis" or "en" ).."ableGodMode", theElement ) elseif ( theElementType == "vehicle" ) then destroyElement( theElement ) end elseif ( source == moneyZoneCol and eventName == "onColShapeHit" and theElementType == "vehicle" ) then setElementVelocity( theElement, 0, 0, 0 ) setElementPosition( theElement, 2018.33, 1534.77, 12.37 ) setElementRotation( theElement, 0, 0, 270 ) local Player = getVehicleOccupant( theElement, 0 ) if ( Player ) then outputChatBox( "You can't enter the moneyzone with your car!", Player, 255, 0, 0 ) end end end addEventHandler( "onColShapeHit", root, onColShapeEvent ) addEventHandler( "onColShapeLeave", root, onColShapeEvent ) الكلينكت 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) Link to comment
#CroSs Posted December 11, 2015 Share Posted December 11, 2015 السيرفر function onColShapeEvent( theElement ) local theElementType = getElementType( theElement ) if ( getElementID( source ) == "greenzoneColshape" ) then if ( theElementType == "player" ) then local State = not ( eventName == "onColShapeHit" ) for _, Control in ipairs( { "fire", "next_weapon", "previous_weapon", "sprint", "aim_weapon", "vehicle_fire" } ) do toggleControl( theElement, Control, State ) end for _, Hud in ipairs( { "ammo", "weapon" } ) do showPlayerHudComponent( theElement, Hud, State ) end triggerClientEvent( theElement, ( State and "dis" or "en" ).."ableGodMode", theElement ) elseif ( theElementType == "vehicle" ) then destroyElement( theElement ) end elseif ( source == moneyZoneCol and eventName == "onColShapeHit" and theElementType == "vehicle" ) then setElementVelocity( theElement, 0, 0, 0 ) setElementPosition( theElement, 2018.33, 1534.77, 12.37 ) setElementRotation( theElement, 0, 0, 270 ) local Player = getVehicleOccupant( theElement, 0 ) if ( Player ) then outputChatBox( "You can't enter the moneyzone with your car!", Player, 255, 0, 0 ) end end end addEventHandler( "onColShapeHit", root, onColShapeEvent ) addEventHandler( "onColShapeLeave", root, onColShapeEvent ) ما قلت لك شيل باقي أكواد السيرفر # -- Server addEventHandler( "onResourceStart", resourceRoot, function() moneyZoneCol = createColCuboid( 1993.12, 1519.14, -100, 17.43, 54.24, 117 ) createMarker( 1607.36, 1814.24, -10, "cylinder", 24, 0, 255, 0, 190 ) setTimer( function() for _, Player in ipairs( getElementsWithinColShape( moneyZoneCol, "player" ) ) do givePlayerMoney( Player, 5 ) end end, 2500, 0 ) for _, Player in ipairs( getElementsByType( "player" ) ) do setElementData( Player, "Protected", false ) end for _, RadarArea in ipairs( getElementsByType( "radararea" ) ) do local Colors = { getRadarAreaColor( RadarArea ) } if ( Colors[1] == 0 and Colors[2] == 255 and Colors[3] == 0 and Colors[4] == 127 ) then local Position, Size = { getElementPosition( RadarArea ) }, { getRadarAreaSize( RadarArea ) } setElementID( createColCuboid( Position[1], Position[2], -50, Size[1], Size[2], 7500 ), "greenzoneColshape" ) end end end ) function onColShapeEvent( theElement ) local theElementType = getElementType( theElement ) if ( getElementID( source ) == "greenzoneColshape" ) then if ( theElementType == "player" ) then local State = not ( eventName == "onColShapeHit" ) for _, Control in ipairs( { "fire", "next_weapon", "previous_weapon", "sprint", "aim_weapon", "vehicle_fire" } ) do toggleControl( theElement, Control, State ) end for _, Hud in ipairs( { "ammo", "weapon" } ) do showPlayerHudComponent( theElement, Hud, State ) end setElementData( theElement, "Protected", not State ) elseif ( theElementType == "vehicle" ) then destroyElement( theElement ) end elseif ( source == moneyZoneCol and eventName == "onColShapeHit" and theElementType == "vehicle" ) then setElementVelocity( theElement, 0, 0, 0 ) setElementPosition( theElement, 2018.33, 1534.77, 12.37 ) setElementRotation( theElement, 0, 0, 270 ) local Player = getVehicleOccupant( theElement, 0 ) if ( Player ) then outputChatBox( "You can't enter the moneyzone with your car!", Player, 255, 0, 0 ) end end end addEventHandler( "onColShapeHit", root, onColShapeEvent ) addEventHandler( "onColShapeLeave", root, onColShapeEvent ) # -- Client pirShipMusicCol = createColCuboid( 1997.58, 1523.16, 8, 6, 17.66, 4 ) addEventHandler( "onClientElementDataChange", localPlayer, function( DataName, OldValue ) if ( DataName == "Protected" ) then local NewValue = getElementData( source, DataName ) if ( NewValue ~= OldValue ) then _G[( NewValue and "add" or "remove" ).."EventHandler"]( "onClientPlayerDamage", source, cancelEvent ) end end end ) function RadioChannel( theElement ) if ( theElement == localPlayer ) then setRadioChannel( eventName == "onClientColShapeHit" and 7 or 0 ) end end addEventHandler( "onClientColShapeHit", pirShipMusicCol, RadioChannel ) addEventHandler( "onClientColShapeLeave", pirShipMusicCol, RadioChannel ) Link to comment
Mostafa MohammeD Posted December 11, 2015 Author Share Posted December 11, 2015 create marker ?? ليش Link to comment
Mr.Ronaldo Posted December 11, 2015 Share Posted December 11, 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 local theVehicle = getPedOccupiedVehicle ( hitElement ) if theVehicle then destroyElement(theVehicle) end outputChatBox ("You entered the greenzone", hitElement, 255, 0, 0, false) toggleControl (hitElement, "fire", false) toggleControl (hitElement, "next_weapon", false) toggleControl (hitElement, "previous_weapon", false) toggleControl (hitElement, "sprint", false) toggleControl (hitElement, "aim_weapon", false) toggleControl (hitElement, "vehicle_fire", false) showPlayerHudComponent (hitElement, "ammo", false) showPlayerHudComponent (hitElement, "weapon", false) triggerClientEvent (hitElement, "enableGodMode", hitElement) end 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) addEventHandler ("onColShapeLeave", getRootElement(), function(leaveElement, matchingDimension) if (getElementType (leaveElement) == "player") and (getElementID (source) == "greenzoneColshape") then outputChatBox ("You left the greenzone", 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
Me[Z]oO Posted December 11, 2015 Share Posted December 11, 2015 @ يقدر يسوي ماركر مخفي بدل الكول شيب لانه لما استخدم الكول شيب خرب المود كله Link to comment
Mr.Ronaldo Posted December 11, 2015 Share Posted December 11, 2015 @ يقدر يسوي ماركر مخفي بدل الكول شيب لانه لما استخدم الكول شيب خرب المود كله الله يهديك الماركر ضبطه من حيث المقاسات صعب + الكول شيب مخصص للاماكن وافضل Link to comment
#CroSs Posted December 11, 2015 Share Posted December 11, 2015 create marker ?? ليش . وتخلي قيمة لونه الأخضر 255 والشفافية 127 عشان يصير مكانه حماية createRadarArea باستخدام فنكشن Radararea أنت المفروض أصلًا تسوي Link to comment
Mostafa MohammeD Posted December 13, 2015 Author Share Posted December 13, 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 local theVehicle = getPedOccupiedVehicle ( hitElement ) if theVehicle then destroyElement(theVehicle) end outputChatBox ("You entered the greenzone", hitElement, 255, 0, 0, false) toggleControl (hitElement, "fire", false) toggleControl (hitElement, "next_weapon", false) toggleControl (hitElement, "previous_weapon", false) toggleControl (hitElement, "sprint", false) toggleControl (hitElement, "aim_weapon", false) toggleControl (hitElement, "vehicle_fire", false) showPlayerHudComponent (hitElement, "ammo", false) showPlayerHudComponent (hitElement, "weapon", false) triggerClientEvent (hitElement, "enableGodMode", hitElement) end 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) addEventHandler ("onColShapeLeave", getRootElement(), function(leaveElement, matchingDimension) if (getElementType (leaveElement) == "player") and (getElementID (source) == "greenzoneColshape") then outputChatBox ("You left the greenzone", 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
Mostafa MohammeD Posted December 13, 2015 Author Share Posted December 13, 2015 شباب ليش كل هاي الاشياء كل الي ابيه فقط لما اللاعب يدخل الكول شيب لو بي موتر ينسحب بس هيك Link to comment
iPrestege Posted December 13, 2015 Share Posted December 13, 2015 -- Server Side ! SafahM = createMarker ( x, y, z, "cylinder", size, 0, 0, 0, 0 ) addEventHandler ( "onMarkerHit", SafahM, function ( hitPlayer ) if getElementType ( hitPlayer ) == "player" then toggleControl ( hitPlayer, "fire", false ) elseif getElementType ( hitPlayer ) == "vehicle" then local Player = getVehicleController ( hitPlayer ) outputChatBox ( "* ممنوع دخول المواتر هنا !", Player, 255, 0, 0, true ) destroyElement ( hitPlayer ) end end ) addEventHandler ( "onMarkerLeave", SafahM, function ( leftPlayer ) if getElementType ( leftPlayer ) == "player" then toggleControl ( leftPlayer, "fire", true ) end end ) الإستبدآل في السطر الأول فقط , x, y, z = إحداثيات الماركر ! size = حجم الماركر ! Link to comment
saef Posted December 14, 2015 Share Posted December 14, 2015 -- Server Side ! SafahM = createMarker ( x, y, z, "cylinder", size, 0, 0, 0, 0 ) addEventHandler ( "onMarkerHit", SafahM, function ( hitPlayer ) if getElementType ( hitPlayer ) == "player" then toggleControl ( hitPlayer, "fire", false ) elseif getElementType ( hitPlayer ) == "vehicle" then local Player = getVehicleController ( hitPlayer ) outputChatBox ( "* ممنوع دخول المواتر هنا !", Player, 255, 0, 0, true ) destroyElement ( hitPlayer ) end end ) addEventHandler ( "onMarkerLeave", SafahM, function ( leftPlayer ) if getElementType ( leftPlayer ) == "player" then toggleControl ( leftPlayer, "fire", true ) end end ) الإستبدآل في السطر الأول فقط , x, y, z = إحداثيات الماركر ! size = حجم الماركر ! size = حجم الماركر برستيج انا جربت طلعsize الوان مو حجم جربته غيرت فيه مو راضيه تكبر بس يتغير لوهه وش الوضع Link to comment
a7zan Posted December 14, 2015 Share Posted December 14, 2015 SafahM = createMarker ( x, y, z, "cylinder", size, 0, 0, 0, 0 ) -- x,y,z = الاحداثيات -- "cylinder" = شكل الماركر -- size = حجم الماركر -- 0,0,0,0 = الوان الماركر -- بمـآ ان الشفافية 0 فـ ما راح يظهر لك -- ولو تبيه يظهر تحطه كذا -- 255,255,255,255 -- يصير كذا SafahM = createMarker ( x, y, z, "cylinder", size, 255,255,255,255 ) Link to comment
saef Posted December 14, 2015 Share Posted December 14, 2015 SafahM = createMarker ( x, y, z, "cylinder", size, 0, 0, 0, 0 ) -- x,y,z = الاحداثيات -- "cylinder" = شكل الماركر -- size = حجم الماركر -- 0,0,0,0 = الوان الماركر -- بمـآ ان الشفافية 0 فـ ما راح يظهر لك -- ولو تبيه يظهر تحطه كذا -- 255,255,255,255 -- يصير كذا SafahM = createMarker ( x, y, z, "cylinder", size, 255,255,255,255 ) اها مشكور اخي خالد على الرد انا حسبت الاصفار هي الحجم ^(^ مشكور م قصرت موفق ي رب انت و برستيج و كل العيال Link to comment
iMr.Omar Posted December 14, 2015 Share Posted December 14, 2015 ماعليش على الشطحه بس قيه طريقه اجيب احداثيات الكول شيب + مع مثال ؟ 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