-
Posts
69 -
Joined
-
Last visited
Everything posted by DaHoM
-
مشكور أخي طريقتك زبطت , ولكن صعبه شوي ضض مشكور اخي, لسه طريقتك نجحت , عملت عليها لوحة اخر غير التسجيل
-
بس يا أخوان كان في المود القديم مكتوب true وكانت زابطه @Abdul KariM @iMr.WiFi..! @TAPL
-
اما كذا بس يعني؟؟ متأكد ؟؟
-
انا جديد على البرمجة ممكن تسويلي اياه لاني مو عارفو اصلن
-
السلام عليكم ورحمة الله وبركاتة اخباركم ان شاء لله بخير ؟ انا يا شباب قمت بعملية استبدأل لوحة تسجيل دخول لقيم مود اوكي ؟ بس لما بدلتها وكل شي شغلت القيم مود , هو شتغل ودست تاب وطلعو التيمات ولكن الانترو ما اشتغل ولا اللوحة يعني بقى السيرفر بدون قيم مود انا لااحظت وانا استبدل انو قيم الأحجام الخاصة باللوحة الأصلة اعشار مثال dxDrawLine(0.265, 0.25, 0.548, 0.0125, ولكن الأحجام حقتي كانت بهذا الشكل dxDrawLine(508, 381, 872, 381, وأذا كانت هذه المشكلة قلولي كيف احول الحجم من ارقام صحيحه الى اعشار اللوحة التسجيل وللوحة تسجيل دخول local x, y = guiGetScreenSize() local rx, ry = (x/800), (y/600) addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.button[1] = guiCreateButton(678, 291, 134, 25, "Login", true) guiSetAlpha(GUIEditor.button[1], 0.40) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEdior.button[1], "NormalTtextColour", "CBFDFDFD") GUIEditor.button[2] = guiCreateButton(620, 408, 147, 28, "Create Account", true) guiSetAlpha(GUIEditor.button[2], 0.61) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "CBFDFDFD") GUIEditor.button[3] = guiCreateButton(633, 506, 105, 24, "Restart Video", true) guiSetAlpha(GUIEditor.button[3], 0.40) guiSetFont(GUIEditor.button[3], "default-bold-small") guiSetProperty(GUIEditor.button[3], "NormalTextColour", "CBFDFDFD") GUIEditor.button[4] = guiCreateButton(0.14, 0.84, 0.07, 0.03, "Visit Website ", true) guiSetAlpha(GUIEditor.button[4], 0.05) guiSetFont(GUIEditor.button[4], "default-bold-small") guiSetProperty(GUIEditor.button[4], "NormalTextColour", "CBFDFDFD") GUIEditor.label[1] = guiCreateLabel(573, 286, 82, 15, "Save Password ", true) GUIEditor.label[4] = guiCreateLabel(611, 75, 232, 23, "Server Grand Arab Wars", true) guiSetAlpha(GUIEditor.label[4], 0.72) local font0_ntailub = guiCreateFont("Fonts/ntailub.ttf", 13) guiSetFont(GUIEditor.label[4], font0_ntailub) GUIEditor.checkbox[1] = guiCreateCheckBox(554, 286, 82, 15, "", true, true) GUIEditor.edit[1] = guiCreateEdit(583, 160, 219, 23, "", true) GUIEditor.edit[2] = guiCreateEdit(583, 234, 219, 23, "", true) guiEditSetMasked(GUIEditor.edit[2],true) -- GUIEditor.button[5] = guiCreateButton(681, 316, 134, 25, "Register", true) guiSetAlpha(GUIEditor.button[5], 0.40) guiSetFont(GUIEditor.button[5], "default-bold-small") guiSetProperty(GUIEditor.button[5], "NormalTextColour", "CBFDFDFD") GUIEditor.button[6] = guiCreateButton(620, 408, 147, 28, "Back", true) guiSetAlpha(GUIEditor.button[6], 0.61) guiSetFont(GUIEditor.button[6], "default-bold-small") guiSetProperty(GUIEditor.button[6], "NormalTextColour", "CBFDFDFD") GUIEditor.label[5] = guiCreateLabel(572, 316, 82, 15, "Show Password", true) GUIEditor.checkbox[2] = guiCreateCheckBox(553, 316, 101, 15, "", false, true) GUIEditor.edit[3] = guiCreateEdit(583, 160, 219, 23, "", true) GUIEditor.edit[4] = guiCreateEdit(583, 219, 219, 23, "", true) guiEditSetMasked(GUIEditor.edit[4],true) GUIEditor.edit[5] = guiCreateEdit(582, 273, 219, 23, "", true) guiEditSetMasked(GUIEditor.edit[5],true) end ) function() dxDrawRectangle(452, 65, 508, 476, tocolor(127, 127, 127, 156), false) dxDrawRectangle(508, 383, 364, 80, tocolor(0, 1, 0, 131), false) dxDrawRectangle(554, 118, 271, 167, tocolor(0, 0, 0, 98), false) dxDrawRectangle(913, 143, 0, 259, tocolor(255, 255, 255, 255), false) dxDrawText("User Name", 646, 133, 726, 154, tocolor(254, 254, 254, 248), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Password", 646, 207, 726, 228, tocolor(254, 254, 254, 248), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawLine(451, 57, 451, 540, tocolor(162, 162, 162, 173), 1, false) dxDrawLine(959, 57, 959, 540, tocolor(162, 162, 162, 173), 1, false) dxDrawLine(451, 540, 960, 540, tocolor(162, 162, 162, 173), 1, false) dxDrawText("New Account ?", 515, 388, 640, 408, tocolor(62, 174, 83, 131), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawLine(553, 118, 553, 284, tocolor(145, 145, 145, 173), 1, false) dxDrawLine(825, 118, 825, 284, tocolor(145, 145, 145, 173), 1, false) dxDrawRectangle(509, 463, 364, 1, tocolor(255, 255, 255, 255), false) dxDrawLine(508, 381, 872, 381, tocolor(255, 255, 255, 255), 1, false) dxDrawText("You Can't Create more than One Account ", 509, 443, 771, 458, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText("Just", 777, 443, 839, 472, tocolor(179, 0, 0, 254), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawLine(554, 284, 825, 284, tocolor(145, 145, 145, 173), 1, false) dxDrawLine(553, 118, 824, 118, tocolor(145, 145, 145, 173), 1, false) dxDrawLine(491, 351, 907, 351, tocolor(1, 1, 1, 113), 3, false) if CurrentPanel == "Register" then dxDrawRectangle(508, 383, 364, 80, tocolor(0, 1, 0, 131), false) dxDrawRectangle(554, 118, 271, 195, tocolor(0, 0, 0, 99), false) dxDrawRectangle(913, 143, 0, 259, tocolor(255, 255, 255, 255), false) dxDrawText("Have you registered before ?", 515, 388, 640, 408, tocolor(62, 174, 83, 131), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawLine(553, 118, 553, 313, tocolor(92, 92, 92, 113), 1, false) dxDrawLine(825, 118, 825, 313, tocolor(145, 145, 145, 173), 1, false) dxDrawRectangle(509, 463, 364, 1, tocolor(255, 255, 255, 255), false) dxDrawLine(508, 381, 872, 381, tocolor(255, 255, 255, 255), 1, false) dxDrawText("You Can't Create more than One Account ", 509, 443, 771, 458, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText("Just", 777, 443, 839, 472, tocolor(179, 0, 0, 254), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawLine(553, 313, 824, 313, tocolor(145, 145, 145, 173), 1, false) dxDrawLine(553, 118, 824, 118, tocolor(145, 145, 145, 173), 1, false) dxDrawLine(491, 351, 907, 351, tocolor(0, 0, 0, 99), 3, false) dxDrawText("Confirm Password", 629, 252, 744, 273, tocolor(244, 244, 244, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) else dxDrawRectangle(508, 384, 364, 80, tocolor(0, 1, 0, 131), false) dxDrawRectangle(913, 143, 0, 259, tocolor(255, 255, 255, 255), false) dxDrawRectangle(509, 463, 364, 1, tocolor(255, 255, 255, 255), false) dxDrawLine(508, 381, 872, 381, tocolor(255, 255, 255, 255), 1, false) end end اتمنى الرد بأسرع وقت ممكن
-
السلام عليكم ورحمة الله وبركاتة كيف الحال ان شاء الله بخير الزبدة ابي احول ذا الكود الى انو يحسب من داتافلوس الاعبين بلله سريع local playersWarping = { } local playersInInterior = { } local lastWarp = { } local blipsState = { } local interiors = { [ 1 ] = { 1, 244.4119, 305.0329, 999.1484 }, [ 2 ] = { 2, 266.5009, 304.9670, 999.1484 }, [ 3 ] = { 4, 302.1809, 300.7229, 999.1484 }, [ 4 ] = { 3, 2496.0065, -1692.8518, 1014.7421 }, [ 5 ] = { 5, 1260.9622, -785.4465, 1091.9062 }, [ 6 ] = { 2, 2468.5056, -1698.2500, 1013.5078 }, [ 7 ] = { 5, 2352.4500, -1180.9650, 1027.976 }, [ 8 ] = { 8, 2807.6347, -1174.2792, 1025.5703 }, [ 9 ] = { 5, 318.6222, 1114.7529, 1083.8828 }, [ 10 ] = { 12, 2324.4501, -1149.2780, 1050.7100 }, [ 11 ] = { 5, 140.2478, 1366.3989, 1083.8593 }, [ 12 ] = { 4, -260.6278, 1456.6441, 1084.3671 }, [ 13 ] = { 8, -42.5800, 1405.6099, 1084.4269 }, [ 14 ] = { 6, -68.8081, 1351.4376, 1080.2109 }, [ 15 ] = { 5, 2233.6950, -1114.8648, 1050.8828 }, [ 16 ] = { 8, 2365.3103, -1135.4029, 1050.8750 }, [ 17 ] = { 11, 2282.9099, -1140.2900, 1050.8980 }, [ 18 ] = { 10, 2270.0161, -1210.4719, 1047.5625 }, [ 19 ] = { 6, 2333.1760, -1077.0630, 1049.0230 }, [ 20 ] = { 2, 491.1, 1398.8, 1080.2 }, [ 21 ] = { 2, 447.0, 1397.2, 1084.3 }, [ 22 ] = { 5, 22.875, 1403.51, 1084.4 }, [ 23 ] = { 5, 226.62, 1114.29, 1080.9 }, [ 24 ] = { 6, 234.16, 1064.05, 1084.21 }, [ 25 ] = { 9, 83.05, 1322.47, 1083.86 }, [ 26 ] = { 10, 23.98, 1340.27, 1084.37 }, [ 27 ] = { 15, 376.85, 1417.34, 1081.32 }, [ 28 ] = { 15, 295.1, 1472.2, 1080.2 }, [ 29 ] = { 3, 2495.97852, -1692.08447, 1014.74219 } } local housesLimit = tonumber ( get ( "maxHouses" ) ) or 999999999 addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, house in ipairs ( getHousingList ( ) ) do createHouse ( house ) end for _, interior in ipairs ( interiors ) do local int, x, y, z = unpack ( interior ) local exitColshape = createColTube ( x, y, ( z - 0.5 ), 1.3, 2.5 ) setElementInterior ( exitColshape, int ) addEventHandler ( "onColShapeHit", exitColshape, onInteriorLeave ) end end ) addEvent ( "housing:isPlayerInsideHouse", true ) addEventHandler ( "housing:isPlayerInsideHouse", root, function ( ) local dimension = getElementDimension ( source ) local houseName = houseIDS [ dimension ] if ( houseName and housesCreated [ houseName ] ) then playersInInterior [ source ] = houseName housesCreated [ houseName ].playersInside [ source ] = true lastWarp [ source ] = getTickCount ( ) local url = housesCreated [ houseName ].data.music if ( url and url ~= "" ) then triggerClientEvent ( source, "housing:setStreamMode", source, true, url ) end end end ) function destroyTheBlips ( ) destroyHouseBlips ( source ) blipsState [ source ] = nil end addEventHandler ( "onPlayerQuit", root, destroyTheBlips ) addEventHandler ( "onPlayerLogout", root, destroyTheBlips ) function onHouseColshapeHit ( hitElement ) if ( getElementType ( hitElement ) == "player" and not isPedInVehicle ( hitElement ) ) then local houseName = getElementData ( source, "houseName" ) if ( houseName ) then bindKey ( hitElement, "Z", "down", viewHouseInformation, housesCreated [ houseName ] [ "data" ], source ) exports["UIPtexts"]:output ( "* Housing: Press 'Z' to open house GUI.", hitElement, 255,255,0, true, 8 ) outputChatBox ( "* Press 'Z' to open house GUI", hitElement, 255, 255, 0 ) end end end function onHouseColshapeLeave ( leaveElement ) if ( getElementType ( leaveElement ) == "player" ) then unbindKey ( leaveElement, "Z", "down", viewHouseInformation ) elseif ( getElementType ( leaveElement ) == "vehicle" ) then local seats = getVehicleMaxPassengers ( leaveElement ) for seat = 0, seats do local occupant = getVehicleOccupants ( leaveElement ) [ seat ] if ( occupant ) then unbindKey ( occupant, "Z", "down", viewHouseInformation ) end end end end function viewHouseInformation ( thePlayer, _, _, houseData, colshape ) if ( houseData and type ( houseData ) == "table" ) then if ( colshape and isElement ( colshape ) ) then if ( isElementWithinColShape ( thePlayer, colshape ) ) then local accountName = getPlayerAccountName ( thePlayer ) triggerClientEvent ( thePlayer, "housing:showHouseInformation", thePlayer, houseData, accountName ) else unbindKey ( thePlayer, "Z", "down", viewHouseInformation ) end end end end function onInteriorLeave ( leaveElement ) if ( getElementType ( leaveElement ) == "player" ) then if ( playersInInterior [ leaveElement ] ) and ( not playersWarping [ leaveElement ] ) and ( getTickCount ( ) - lastWarp [ leaveElement ] >= 3000 ) then setPlayerInInterior ( leaveElement, playersInInterior [ leaveElement ] ) end end end addEvent ( "housing:enterInterior", true ) addEventHandler ( "housing:enterInterior", root, function ( houseName ) local accountName = getPlayerAccountName ( source ) local houseData = housesCreated [ houseName ] [ "data" ] local dimension = houseData.dimension local interior = houseData.interior local doorStatus = houseData.interiorState if ( doorStatus ~= "Open" ) then if ( accountName ~= housesCreated [ houseName ] [ "data" ].owner ) then return triggerClientEvent ( source, "housing:showInfo", source, "error", "The house is locked!" ) end end setPlayerInInterior ( source, houseName ) end ) function setPlayerInInterior ( thePlayer, houseName ) if ( houseName ) then local houseData = housesCreated [ houseName ] [ "data" ] local dimension = houseData.dimension local interior = houseData.interior toggleAllControls ( thePlayer, false ) fadeCamera ( thePlayer, false, 1 ) playersWarping [ thePlayer ] = true setTimer ( function ( thePlayer, houseName, interior, dimension, streamURL ) if ( isElement ( thePlayer ) ) then if ( getElementInterior ( thePlayer ) == interiors [ interior ] [ 1 ] ) then x, y, z = getElementPosition ( housesCreated [ houseName ] [ "pickup" ] ) int, dimension = 0, 0 else int, x, y, z = unpack ( interiors [ interior ] ) end setElementInterior ( thePlayer, int, x, y, z ) setElementDimension ( thePlayer, dimension ) fadeCamera ( thePlayer, true, 1 ) toggleAllControls ( thePlayer, true ) playersWarping [ thePlayer ] = nil lastWarp [ thePlayer ] = getTickCount ( ) if ( int > 0 ) then if ( streamURL and streamURL ~= "" ) then triggerClientEvent ( thePlayer, "housing:setStreamMode", thePlayer, true, streamURL ) end housesCreated [ houseName ].playersInside [ thePlayer ] = true playersInInterior [ thePlayer ] = houseName else housesCreated [ houseName ].playersInside [ thePlayer ] = nil playersInInterior [ thePlayer ] = nil triggerClientEvent ( thePlayer, "housing:setStreamMode", thePlayer, false ) end triggerEvent ( ( dimension == 0 and "onPlayerLeaveHouse" or "onPlayerEnterHouse" ), thePlayer, houseName ) end end ,1000, 1, thePlayer, houseName, interior, dimension, houseData.music ) end end addEvent ( "housing:buyHouse", true ) addEventHandler ( "housing:buyHouse", root, function ( houseName ) if ( not isPlayerLoggedIn ( source ) ) then return triggerClientEvent ( source, "housing:showInfo", source, "error", "You must be logged in." ) end local house = housesCreated [ houseName ] if ( house [ "data" ] [ "forSale" ] == "Yes" ) then local price = tonumber ( house [ "data" ] [ "price" ] ) local owner = house [ "data" ] [ "owner" ] local accountName = getPlayerAccountName ( source ) if ( #getAccountHouses ( accountName ) >= housesLimit ) then return triggerClientEvent ( source, "housing:showInfo", source, "error", "You can't buy more than ".. housesLimit .." houses." ) end if ( getPlayerMoney ( source ) >= price ) then if ( owner ~= "" ) then local playerOwner = getAccountPlayer ( getAccount ( owner ) ) if ( not playerOwner ) then return triggerClientEvent ( source, "housing:showInfo", source, "error", "You can't buy the house because the owner is not online." ) end givePlayerMoney ( playerOwner, price ) outputChatBox ( "Housing: ".. getPlayerName ( source ):gsub ( "#%x%x%x%x%x%x", "" ) .." has bought your ".. houseName .." house for $".. convertNumber ( price ) ..".", playerOwner, 0, 255, 0 ) if ( blips [ playerOwner ] and isElement ( blips [ playerOwner ] [ houseName ] ) ) then destroyElement ( blips [ playerOwner ] [ houseName ] ) end end if ( house [ "pickup" ] and isElement ( house [ "pickup" ] ) ) then setPickupType ( house [ "pickup" ], 3, 1272 ) end local cDate, cTime = getCurrentDateAndTime ( ) setHouseData ( houseName, { "houseOwner", "housePrice", "houseForSale", "buyDate", "houseInteriorState" }, { accountName, price, "No", ( cDate .." - ".. cTime ), "Closed" } ) takePlayerMoney ( source, price ) triggerClientEvent ( source, "housing:showHouseInformation", source, housesCreated [ houseName ] [ "data" ], accountName ) triggerClientEvent ( source, "housing:showInfo", source, "info", "You bought the house for $".. convertNumber ( price ) .."." ) else triggerClientEvent ( source, "housing:showInfo", source, "error", "You need an additional $".. convertNumber ( price - getPlayerMoney ( source ) ) .."." ) end else triggerClientEvent ( source, "housing:showInfo", source, "error", "The house is not for sale." ) end end ) addEvent ( "housing:toggleSaleStatus", true ) addEventHandler ( "housing:toggleSaleStatus", root, function ( houseName ) if ( not isPlayerLoggedIn ( source ) ) then return triggerClientEvent ( source, "housing:showInfo", source, "error", "You must be logged in." ) end local house = housesCreated [ houseName ] local accountName = getPlayerAccountName ( source ) if ( house [ "data" ] [ "owner" ] == accountName ) then local newState = ( house [ "data" ].forSale == "No" and "Yes" or "No" ) local pickupModel = ( newState == "Yes" and 1273 or 1272 ) setPickupType ( house [ "pickup" ], 3, pickupModel ) setHouseData ( houseName, { "houseForSale", "houseInteriorState" }, { newState, ( newState == "Yes" and "Open" or "Closed" ) } ) triggerClientEvent ( source, "housing:showInfo", source, "info", ( newState == "Yes" and "The house is now for sale." or "The house is no longer for sale." ) ) triggerClientEvent ( source, "housing:showHouseInformation", source, housesCreated [ houseName ] [ "data" ], accountName ) else triggerClientEvent ( source, "housing:showInfo", source, "error", "You're not the owner of this house." ) end end ) local Command1 = get("CreateHouse") addCommandHandler ( Command1, function ( thePlayer ) local accountName = getPlayerAccountName ( thePlayer ) if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( get ( "restrictedACL" ) ) ) ) then triggerClientEvent ( thePlayer, "housing:showHousingManager", thePlayer, getHousingList ( ), interiors ) end end ) addEvent ( "housing:createHouse", true ) addEventHandler ( "housing:createHouse", root, function ( houseName, housePrice, housePosition, interior ) local added, errorMsg = addHouseToDatabase ( houseName, housePrice, split ( housePosition, " ," ), interior ) if ( added ) then triggerClientEvent ( source, "housing:returnHouses", source, getHousingList ( ) ) outputChatBox ( "Housing manager: You have successfully created the house.", source, 0, 255, 0 ) else outputChatBox ( "Housing manager: ".. errorMsg or "Unknown" ..".", source, 255, 0, 0 ) end end ) addEvent ( "housing:removeHouse", true ) addEventHandler ( "housing:removeHouse", root, function ( houseName ) local removed, errorMsg = removeHouseFromDatabase ( houseName ) if ( removed ) then outputChatBox ( "Housing manager: The house has been successfully removed.", source, 0, 255, 0 ) triggerClientEvent ( source, "housing:returnHouses", source, getHousingList ( ) ) else outputChatBox ( "Housing manager: ".. errorMsg or "Unknown" ..".", source, 255, 0, 0 ) end end ) addEvent ( "housing:editHouse", true ) addEventHandler ( "housing:editHouse", root, function ( houseName, houseName_, houseOwner, housePrice, housePosition, interiorID ) if ( houseName ) then local toSet = { [ "houseName" ] = { houseName_, "name" }, [ "houseOwner" ] = { houseOwner, "owner" }, [ "housePrice" ] = { housePrice, "price" }, [ "housePosition" ] = { toJSON ( split ( housePosition, " ," ) ), "position" }, [ "houseInterior" ] = { interiorID, "interior" } } for dataName, dataValue in pairs ( toSet ) do if ( housesCreated [ houseName ] [ "data" ] [ dataValue [ 2 ] ] ~= dataValue [ 1 ] ) then setHouseData ( houseName, dataName, dataValue [ 1 ] ) end end triggerClientEvent ( source, "housing:returnHouses", source, getHousingList ( ) ) outputChatBox ( "Housing manager: The house has been successfully updated.", source, 0, 255, 0 ) end end ) addEvent ( "housing:setDoorStatus", true ) addEventHandler ( "housing:setDoorStatus", root, function ( houseName ) local accountName = getPlayerAccountName ( source ) local houseData = housesCreated [ houseName ] [ "data" ] local doorStatus = houseData.interiorState local newDoorStatus = ( doorStatus == "Open" and "Closed" or "Open" ) setHouseData ( houseName, "houseInteriorState", newDoorStatus ) triggerClientEvent ( source, "housing:showInfo", source, "info", "The house is now ".. ( newDoorStatus == "Closed" and "locked" or "open" ) .."." ) triggerClientEvent ( source, "housing:showHouseInformation", source, housesCreated [ houseName ] [ "data" ], accountName ) end ) addEvent ( "housing:setSalePrice", true ) addEventHandler ( "housing:setSalePrice", root, function ( houseName, housePrice ) if ( not isPlayerLoggedIn ( source ) ) then return triggerClientEvent ( source, "housing:showInfo", source, "error", "You must be logged in." ) end local house = housesCreated [ houseName ] local accountName = getPlayerAccountName ( source ) if ( house [ "data" ] [ "owner" ] == accountName ) then if ( house [ "data" ] [ "forSale" ] == "No" ) then setHouseData ( houseName, "housePrice", housePrice ) triggerClientEvent ( source, "housing:showInfo", source, "info", "Price set to $".. convertNumber ( housePrice ) ) triggerClientEvent ( source, "housing:showHouseInformation", source, housesCreated [ houseName ] [ "data" ], accountName ) else triggerClientEvent ( source, "housing:showInfo", source, "error", "You can't set the price during sale." ) end else triggerClientEvent ( source, "housing:showInfo", source, "error", "You're not the owner of this house." ) end end ) addCommandHandler ( "houses", function ( thePlayer ) blipsState [ thePlayer ] = ( not blipsState [ thePlayer ] ) if ( blipsState [ thePlayer ] ) then createHouseBlips ( thePlayer ) else destroyHouseBlips ( thePlayer ) end end ) addCommandHandler ( "housemusic", function ( thePlayer, _, ... ) local url = table.concat ( { ... }, " " ) if ( url ~= "" ) then local houseName = playersInInterior [ thePlayer ] if ( houseName ) then local house = housesCreated [ houseName ] if ( house ) then if ( house.data.owner == getPlayerAccountName ( thePlayer ) ) then setHouseData ( houseName, "streamURL", url ) outputChatBox ( "House music set!", thePlayer, 0, 255, 0 ) end end end end end ) addEventHandler ( "onPlayerWasted", root, function ( ) if ( getElementInterior ( source ) > 0 ) then local houseName = playersInInterior [ source ] if ( houseName ) then local house = housesCreated [ houseName ] if ( house ) then housesCreated [ houseName ].playersInside [ source ] = nil end end playersInInterior [ source ] = nil end end ) ذا كود السيرفر
-
يا اخوان ابي لكل الناس الماركر مو لقروب + اشخص يقدر يعبي مرة بس منو بس في حال اذا مات يعبي مرة اخر , وكذا كل ما يموت يقدر يعبي مرة واحده
-
السلام عليكم ورحمة الله وبركاتة كيف الحال ان شاء الله بخير انا اليوم طالب منكم أكواد وانا شاء الله ما تقصرو معي ا بدي كود اقفال الماركر ويكون الكود خاص بأف8 , وبدي كود انو الاعب لما يوخذ من الماركر دم ما يقدر وخذ غير لما يموت
-
السلام عليكم ورحمة الله وبركاتة function RGBToHex(red, green, blue) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) ) then return nil end return string.format("#%.2X%.2X%.2X", red,green,blue) end function outputChat(text,who,r,g,b) local color = RGBToHex(r,g,b) --exports["vMZ-TopBar"]:sendClientMessage ("#98AFC7[Market System] "..color..""..text.."",who,r,g,b,true) outputChatBox ("#98AFC7[Market System] "..color..""..text.."",who,r,g,b,true) end addEventHandler( "onResourceStart", resourceRoot, function () ModerMarketDB = dbConnect("sqlite","Market.db") dbExec(ModerMarketDB, "CREATE TABLE IF NOT EXISTS Market_Trading ( ware, amount, price, player, PlayerAccName )" ) end ); function getAllWareInShop( Player ) local Ware = dbPoll( dbQuery(ModerMarketDB, "SELECT * FROM Market_Trading" ), -1) local WeaponsPlayer = dbPoll( dbQuery(ModerMarketDB, "SELECT * FROM Market_Trading WHERE PlayerAccName=? ", getAccountName(getPlayerAccount(source)) ), -1) for i,v in ipairs(Ware) do if tonumber(v.amount) <= 0 then dbExec(ModerMarketDB, "DELETE FROM Market_Trading WHERE ware = ? AND amount = ?",v.ware, v.amount ) end end triggerClientEvent( root, "SetWareInlist", root, Ware ) triggerClientEvent( source, "SetWeaponsPlayerForSale", source, WeaponsPlayer ) end addEvent( "getAllWareInShop", true ) addEventHandler( "getAllWareInShop", root,getAllWareInShop) addEvent( "AddWareToShop", true ) addEventHandler( "AddWareToShop", root, function ( ID, Ammo, price, statr ) local Weapons = dbPoll( dbQuery(ModerMarketDB, "SELECT * FROM Market_Trading WHERE ware=? AND PlayerAccName=? ",ID, getAccountName(getPlayerAccount(source)) ), -1) if ( type (Weapons) == "table" and #Weapons == 0 or not Weapons ) then dbExec(ModerMarketDB, "INSERT INTO Market_Trading (ware,amount,price,player,PlayerAccName) VALUES(?,?,?,?,?) ", ID, Ammo, price , getPlayerName ( source ),getAccountName(getPlayerAccount(source)) ) else local NewAmmo = tonumber ( Weapons[1]["amount"] ) + tonumber ( Ammo ) dbExec(ModerMarketDB, "UPDATE Market_Trading SET amount=? WHERE ware = ? AND PlayerAccName = ?",NewAmmo, ID, getAccountName(getPlayerAccount(source))) end getAllWareInShop( source ) if statr == "Weapon" then takeWeapon(source,ID,Ammo) else setElementData(source,ID,(getElementData(source,ID) or 0 ) - tonumber ( Ammo )) end outputChat("You Have Putted "..ID.." Amount : "..Ammo.." on market By $"..price.."",source,0,255,0) end ); addEvent( "RemoveWareToShop", true ) addEventHandler( "RemoveWareToShop", root, function ( ID, Ammo, statr ) dbExec(ModerMarketDB, "DELETE FROM Market_Trading WHERE ware = ? AND PlayerAccName = ?",ID , getAccountName(getPlayerAccount(source))) if statr == "Weapon" then giveWeapon(source,ID,Ammo) else setElementData(source,ID,(getElementData(source,ID) or 0 ) + tonumber ( Ammo )) end getAllWareInShop( source ) end ); addEvent( "BuyWareInmarket", true ) addEventHandler( "BuyWareInmarket", root, function ( name, ID, Ammo, Money, TotalAmmo, statr ) if getPlayerMoney ( source ) >= tonumber ( Money ) then local Player = getPlayerFromName ( name ) local accName = getAccountName(getPlayerAccount(Player)) givePlayerMoney ( Player, tonumber ( Money ) ) getElementData(localPlayer, "Money")( source, tonumber ( Money ) ) if localPlayer == getPlayerFromName ( name ) then outputChatBox("You can not buy from yourself !",255,0,0) return end if statr == "Weapon" then giveWeapon(source,ID,Ammo) outputChat("You Have Bought a weapon "..getWeaponNameFromID ( ID ).." and "..Ammo.." Ammo By $"..Money.." From "..name,source,0,255,0) outputChat(getPlayerName(source).." Has bought a "..getWeaponNameFromID ( ID ).." and "..Ammo.." Ammo By $"..Money,Player,0,255,0) else setElementData(source,ID,(getElementData(source,ID) or 0 ) + tonumber ( Ammo )) outputChat("You Have Bought ( "..Ammo.." "..ID.." ) By $"..Money.." From"..name,source,0,255,0) outputChat(getPlayerName(source).." Has bought From you a ( "..Ammo.." "..ID.." ) By $"..Money.."",Player,0,255,0) end getAllWareInShop( source ) getAllWareInShop( Player ) local NewAmmo = tonumber ( TotalAmmo ) - tonumber ( Ammo ) dbExec( ModerMarketDB, "UPDATE Market_Trading SET amount=? WHERE ware = ? AND PlayerAccName = ?",NewAmmo, ID, accName ) else outputChat("You Don't Have Enough Money .",source,255,0,0) end end ); addEventHandler("onPlayerLogin", root, function () local accName = getAccountName(getPlayerAccount(source)) local Market = dbPoll( dbQuery(ModerMarketDB, "SELECT * FROM Market_Trading "), -1) givePlayerMoney(source,150) if (type(Market) == "table" and #Market == 0) or not Market then return end for i,v in ipairs(Market) do if v.PlayerAccName == accName then dbExec( ModerMarketDB, "UPDATE Market_Trading SET player=? WHERE PlayerAccName=?", getPlayerName(source), accName ) getAllWareInShop( source ) end end end ); addEventHandler("onPlayerChangeNick", root, function (oldNick, newNick) if not isGuestAccount( getPlayerAccount( source ) ) then local accName = getAccountName(getPlayerAccount(source)) local Market = dbPoll( dbQuery(ModerMarketDB, "SELECT * FROM Market_Trading "), -1) if (type(Market) == "table" and #Market == 0) or not Market then return end for i,v in ipairs(Market) do if v.PlayerAccName == accName then dbExec( ModerMarketDB,"UPDATE Market_Trading SET player=? WHERE PlayerAccName=?", newNick, accName) getAllWareInShop( source ) end end end end ); مساعده في تحويل الكود دا من سيرفر الي سيلنت عشان مشكله الفلوس الوهميه كل اما اشغله مو يحسب انه فيه فلوس ودا لينك المود اذا حد يبي يعدلي او يعدلي في الكومنتات شكرا جدا للي هيردكل دا عشان الفلوس في الجيم مود عندي سلينت مو سيرفر لذلك لازم كل المودات كلينت
-
اخي بس لو تحطوليي الشروحات المهمة هنا يعني بروابط بس صعب لانو اقراء كل الشروحات وفي شروحات للمحترفين وانا مبتدأ
-
اخبارك يا اللعيبه ا ان شاء الله بخير ثلاثة اشهر MTA انا يا شباب صارلي العب ال وبدي اتعلم اساسيات البرمجة يعني بحيث اقدر اقراء اكواد واعرف اركب اكواد لما يعطوني والخ..ا لو يعني تساعدوني وتنصحوني كيف ابدأ طريق تعلم البرمجة لانو بدي ناس ترشدني يعني لو تقلي كيف ابداء وكيف اشتغل انا عندي مقدمة على الموضوع الي عندو روابط شرح كفو , للبرمجة شي يفيدني يجيبو والسلام عليكم ورحمة الله وبركاتة