Jump to content

#|_oskar_|#

Members
  • Posts

    897
  • Joined

  • Last visited

Everything posted by #|_oskar_|#

  1. جطه الكود دا ب اول الملف local sm = {} sm.moov = 0 sm.object1,sm.object2 = nil,nil local function removeCamHandler() if(sm.moov == 1)then sm.moov = 0 end end local function camRender() if (sm.moov == 1) then local x1,y1,z1 = getElementPosition(sm.object1) local x2,y2,z2 = getElementPosition(sm.object2) setCameraMatrix(x1,y1,z1,x2,y2,z2) end end addEventHandler("onClientPreRender",root,camRender) function smoothMoveCamera(x1,y1,z1,x1t,y1t,z1t,x2,y2,z2,x2t,y2t,z2t,time) if(sm.moov == 1)then return false end sm.object1 = createObject(1337,x1,y1,z1) sm.object2 = createObject(1337,x1t,y1t,z1t) setElementAlpha(sm.object1,0) setElementAlpha(sm.object2,0) setObjectScale(sm.object1,0.01) setObjectScale(sm.object2,0.01) moveObject(sm.object1,time,x2,y2,z2,0,0,0,"InOutQuad") moveObject(sm.object2,time,x2t,y2t,z2t,0,0,0,"InOutQuad") sm.moov = 1 setTimer(removeCamHandler,time,1) setTimer(destroyElement,time,1,sm.object1) setTimer(destroyElement,time,1,sm.object2) return true end
  2. try this function ReplaceModel(Name,ID) engineImportTXD(engineLoadTXD(Name..'.txd'),ID) engineReplaceModel(engineLoadDFF(Name..'.dff'),ID) setElementModel(localPlayer,ID) end --- function skin1 () ReplaceModel('nanosuit',23) end function skin2 () ReplaceModel('anonymous',24) end function skin3 () ReplaceModel('screamTXD',25) end
  3. اطرح محاولتك
  4. #|_oskar_|#

    hi

    use this addEventHandler("onClientGUIClick", closeB, function() guiSetVisible(mywindow,false) showCursor(false) end,false) ---- addEventHandler("onClientGUIClick", armorB, function() triggerServerEvent("onarmorb", getLocalPlayer()) end,false) or addEventHandler("onClientGUIClick",root,function () if (source == armorB) then triggerServerEvent("onarmorb", getLocalPlayer()) elseif (source == closeB) then guiSetVisible(mywindow,false) showCursor(false) end end)
  5. انا سويتلك الكود من قبل وكان شغال تمام مافي شئ ؟
  6. addEventHandler("onClientGUIClick",resourceRoot,function () if ( source == GUIEditor.button[3] ) then triggerServerEvent ( "FixCar",localPlayer) end end) addEvent( "FixCar", true ) addEventHandler( "FixCar",root,function () local Veh = getPedOccupiedVehicle ( source ) if Veh then fixVehicle(Veh) outputChatBox('[RentSystem]: تم اصلاح سيارتك بنجاح ', source ,0,255,0,true ) else outputChatBox('[RentSystem]: لايوجد سيارة لاصلاحها ', source ,0,255,0,true ) end end)
  7. #|_oskar_|#

    hi

    -- #Client-side addEventHandler("onClientGUIClick",resourceRoot,function () if (source == Button_Name) then triggerServerEvent ( "onPlayerClick",localPlayer) end end) -- #Server-Side addEvent( "onPlayerClick", true ) addEventHandler( "onPlayerClick",resourceRoot,function () if (getPlayerMoney(source) > 100) then setPedArmor(source,50) takePlayerMoney(source,100) else outputChatBox ("you poor",source,150,0,0) end end)
  8. #|_oskar_|#

    hi

    ok try this addEventHandler("onPlayerClick",root,armmor)
  9. #|_oskar_|#

    hi

    use triggerServerEvent
  10. لو تبي تفتح او تقفل التوزيع تكتب ب اف 8 TimeF true -- مفتوح TimeF false -- مقفول
  11. bindKey ("x", "down",function( ) local x, y, z = getElementPosition( localPlayer ) outputChatBox (x .. "," .. y .. "," .. z ) end)
  12. https://forum.multitheftauto.com/viewforum.php?f=164
  13. #|_oskar_|#

    Errors

    GUIEditor = {button = {},window = {},edit = {}} Show = {} addEventHandler("onClientResourceStart", resourceRoot, function () GUIEditor.window[1] = guiCreateWindow(0, 4, 544, 413, "Mini admin panel.By LuckyDude", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF7F7F7F") GUIEditor.edit[1] = guiCreateEdit(9, 266, 510, 126, "This is a new mini adminpanel.Made by LuckyDude", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(15, 29, 242, 82, "Flip Vehicle", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "sa-header") GUIEditor.button[2] = guiCreateButton(15, 183, 242, 73, "Fix Vehicle", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "sa-header") GUIEditor.button[3] = guiCreateButton(282, 29, 242, 73, "50k Money", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], "sa-header") GUIEditor.button[5] = guiCreateButton(287, 183, 242, 73, "10k Money", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[5], "sa-header") addCommandHandler ("mini",gui) guiSetVisible (GUIEditor.window[1], false) --- Events addEventHandler("onClientGUIClick", GUIEditor.button[1], flip, false) addEventHandler("onClientGUIClick", GUIEditor.button[2], fix, false) addEventHandler("onClientGUIClick", GUIEditor.button[3], consoleGiveCash, false) addEventHandler("onClientGUIClick", GUIEditor.button[5], consoleGiveCash2, false) end) --- function dx() dxDrawText("Race Admin Panel", 60, 431, 501, 574, tocolor(0, 0, 0, 255), 2.00, "pricedown", "left", "top", false, false, false, false, false) dxDrawLine(60, 495, 435, 495, tocolor(60, 251, 16, 255), 4, false) end --- function flip ( ) local theVehicle = getPedOccupiedVehicle (localPlayer ) if ( theVehicle and getVehicleController ( theVehicle ) == localPlayer ) then local rx, ry, rz = getElementPosition(theVehicle) setElementPosition(theVehicle, rx, ry, rz +0.3) end end --- function fix () local theVehicle = getPedOccupiedVehicle (localPlayer) if theVehicle and getVehicleController ( theVehicle ) == localPlayer then fixVehicle (theVehicle) outputChatBox ("Your vehicle has been fixed !",255,255,0,true) end end --- function consoleGiveCash () givePlayerMoney (50000 ) end function consoleGiveCash2 () givePlayerMoney (10000 ) end --- Show.dX_ = function() Show.dx = (not Show.dx) removeEventHandler("onClientRender",root, dx) if (Show.dx) then addEventHandler("onClientRender",root, dx) end end function gui( ) guiSetVisible (GUIEditor.window[1],not guiGetVisible (GUIEditor.window[1])) showCursor (guiGetVisible (GUIEditor.window[1])) Show.dX_() end
  14. try this Timer = {} addEventHandler("onPlayerDamage", root,function () if isTimer(Timer[source]) then killTimer(Timer[source]) end Timer[source] = setTimer ( function (source) local Health = getElementHealth (source) if Health < 100 then if isElement(source) then setElementHealth (source,Health+5) end elseif isElement(source) then killTimer(Timer[source]) outputChatBox ("Your Health Full",source,255,0,0) end end,3000,0,source) end)
  15. #|_oskar_|#

    Errors

    GUIEditor = {button = {},window = {},edit = {}} addEventHandler("onClientResourceStart", resourceRoot, function () GUIEditor.window[1] = guiCreateWindow(0, 4, 544, 413, "Mini admin panel.By LuckyDude", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF7F7F7F") GUIEditor.edit[1] = guiCreateEdit(9, 266, 510, 126, "This is a new mini adminpanel.Made by LuckyDude", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(15, 29, 242, 82, "Flip Vehicle", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "sa-header") GUIEditor.button[2] = guiCreateButton(15, 183, 242, 73, "Fix Vehicle", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "sa-header") GUIEditor.button[3] = guiCreateButton(282, 29, 242, 73, "50k Money", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], "sa-header") GUIEditor.button[5] = guiCreateButton(287, 183, 242, 73, "10k Money", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[5], "sa-header") addCommandHandler ("mini",gui) --- Events addEventHandler("onClientGUIClick", GUIEditor.button[1], flip, false) addEventHandler("onClientGUIClick", GUIEditor.button[2], fix, false) addEventHandler("onClientGUIClick", GUIEditor.button[3], consoleGiveCash, false) addEventHandler("onClientGUIClick", GUIEditor.button[3], consoleGiveCash2, false) end) addEventHandler("onClientRender", root, function() dxDrawText("Race Admin Panel", 60, 431, 501, 574, tocolor(0, 0, 0, 255), 2.00, "pricedown", "left", "top", false, false, false, false, false) dxDrawLine(60, 495, 435, 495, tocolor(60, 251, 16, 255), 4, false) end) function flip ( ) local theVehicle = getPedOccupiedVehicle (localPlayer ) if ( theVehicle and getVehicleController ( theVehicle ) == localPlayer ) then local rx, ry, rz = getElementPosition(theVehicle) setElementPosition(theVehicle, rx, ry, rz +0.3) end end function fix () local theVehicle = getPedOccupiedVehicle (localPlayer) if theVehicle and getVehicleController ( theVehicle ) == localPlayer then fixVehicle (theVehicle) outputChatBox ("Your vehicle has been fixed !",255,255,0,true) end end function consoleGiveCash () givePlayerMoney (50000 ) end function consoleGiveCash2 () givePlayerMoney (10000 ) end
  16. guiStaticImageLoadImage
  17. انسخ كود واستبدله بكودك بس خلي الماركر
  18. bindKey ("K","down",function () if isElementWithinMarker(Cplayer,marker) then triggerServerEvent( 'Money', Cplayer ) end end)
  19. #|_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 if isTimer (timer) then killTimer (timer) end 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 timer = setTimer(function () local x,y,z = get_nearest_hospital(gme) triggerServerEvent("Respawn",gme,x,y,z,0,0) end,100,0) outputChatBox(getZoneName ( x, y, z)..")" ) end end)
×
×
  • Create New...