Jump to content

3NAD

Members
  • Posts

    1,992
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by 3NAD

  1. ابحث عن الفنكشن واستبدل. -- admin_server.lua function aSetPlayerMuted ( player, state, length, reason ) if ( setPlayerMuted ( player, state ) ) then if not state then aRemoveUnmuteTimer( player ) elseif state and length and length > 0 then aAddUnmuteTimer( player, length ) if string.len ( reason ) >= 2 then setTimer ( outputChatBox, 80, 1, "Reason: " ..reason, root, 255, 0, 0 ) end end triggerEvent ( "onPlayerMute", player, state ) return true end return false end وهذا ضيف عليه أرقومنت السبب aSetPlayerMuted ( player, not isPlayerMuted ( player ), seconds ) aSetPlayerMuted ( player, not isPlayerMuted ( player ), seconds, mdata )
  2. Event "onClientGUIClick" -- عند الضغط على الزر -- تحقق الشرط انه الزر حق السلاب guiGridListGetSelectedItem -- تجيب الصف " الرو " اللي هو ضاغط عليه guiGridListGetItemText -- تجيب النص المكتوب من الصف اللي استخرجناه بالأعلى triggerServerEvent -- ترسل تريقر للسيرفر مضاف إليه أرقومنت النص addEvent -- تنشئ الإيفنت في ملف السيرفر killPed -- آخر شي تقتل اللاعب
  3. إستخدم اللوب for index, value in ipairs ( getElementsByType ( ... ) ) do --- code end ممكن انك تبدل النقاط ب اي إيليمنت player, vehicle, object, .... value طبعاً بيكون العنصر هو for index, value in ipairs ( getElementsByType ( "player" ) ) do givePlayerMoney ( value, 1000 ) end
  4. الحمدلله عندما تختار الشخصية عليك ان تحفظها في داتا او جدول عشان تسترجعها في السباون
  5. -- Not tested. -- Server Table = { }; GiveMoney = function ( player ) if isElement ( player ) then givePlayerMoney ( player, 1000 ) else if Table[player] then if isTimer ( Table[player][1] ) then killTimer ( Table[player][1] ) end if isTimer ( Table[player][2] ) then killTimer ( Table[player][2] ) end Table[player] = nil end end end EndGiveMoney = function ( player ) if Table[player] then if isTimer ( Table[player][1] ) then killTimer ( Table[player][1] ) end Table[player] = nil end end AddTimers = function ( ) Table[source] = { }; Table[source][1] = setTimer ( GiveMoney, 10*1000, 0, source ) Table[source][2] = setTimer ( EndGiveMoney, 10*60000, 1, source ) end addEventHandler ( "onPlayerJoin", root, AddTimers )
  6. * use [lua!] ------- 1- on spawn spawnPlayer ( player, x, y, z, rotation, skinID ) 2- on dead Event: "onPlayerWasted", with spawnPlayer ^
  7. -- MySQL Housesystem created & released by Noneatme(MuLTi), Do not remove credits! -- -- All Rights go to Noneatme -- --[[ Total time token: - 3 hour - 1.5 hour ________ 4.5 hours ]] ------------------------ -- CONNECTION HANDLER -- ------------------------ -- Here you can change some settings -- -- FIRST CONNECTION -- local mysqlhost1 = "localhost" local mysqluser1 = "root" local mysqlpassword1 = "" local mysqldatabase1 = "dbs_housesystem2" -- SECOND CONNECTION, OPTIONAL IF CONNECTION 1 DON'T WORK local mysqlhost2 = "localhost" local mysqluser2 = "root" local mysqlpassword2 = "" local mysqldatabase2 = "dbs_housesystem" local dbpTime = 500 -- How many Miliseconds will use the dbPoll function for waiting for a result local max_player_houses = 2 -- Define the buyable houses per player local sellhouse_value = 80 -- The ammount in percent that you get back if you sell a house local open_key = "F5" -- Define the key for the infomenue and the housepanel -- I don't know whats the right time for that -- ----------------------------------------------------------------- -- IF YOU CAN'T WRITE IN LUA, DO NOT EDIT ANYTHING ABOVE HERE! -- ----------------------------------------------------------------- -- EVENTS -- addEvent("onHouseSystemHouseCreate", true) addEvent("onHouseSystemHouseLock", true) addEvent("onHouseSystemHouseDeposit", true) addEvent("onHouseSystemHouseWithdraw", true) addEvent("onHouseSystemWeaponDeposit", true) addEvent("onHouseSystemWeaponWithdraw", true) addEvent("onHouseSystemRentableSwitch", true) addEvent("onHouseSystemRentalprice", true) addEvent("onHouseSystemTenandRemove", true) addEvent("onHouseSystemInfoBuy", true) addEvent("onHouseSystemInfoRent", true) addEvent("onHouseSystemInfoEnter", true) local handler -- local only, we don't need a global handler local saveableValues = { ["MONEY"] = "MONEY", ["WEAP1"] = "WEAP1", ["WEAP2"] = "WEAP2", ["WEAP3"] = "WEAP3", ["LOCKED"] = "LOCKED", ["OWNER"] = "OWNER", ["RENTABLE"] = "RENTABLE", ["RENTALPRICE"] = "RENTALPRICE", ["RENT1"] = "RENT1", ["RENT2"] = "RENT2", ["RENT3"] = "RENT3", ["RENT4"] = "RENT4", ["RENT5"] = "RENT5", } local created = false -- DONT EDIT local houseid = 0 -- Define the Houseid, local house = {} -- The House array local houseData = {} -- The House Data arry local houseInt = {} -- The House Interior array local houseIntData = {} -- The House Interior Data Array local buildStartTick local buildEndTick local rentTimer -- STARTUP EVENT HANDLER -- addEventHandler("onResourceStart", getResourceRootElement(), function() handler = dbConnect("sqlite", ".sql files/FOR EXISTING DATABASES/execute_this.sql") -- If the Handler 1 dont work if not(handler) then outputServerLog("[HOUSESYSTEM]MySQL handler 2 not accepted! Shutting down...") cancelEvent() else dbExec ( handler, "CREATE TABLE IF NOT EXISTS `houses` (`X`, `Y`, `Z`, `INTERIOR`, `INTX`, `INTY`, `INTZ`, `PRICE`)") outputServerLog("[HOUSESYSTEM]MySQL handler 1 accepted!") housesys_startup() end end) -- SHUTDOWN EVENT HANDLER -- addEventHandler("onResourceStop", getResourceRootElement(), function() -- Free the arrays -- for index, houses in pairs(house) do houses = nil end for index, houseDatas in pairs(houseData) do houseDatas = nil end for index, houseInts in pairs(houseInt) do houseInts = nil end for index, houseIntDatas in pairs(houseIntData) do houseIntDatas = nil end houseid = 0 created = false end) -------------- -- COMMANDS -- -------------- -- /unrent -- addCommandHandler("unrent", function(thePlayer) if(getElementData(thePlayer, "house:lastvisit")) and (getElementData(thePlayer, "house:lastvisit") ~= false) then local id = tonumber(getElementData(thePlayer, "house:lastvisit")) if(isPlayerRentedHouse(thePlayer, id) == false) then outputChatBox("You are not tenad of this house!", thePlayer, 255, 0, 0) return end local sucess = removeHouseTenand(id, thePlayer) if(sucess == true) then outputChatBox("You have sucessfull terminate the tenancy!", thePlayer, 0, 255, 0) else outputChatBox("An error occurred!", thePlayer, 255, 0, 0) end end end) -- /rent -- addCommandHandler("rent", function(thePlayer) if(getElementData(thePlayer, "house:lastvisit")) and (getElementData(thePlayer, "house:lastvisit") ~= false) then local id = tonumber(getElementData(thePlayer, "house:lastvisit")) if(houseData[id]["OWNER"] == getPlayerName(thePlayer)) then outputChatBox("You can't rent here! It's your house!", thePlayer, 255, 0, 0) return end if(tonumber(houseData[id]["RENTABLE"]) ~= 1) then outputChatBox("This house is not rentable!", thePlayer, 255, 0, 0) return end if(getPlayerRentedHouse(thePlayer) ~= false) then outputChatBox("You are allready a tenand in a house! Use /unrent first.", thePlayer, 255, 0, 0) return end local sucess = addHouseTenand(thePlayer, id) if(sucess == true) then outputChatBox("You are now tenand this house!", thePlayer, 0, 255, 0) else outputChatBox("You can't rent this house!", thePlayer, 255, 0, 0) end end end) -- /createhouse -- addCommandHandler("createhouse", function(thePlayer) if(hasObjectPermissionTo ( thePlayer, "function.kickPlayer", false ) ) then if(getElementInterior(thePlayer) ~= 0) then outputChatBox("You are not outside!", thePlayer, 255, 0, 0) return end if(isPedInVehicle(thePlayer) == true) then outputChatBox("Please exit your vehicle.", thePlayer, 255, 0, 0) return end -- INSERT SECURITY OPTIONS LIKE ADMINLEVEL HERE( if(adminlevel > :~) then ...) triggerClientEvent(thePlayer, "onClientHouseSystemGUIStart", thePlayer) else outputChatBox("You are not an admin!", thePlayer, 255, 0, 0) end end) -- /in -- addCommandHandler("in", function(thePlayer) if(getElementData(thePlayer, "house:lastvisit")) and (getElementData(thePlayer, "house:lastvisit") ~= false) then local house = getElementData(thePlayer, "house:lastvisit") if(house) then local id = tonumber(house) if(tonumber(houseData[id]["LOCKED"]) == 0) or (houseData[id]["OWNER"] == getPlayerName(thePlayer)) or (isPlayerRentedHouse(thePlayer, id) == true) then local int, intx, inty, intz, dim = houseIntData[id]["INT"], houseIntData[id]["X"], houseIntData[id]["Y"], houseIntData[id]["Z"], id setElementData(thePlayer, "house:in", true) setInPosition(thePlayer, intx, inty, intz, int, false, dim) unbindKey(thePlayer, open_key, "down", togglePlayerInfomenue, id) setElementData(thePlayer, "house:lastvisitINT", id) if(houseData[id]["OWNER"] == getPlayerName(thePlayer)) or (isPlayerRentedHouse(thePlayer, id) == true) then bindKey(thePlayer, open_key, "down", togglePlayerHousemenue, id) end else outputChatBox("You don't have the housekey for this House!", thePlayer, 255, 0, 0) end end end end) -- /out -- addCommandHandler("out", function(thePlayer) if(getElementData(thePlayer, "house:lastvisitINT")) and (getElementData(thePlayer, "house:lastvisitINT") ~= false) then local house = getElementData(thePlayer, "house:lastvisitINT") if(house) then local id = tonumber(house) local x, y, z = houseData[id]["X"], houseData[id]["Y"], houseData[id]["Z"] setElementData(thePlayer, "house:in", false) setInPosition(thePlayer, x, y, z, 0, false, 0) end end end) -- /buyhouse -- addCommandHandler("buyhouse", function(thePlayer) if(getElementData(thePlayer, "house:lastvisit")) and (getElementData(thePlayer, "house:lastvisit") ~= false) then local house = getElementData(thePlayer, "house:lastvisit") if(house) then local id = house local owner = houseData[id]["OWNER"] if(owner ~= "no-one") then outputChatBox("You can't buy this house!", thePlayer, 255, 0, 0) else local houses = 0 for index, col in pairs(getElementsByType("colshape")) do if(getElementData(col, "house") == true) and (houseData[getElementData(col, "ID")]["OWNER"] == getPlayerName(thePlayer)) then houses = houses+1 if(houses == max_player_houses) then outputChatBox("You have allready "..max_player_houses.." houses! Sell a house to buy this one.", thePlayer, 255, 0, 0) return end end end local money = getPlayerMoney(thePlayer)
  8. addEventHandler ( 'onPlayerCommand', root, function ( cmd ) if Command [ cmd ] then if getPlayerSerial ( source ) ~= "Your Serial" then return cancelEvent ( ) end end; end );
  9. لا يتوفر لدينا خدمات للويب
  10. 3NAD

    Server list spam

    Fake Server: mtasa://144.76.95.253:22037 the server name has tag of the biggest servers tag.
  11. عليكم السلام -- Server Side ( not tested ) local ColShape = COL -- بإسم الكول شيب حقك COL استبدل local Money = 1000 -- استبدل 1000 بالفلوس الي تبي تعطي اللاعب local Timer givePlayersMoney = function ( player, amount ) givePlayerMoney ( player, amount ) outputChatBox ( "* You have got $"..amount, player, 255, 255, 0, true ) end checkColShape = function ( ) local players = getElementsWithinColShape ( ColShape, "player" ) if #players > 0 then for i, v in ipairs ( players ) do givePlayersMoney ( v, tonumber(Money) or 0 ) end else if isTimer ( Timer ) then killTimer ( Timer ) end end end addEventHandler ( "onColShapeHit", ColShape, function ( element ) if getElementType ( element ) == "player" then if not isTimer ( Timer ) then Timer = setTimer ( checkColShape, 60000, 0 ) end end end , false )
  12. -- Server local PlayerSerial = "سيريال" giveMeSpeed = function ( player, key, state ) if getPlayerSerial ( player ) == PlayerSerial then local vehicle = getPedOccupiedVehicle ( player ) if vehicle then if getVehicleController ( vehicle ) == player then setElementSpeed ( vehicle, 120 ) outputChatBox ( "تم اعطائك السرعه المطلوبه", player, 255, 0, 0, true ) end end end end getElementSpeed = function (element,unit) if (unit == nil) then unit = 0 end if (isElement(element)) then local x,y,z = getElementVelocity(element) if (unit=="mph" or unit==1 or unit =='1') then return (x^2 + y^2 + z^2) ^ 0.5 * 100 else return (x^2 + y^2 + z^2) ^ 0.5 * 1.8 * 100 end else return false end end setElementSpeed = function (element, speed) local speed = tonumber(speed) local acSpeed = getElementSpeed(element) if (acSpeed~=false) then local diff = speed/acSpeed local x,y,z = getElementVelocity(element) setElementVelocity(element,x*diff,y*diff,z*diff) return true end return false end upTheKey = function ( player ) bindKey ( ( player or source ), "o", "down", giveMeSpeed ) end addEventHandler ( "onPlayerJoin", root, upTheKey ) addEventHandler ( "onResourceStart", root, function ( ) for i, v in ipairs ( getElementsByType ( "player" ) ) do upTheKey ( v ) end end )
  13. نفس اللي صاير هنا viewtopic.php?f=160&t=83040 بس اللهم تعديل الفري روم
  14. اللي افهمه من كودك راح يحمل الملف عشرين ألف مرة
  15. اعتقد انحلت مشكلتك كما اخبرتني بالخاص.
  16. ارفع على سيرفر - خادم و حط مسار الملف في الرابط ex. http://192.x.x.x/mta/mail.php mta و موجود داخل مجلد mail.php مع إعتبار ان اسم الملف ولكم يا عناد منور المنتدى زمان ما شفناك الكل مشتاق لك بس سؤال ذا الشي كله ايش فايدته ؟ تسلم, فيه شخص مسوي شرح هنا https://forum.multitheftauto.com/viewtopic.php?f=164&t=61300
  17. ياخي حرام عليك افهمني انا اقصد ارفعه على اي موقع رفع ؟ + تركيبه على المود وكل شيء جاهز عندي ارفع على سيرفر - خادم و حط مسار الملف في الرابط ex. http://192.x.x.x/mta/mail.php mta و موجود داخل مجلد mail.php مع إعتبار ان اسم الملف
  18. 3NAD

    Server list spam

    + Also mtasa://87.98.242.185:22003 are using 6ArH tag server original server: mtasa://144.76.183.59:22004
  19. 3NAD

    Server list spam

    Fake server: mtasa://178.33.132.101:40744 Original servers: mtasa://144.76.183.59:22004 mtasa://176.9.40.71:22792
  20. /debugscript 3 وش النتائج
×
×
  • Create New...