
Dr.Xen
Members-
Posts
412 -
Joined
-
Last visited
Everything posted by Dr.Xen
-
سويت كذا صحيح؟ addEventHandler( "onMarkerHit", 1426.6999511719,545.79998779297,10 "cylinder", function ( element ) if ( getElementType ( element ) == "vehicle" ) then if ( getElementData ( getVehicleController ( element ) , "gang" ) == "ARMY" ) then if ( getElementHealth ( element ) < 100 ) then local 222, 32, 255 = math.random( 255 ), math.random( 255 ), math.random( 255 ) setVehicleColor( element, 222, 32, 255 ) fixVehicle ( element ) addVehicleUpgrade ( element, 1010 ) setVehiclePaintjob ( element, 2 ) end end end end )
-
طيب وين احط احداثيات الماركر xyz
-
طيب وين احط احداثيات اذا لمسها يركب وشم وووكذا ....@
-
انا جمعت فنكشات حق تابل ذا createMarker -- صنع ماركر getElementType -- التحقق من ان الي دخل الماركر سيارة getVehicleController -- تجيب اللاعب الي يسوق السيارة getElementData -- تتأكد من قروب اللاعب getElementModel -- تتأكد ان السيارة سلطان addVehicleUpgrade -- ركب نيترو او جنوط او اي شي setVehiclePaintjob -- تركب وشم Event: "onMarkerHit" ضض جبت العيد رحت اخذ امثلة وخليت كود مسوي ... المهم ممكن تفهموني كيف اخليهم كود صحيح %!
-
مدري وش سويت انا اول مرة اخذ من الويكي @@
-
السلام عليكم ورحمة الله وبركاتهه كيفكم ي حلوين ... بخير ان شاء الله انا سويت كود يعني اخذت من الاخ ويكي اذا في خطا ابيكم تصححوو server function consoleCreateMarker ( thePlayer, commandName ) if ( thePlayer ) then local x, y, z = getElementPosition ( thePlayer ) -- get the player's position -- create a cylindrical marker next to the player: local theMarker = createMarker ( x + 2, y + 2, z, "cylinder", 1.5, 255, 255, 0, 170 ) if ( theMarker ) then -- check if the marker was created successfully outputConsole ( "Marker created successfully", thePlayer ) else outputConsole ( "Failed to create marker", thePlayer ) end end end addCommandHandler ( "createmarker", consoleCreateMarker ) 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", getRootElement(), onPlayerTarget ) function scriptOnTrailerAttach ( towedBy ) thePlayer = getVehicleController ( source ) -- get the controller of the towing vehicle if ( thePlayer ) then outputChatBox ( getPlayerName ( thePlayer ).. " attached a trailer" ) else outputChatBox ( "trailer attached" ) end end addEventHandler ( "onTrailerAttach", getRootElement(), scriptOnTrailerAttach ) function joinTime ( ) setElementData ( source, "joinTime", getTickCount() ) -- Store the current tick count in the player's data with the key 'joinTime' end -- Make our 'joinTime' function be called when a player joins addEventHandler ( "onPlayerJoin", getRootElement(), joinTime ) function showJoinTime ( source, commandName, playerName ) if ( playerName ) then -- see if a player was specified thePlayer = getPlayerFromName ( playerName ) -- get the player element for the specified player if ( thePlayer ) then -- if one was found... local timeOnline = (getTickCount() - getElementData ( thePlayer, "joinTime" )) / 1000 -- calculates the time since join outputChatBox ( getPlayerName ( thePlayer ).." joined "..timeOnline.." seconds ago", source ) -- output the player's join time else outputChatBox ( "Couldn't find '" .. playerName .. "'", source ) -- display an error end else -- display when the player who used the function joined and inform how to see other people's join time local timeOnline = (getTickCount() - getElementData ( source, "joinTime" )) / 1000 -- calculate the time since join outputChatBox ( "You joined " ..timeOnline.." seconds ago", source ) outputChatBox ( "Use 'join_time ' to see other people's join time", source ) end end -- Add a console command joinTime, that takes an optional parameter of a player's name addCommandHandler ( "joinTime", showJoinTime ) function onPlayerTargeted ( targetElem ) if ( getElementType ( targetElem ) == "object" ) and ( getElementModel ( targetElem ) == 3374 ) then destroyElement ( targetElem ) end end addEventHandler ( "onPlayerTarget", getRootElement(), onPlayerTargeted ) -- define the handler function for our command function consoleAddUpgrade ( thePlayer, commandName, id ) -- make sure the player is in a vehicle if ( isPedInVehicle ( thePlayer ) ) then -- convert the given ID from a string to a number local id = tonumber ( id ) -- get the player's vehicle local theVehicle = getPedOccupiedVehicle ( thePlayer ) -- add the requested upgrade to the vehicle local success = addVehicleUpgrade ( theVehicle, id ) -- inform the player of whether the upgrade was added successfully if ( success ) then outputConsole ( getVehicleUpgradeSlotName ( id ) .. " upgrade added.", thePlayer ) else outputConsole ( "Failed to add upgrade.", thePlayer ) end else outputConsole ( "You must be in a vehicle!", thePlayer ) end end -- add the function as a handler for the "addupgrade" command addCommandHandler ( "addupgrade", consoleAddUpgrade ) Clinet addCommandHandler("marker", -- Type In Console 'marker' To Create The Marker function ( player, commandName ) local x,y,z = getElementPosition ( player ) -- Get The Player's Position local Marker = createMarker(x,y,z-1, "cylinder", 2, 255, 0, 0) -- Create Marker To The Position Of Player end ) function planeEnter ( theVehicle, seat, jacked ) -- when someone enters a vehicle local id = getElementModel ( theVehicle ) -- get the model ID of the vehicle if id == 519 or id == 577 then -- if theVehicle is either Shamal or AT-400 local vehicleName = getVehicleName ( theVehicle ) -- get the name of theVehicle outputChatBox ( "Someone stole a " .. vehicleName .. "!" ) -- announce that someone stole the plane end end -- add the event handler to the event addEventHandler ( "onPlayerVehicleEnter", getRootElement(), planeEnter ) -- create a collision shape local nitroColShape = createColSphere ( 1337, 100, 12, 2 ) -- attach the collision shape to an 'onClientColShapeHit' event function onNitroColShapeHit ( hitElement, matchingDimension ) if ( getElementType ( hitElement ) == "vehicle" ) then -- add a nitro upgrade if the element that hit the colshape is a vehicle addVehicleUpgrade ( hitElement, 1010 ) end end addEventHandler ( "onClientColShapeHit", nitroColShape, onNitroColShapeHit ) newvehicle = createVehicle ( 560, 100, 100, 40 ) setVehiclePaintjob ( newvehicle, 2 ) end end ) وجزاكم الله خير @!
-
ممكن كود :"ماركر يصلح الموتر ويزين السيارة يعني يحط نيترو + وشم اذا كانت السيارة اسمها سلطان.. فقط لأاعضاء القروب
-
شوف كذا صحيح #؟؟ GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(221,136,394,376,"لوحة انتقالأت خاصة لقروب أرمي",false) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Button[1] = guiCreateButton(258,116,127,31,"مركز الشرطة",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(9,116,127,31,"مهمة البنك",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(9,176,127,31,"محل اسلحة",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(258,176,127,31,"مهمة سرقت البنك",false,GUIEditor_Window[1]) GUIEditor_Image[1] = guiCreateStaticImage(113,20,193,150,"images/shruk.png",false,GUIEditor_Window[1]) guiSetVisible (GUIEditor_Window[1], false) -- هنا اسم النافذة ووظيفة هذا الكود لما يشتغل المود ما تطلع النافذة بوجهك Maarker = createMarker ( 179.69999694824,1915.3000488281,17 "cylinder" ,1.5 ) addEventHandler ( "onClientMarkerHit", Maarker, function ( hitPlayer ) if ( getElementData ( source , "gang" ) == "ARMY" ) then if getElementType ( hitPlayer ) == "player" then guiSetVisible ( GUIEditor_Window[1], true ) showCursor ( true ) end end ) addEventHandler ( "onClientMarkerHit", Maarker, function ( leftPlayer ) if getElementType ( liftPlayer ) == "player" then guiSetVisible ( GUIEditor_Window[1], false ) showCursor ( false ) end end ) function onGuiClick(button, state, absoluteX, absoluteY) if source == GUIEditor_Button[1] then-- هنا اسم الزر الي اذا ضغطنا عليه ينقلنا setElementPosition(localPlayer,1823.44202,872.06281,10.72149) -- هنا الاحداثيات outputChatBox("تم انتقال الى مركز الشرطة",source,255,255,0,true) setPedRotation(localPlayer,91.98) end end addEventHandler("onClientGUIClick", root, onGuiClick) guiSetProperty(GUIEditor_Button[1],"NormalTextColour", "FF0FFF0F") -- لتليون الزر باللون الاخضر ----------------------------------------------- function onGuiClick(button, state, absoluteX, absoluteY) if source == GUIEditor_Button[2] then setElementPosition(localPlayer,2076.32129,865.88281,6.79159) outputChatBox("تم انتقال الى مهمة البنك",source,255,255,0,true) setPedRotation(localPlayer,91.98) end end addEventHandler("onClientGUIClick", root, onGuiClick) guiSetProperty(GUIEditor_Button[2],"NormalTextColour", "F000F000") -------------------------------------------- function onGuiClick(button, state, absoluteX, absoluteY) if source == GUIEditor_Button[3] then setElementPosition(localPlayer,2076.32129,865.88281,6.79159) outputChatBox("تم انتقال الي محل اسلحة",source,255,255,0,true) setPedRotation(localPlayer,91.98) end end addEventHandler("onClientGUIClick", root, onGuiClick) guiSetProperty(GUIEditor_Button[3],"NormalTextColour", "FFFF00FF") -------------------------------------------- function onGuiClick(button, state, absoluteX, absoluteY) if source == GUIEditor_Button[4] then setElementPosition(localPlayer,2076.32129,865.88281,6.79159) outputChatBox("تم انتقال الى مهمة سرقت البنك",source,0,255,0,true) setPedRotation(localPlayer,91.98) end end addEventHandler("onClientGUIClick", root, onGuiClick) guiSetProperty(GUIEditor_Button[4],"NormalTextColour", "FFFFFF00") --------------------------------------------
-
ذا الكود حق بشر ..بس يفتح اذا ضغط اف2 وللكل ممكن تخليه يفتح فقط للأعضاء القروب يوم يلمس الماركر GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(221,136,394,376,"لوحة انتقالأت خاصة لقروب أرمي",false) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Button[1] = guiCreateButton(258,116,127,31,"مركز الشرطة",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(9,116,127,31,"مهمة البنك",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(9,176,127,31,"محل اسلحة",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(258,176,127,31,"مهمة سرقت البنك",false,GUIEditor_Window[1]) GUIEditor_Image[1] = guiCreateStaticImage(113,20,193,150,"images/shruk.png",false,GUIEditor_Window[1]) guiSetVisible (GUIEditor_Window[1], false) -- هنا اسم النافذة ووظيفة هذا الكود لما يشتغل المود ما تطلع النافذة بوجهك function OpenWin()-- وظيفة فتح النافذة بزر if guiGetVisible ( GUIEditor_Window[1] ) then -- اسم النافذة guiSetVisible ( GUIEditor_Window[1], false )-- اسم النافذة showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( GUIEditor_Window[1], true )-- اسم النافذة showCursor(true) guiSetInputEnabled(true) end end bindKey("F2", "down", OpenWin) function onGuiClick(button, state, absoluteX, absoluteY) if source == GUIEditor_Button[1] then-- هنا اسم الزر الي اذا ضغطنا عليه ينقلنا setElementPosition(localPlayer,1823.44202,872.06281,10.72149) -- هنا الاحداثيات setPedRotation(localPlayer,91.98) end end addEventHandler("onClientGUIClick", root, onGuiClick) guiSetProperty(d,"NormalTextColour", "FF00FF00") -- لتليون الزر باللون الاخضر ----------------------------------------------- function onGuiClick(button, state, absoluteX, absoluteY) if source == GUIEditor_Button[2] then setElementPosition(localPlayer,2076.32129,865.88281,6.79159) setPedRotation(localPlayer,91.98) end end addEventHandler("onClientGUIClick", root, onGuiClick) guiSetProperty(n,"NormalTextColour", "FF00FF00") -------------------------------------------- function onGuiClick(button, state, absoluteX, absoluteY) if source == GUIEditor_Button[3] then setElementPosition(localPlayer,2076.32129,865.88281,6.79159) setPedRotation(localPlayer,91.98) end end addEventHandler("onClientGUIClick", root, onGuiClick) guiSetProperty(n,"NormalTextColour", "FF00FF00") -------------------------------------------- function onGuiClick(button, state, absoluteX, absoluteY) if source == GUIEditor_Button[4] then setElementPosition(localPlayer,2076.32129,865.88281,6.79159) setPedRotation(localPlayer,91.98) end end addEventHandler("onClientGUIClick", root, onGuiClick) guiSetProperty(n,"NormalTextColour", "FF00FF00") --------------------------------------------
-
انا سويت اللوحة باقي كود علشان اخليه للقروب...وماركر يعني اذا لمست الماركر يطلع لك اللوحة اذا كنت من القروب
-
السلام عليكم ورحمة الله وبركاته محتاج كود سيارات للقروب توضيح : انا حطيت من ماب ادتورسيارات وابي اخليهم خاصةة للقروب سيستيم الكود الثاني :"ماركر يصلح الموتر ويزين السيارة يعني يحط نيترو + وشم اذا كانت السيارة اسمها سلطان.. الكود الثالث :" انا سويت لوحة انتقالات بس ابيهم خاصةة للقروب اذا لمس الماركر يفتح فقط لأاعضاء القروب الله لأ يهينكم .. وأآسف اذا كان طلبي كثير
-
السلام عليكم معي كود بسس ذي ماركر اول ما تلمس يموت ابيه اول ما تلمس وانت موب من القروب ينقلك لمكان@ marker = createMarker ( 270.89999389648,-1267.5,63.299999237061, "cylinder", 28, 255, 255, 0, 0 ) -------- function kill(thePlayer) local accName = getAccountName (getPlayerAccount(thePlayer)) if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "SDA7" ) ) then killPed ( thePlayer ) outputChatBox("This vehicle is only for (SDA7) group!", player, 255, 0, 0) end end
-
السلام عليكم .. انا دورت بالقسم كود ااذا احد من العصاباة مات يرجع للمقر لقيته بسس ابيها لقروب ادمن onWasted = function() if getPlayerTeam( source ) and getTeamName( getPlayerTeam( source ) ) == 'No Team' and getElementData ( source , "Group" ) == groupName then function sp( source ) setElementPosition( source, X,Y,Z ) setPedArmor( source, 100 ) giveWeapon( source, 46 ) setPedSkin( source, ID ) end setTimer(sp,1000,1,source) end end addEventHandler ( "onPlayerSpawn", getRootElement(), onWasted ) ذي لقروب سيستيم بسس خلوها لقروب ادمن Admin ولكمو مني جزيل الشكر والتقدير @