Jump to content

#|_oskar_|#

Members
  • Posts

    897
  • Joined

  • Last visited

Everything posted by #|_oskar_|#

  1. #|_oskar_|#

    ...

    الكود مجرب وشغال لو انت اخترت الانتحار بالمسشتفي وانت بالمدينه الاولي يرسبنك بالمستشفي بالمدينه الاولي ولو بالمدينه الثانيه يرسبك بمستشفي المدينه الثانيه بس اهم شئ تضغظ ع الزر عشان يتحقق ب اي مدينه انت ويرسبنك بالمستشفي اللى فيها
  2. ranks = { {'Army',Army}, {'Army',Army}, {'Army',Army} } Marker = createMarker ( 1589.60364, -1287.29236, 19.98314-3.5, "cylinder", 2.5, 0, 255, 255, 255 ) setElementAlpha(Marker, 0) GUIEditor = { staticimage = {}, label = {}, gridlist = {}, window = {}, button = {}} addEventHandler("onClientResourceStart", resourceRoot, function () GUIEditor.window[1] = guiCreateWindow(168, 121, 452, 412, ":: SuperMarket Free ::", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.staticimage[1] = guiCreateStaticImage(257, 130, 155, 123, ":admin/client/images/error.png", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(276, 371, 166, 25, "Created By [L]e3bA | v4.3.1", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[1], 255, 0, 0) GUIEditor.button[1] = guiCreateButton(10, 305, 228, 38, "Buy", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(10, 353, 228, 38, "X", false, GUIEditor.window[1]) grid = guiCreateGridList(9, 28, 229, 267, false, GUIEditor.window[1]) guiGridListAddColumn(grid, "Menu", 0.9) for _, v in ipairs (ranks) do local Row = guiGridListAddRow(grid) guiGridListSetItemText(grid, Row, 1, v[1], false, false) end addEventHandler('onClientMarkerHit', Marker,MarkerHit) end) function MarkerHit( hitPlayer ) if ( hitPlayer == localPlayer ) then guiSetVisible (GUIEditor.window[1], true ) showCursor( true ) end end
  3. اطرح اللوحه
  4. x = 0 addEventHandler("onClientRender", root, function() dxDrawRectangle(x, 154, 245, 250, tocolor(3, 0, 0, 213), true) x = x + 5 if (x >= 300) then x = 300 end end)
  5. مااشوف اي خطاء بس اتاكد ان الملف بجانب كلنت بالميتا او اسم ملف التكسد يكون نفس اسم ss وايدي الاوبجكت اتاكد منه برضو عشان كودك يكون واضح ومفهوم lua وياريت لو تستخدم
  6. قصدك تحط صوره ثري دي ب احداثيات ؟ dxDrawMaterialLine3D
  7. #|_oskar_|#

    ...

    تفضل gme = getLocalPlayer() Gui = {} Gui.window = GuiWindow(290, 132, 210, 315, "spawn", false) Gui.window:setSizable(false) Gui.window:setVisible(false) Gui.radioButton1 = GuiRadioButton(21, 32, 163, 15, "الانتحار للمشفى", false, Gui.window) Gui.radioButton1:setProperty("NormalTextColour", "FFE95014") Gui.radioButton2 = GuiRadioButton(21, 78, 163, 15, "الانتحار للمقر", false, Gui.window) Gui.radioButton2:setProperty("NormalTextColour", "FF0DEF0D") Gui.radioButton3 = GuiRadioButton(21, 123, 167, 15, "الانتحار للبيت", false, Gui.window) Gui.radioButton3:setProperty("NormalTextColour", "FFE95014") Gui.radioButton4 = GuiRadioButton(21, 172, 158, 15, "الانتحار لمركز الشرطة", false, Gui.window) Gui.radioButton4:setProperty( "NormalTextColour", "FF0813F6") ---//////////////// bindKey("F2","down",function () if Gui.window:getVisible() == false then Gui.window:setVisible(true) showCursor(true) else Gui.window:setVisible(false) showCursor(false) end end) ---//////////////// Taple_Groups = { -- {Name=button Name,group=Group Name,x,y,z,interior=interior ID,Dimension=Dimension ID} {Name=Gui.radioButton2,group='army', 203,1911,18 ,interior=0,Dimension=0}, -- المقر {Name=Gui.radioButton4,group='police', 1542,-1676,14 ,interior=0,Dimension=0} -- مركز الشرطه } ---//////////////// addEventHandler ("onClientGUIClick",root,function () for _,v in pairs(Taple_Groups) do if gme:getData("Group") == v.group then if source == v.Name then triggerServerEvent("Respawn",gme,v[1],v[2],v[3],v.interior,v.Dimension) outputChatBox(v[1]..','..v[2]..','..v[3]..','..v.interior..','..v.Dimension) return end end end end) ---//////////////// hs_table = { -- x y z rot view x view y view z [1]={ 1177, -1320, 14.137756347656, 270, 1200.6923828125, -1324.9873046875, 20.398437 }, [2]={ -2666, 630, 13.567041397095, 180, -2664.4501953125, 611.0771484375, 20.454549789429 }, [3]={ 1607, 1818, 10.8203125, 0, 1607.3310546875, 1839.7470703125, 16.8203125 }, [4]={ 2040, -1420, 16.9921875, 90, 2031.8486328125, -1419.5927734375, 22.9921875 }, [5]={ -2200, -2308, 30.625, -45, -2193.5888671875, -2301.6630859375, 36.625 }, [6]={ 208, -65.3, 1.4357746839523, 180, 208.310546875, -75.525390625, 7.4357746839523 }, [7]={ 1245.8, 336.9, 19.40625, -20, 1250.3759765625, 346.681640625, 25.40625 }, [8]={ -317.4, 1056.4, 19.59375, 0, -316.8125, 1066.306640625, 25.59375 }, [9]={ -1514.8, 2527.9, 55.6875, 1.790, -1514.283203125, 2536.412109375, 61.6875 },} ---//////////////// function get_nearest_hospital() local n_loc,min = nil,9999 for k,v in ipairs(hs_table) do local px,py= getElementPosition(gme) local dist = getDistanceBetweenPoints2D(px,py,v[1],v[2]) if dist < min then n_loc = v min = dist end if gme:getInterior() > 0 then break end end local isJailed = exports.GTWjail:isJailed(gme) if not isJailed then return n_loc[1]+math.random(-1,1),n_loc[2]+math.random(-1,1),n_loc[3],n_loc[4],n_loc[5],n_loc[6],n_loc[7] else return -2965+math.random(-5,5),2305+math.random(-5,5),9,270 end end ---//////////////// addEventHandler ("onClientGUIClick",root,function () if source == Gui.radioButton1 then local x,y,z = get_nearest_hospital(gme) triggerServerEvent("Respawn",gme,x,y,z,0,0) outputChatBox(getZoneName ( x, y, z)..")" ) end end) ------ لاتعدل شئ هنا addEvent ('Respawn',true ) addEventHandler('Respawn', root,function (x,y,z,interior,Dimension) source:setData('Respawn',table.concat({x,y,z,interior,Dimension},',')) end) ------ لاتعدل شئ هنا timer = {} addEventHandler ('onPlayerWasted',root,function () local x,y,z,interior,Dimension = unpack(split(source:getData('Respawn'),',')) timer[source] = Timer(function (source) if isElement(source) then source:spawn(x,y,z,0,source:getModel(),interior,Dimension) outputChatBox('Area: '..getZoneName (x,y,z)..' ('..getZoneName (x,y,z, true )..')' ,source,190,0,0,true) end end,1800,1,source) --- وقت الريسباون تقدر تعدل عليه end) وحط بالميتا السطر دا <oop>true</oop>
  8. 16000 -- ايدي الاوبجكت غير لون الاوبجكت بالشادر dxCreateShader dxSetShaderValue dxCreateTexture engineApplyShaderToWorldTexture
  9. كلنت dxDrawText bindKey سيرفر triggerClientEvent isObjectInACLGroup او ممكن تحمل مود العاجل جاهز
  10. #|_oskar_|#

    ...

    سوي الاحداثيات مع المود نفسه افضل او اطرح كود السباون حق المستشفي اسويها لك
  11. السياره كلنت ماينفع لازم تحطها سيرفر عشان تنقل البيد لها
  12. استخدم guiGridListGetItemText عشان تجيب الكلام اللى بالقريد وتحطه بالايديت
  13. #|_oskar_|#

    ...

    GUIEditor = { window = {}, radiobutton = {}} GUIEditor.window[1] = guiCreateWindow(290, 132, 210, 315, "spawn", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.radiobutton[1] = guiCreateRadioButton(21, 32, 163, 15, "الانتحار للمشفى", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.radiobutton[1], "NormalTextColour", "FF882BD0") GUIEditor.radiobutton[2] = guiCreateRadioButton(21, 78, 163, 15, "الانتحار للمقر", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.radiobutton[2], "NormalTextColour", "FF0DEF0D") GUIEditor.radiobutton[3] = guiCreateRadioButton(21, 123, 167, 15, "الانتحار للبيت", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.radiobutton[3], "NormalTextColour", "FFE95014") GUIEditor.radiobutton[4] = guiCreateRadioButton(21, 172, 158, 15, "الانتحار لمركز الشرطة", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.radiobutton[4], "NormalTextColour", "FF0813F6") function narotu() if guiGetVisible(GUIEditor.window[1]) == false then guiSetVisible(GUIEditor.window[1],true) showCursor(true) else guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end bindKey("F2","down",narotu) --/////////////////////////////////////////// -- تعديلك كله هنا حط الاحداثيات ورقم الانترو ورقم العالم واسم القروب -- Syntax triggerServerEvent("spawn",localPlayer,x,y,z,interior,Dimension) -- x,y,z الاحداثيات -- interior رقم البيت -- Dimension رقم العالم --/////////////////////////////////////////// addEventHandler ("onClientGUIClick",root,function () if source == GUIEditor.radiobutton[1] then triggerServerEvent("spawn",localPlayer,1057,1402,6,0,0) -- المستشفى elseif source == GUIEditor.radiobutton[2] then if getElementData (localPlayer, "Group" ) == "army" then --- غير اسم القروب الى قروبك triggerServerEvent("spawn",localPlayer,203,1911,18,0,0) -- مقر الجيش end elseif source == GUIEditor.radiobutton[3] then triggerServerEvent("spawn",localPlayer,2367,-1127,1051,8,0) -- البيت elseif source == GUIEditor.radiobutton[4] then if getElementData (localPlayer, "Group" ) == "police" then --- غير اسم القروب الى قروبك triggerServerEvent("spawn",localPlayer,1543,-1675,14,0,0) -- مركز الشرطه end end end) ------ لاتعدل شئ هنا function spawn(Element,x,y,z,int,dim) setElementPosition (Element,x,y,z) setElementInterior(Element,int) setElementDimension (Element, dim ) end ------ لاتعدل شئ هنا addEvent ( "spawn",true ) addEventHandler ( "spawn", root,function (x,y,z,int,dim) setElementData (source,"x",x) setElementData (source,"y",y) setElementData (source,"z",z) setElementData (source,"int",int) setElementData (source,"dim",dim) spawn(source,x,y,z,int,dim) end) ------ لاتعدل شئ هنا timer = {} addEventHandler ("onPlayerSpawn",root,function () local x,y,z,int,dim = getElementData (source,"x"),getElementData (source,"y"),getElementData (source,"z"), getElementData (source,"int"),getElementData (source,"dim") timer[source] = setTimer(spawn,1500, 1,source,x,y,z,int,dim) --- بس عدل ع الوقت حق الريسباون outputChatBox("Area: "..getZoneName ( x, y, z).." ("..getZoneName ( x, y, z, true )..")" ,source,190,0,0,true) end) بالنسبه للبيت سويه انت لاني مااعندي معلومات عنه وطريقته
  14. #|_oskar_|#

    ...

    لو تبي لكل اللاعبين فى طريقه اسهل
  15. #|_oskar_|#

    ...

    اذا تقصد انه يرسبن بالمكان اللى ختاره استخدم الداتا setElementData getElementData
  16. ليه شكلي معيد بشي bool setElementData ( element theElement, string key, var value [, bool synchronize = true ] ) نسيت اول ارقمنت وهو الالمنت يعني يصير كدا setElementData(element,"Data","yes")
  17. لو لقيتها مضافها ب اي قروب امسحها user.* افتح الاسل وابحث عن Everyone بس لاتمسحها من قروب اسمه
  18. local Team = getPlayerTeam(getLocalPlayer()) if Team and getTeamName(Team) == 'Police' then else -- Your Code end
×
×
  • Create New...