
#_MR.MoSHaKS
Members-
Posts
44 -
Joined
-
Last visited
Everything posted by #_MR.MoSHaKS
-
ياليت لو احد يعدل الكود على الاكواد الي طرحتها
-
مود play مو موجود اصلا معليش انا فهمت الموضوع العكس تفضل جرب هذا function JoinPlayer() fadeCamera(source, true) setCameraTarget(source, source) end addEventHandler("onPlayerJoin", getRootElement(), JoinPlayer) هذا الكود احطه مع الاكواد الي طرحتها انا ؟
-
مود play مو موجود اصلا
-
هذا الكود ver = "v3.0" rRoot = getResourceRootElement(getThisResource()) local root = getRootElement() local Key = "F4" local DimentionHajwlah = 0 local DimentionGang = 1 Teams = { -- here all team name {"Grove", 0, 255, 0}, {"Aztecas", 0, 150, 255}, {"Police", 0, 50, 255}, {"Ballas", 255, 0, 150}, {"No Team", 255, 255, 255}, {"Medic", 6, 183, 248}, {"Drift", 255, 255, 0}, } --Spawn spawnLocations = { --- team, x, y, z ----- ["Grove"] = {2498.77856, -1680.38623, 13.35946}, ["Aztecas"] = {1756.07324, -1928.89209, 13.57651}, ["Police"] = {1586.31616, -1690.74158, 6.21875}, ["Ballas"] = {2206.17603, -1175.95288, 25.72656}, ["No Team"] = {902.20544, -1210.40332, 16.97656}, ["Medic"] = {2031.23291, -1408.93445, 16.99886}, ["Drift"] = {-3666.40087, -3008.73535, 49.00781}, -- Hajwalah } local function set(plr, data, bole) if not isElement(plr) then return end return setElementData(plr, data, bole) end local function get(plr, data) if not isElement(plr) then return end return getElementData(plr, data) end addEventHandler("onResourceStart", resourceRoot, function() setGameType("GameMode Drift,wars v3.0") outputChatBox(".:[ GameMode ]:. " .. ver .. "", root, 0, 255, 0, true) setTimer(OutPut, 50, 1, ".:[ GameMode ]:By MR.ONe " .. ver .. "", root, 0, 255, 0) for _,theTeam in ipairs(Teams) do createTeam(theTeam[1], theTeam[2], theTeam[3], theTeam[4]) end for _,AllTeams in ipairs(getElementsByType("team")) do if getTeamFriendlyFire(AllTeams) == true then setTeamFriendlyFire(AllTeams, false) end end setTeamFriendlyFire(getTeamFromName("No Team"), true) setTeamFriendlyFire(getTeamFromName("Drift"), true) for i,v in ipairs(getElementsByType("player")) do bindKey(v, Key, "down", "changeTeame") setElementData(v, "OnJoinFirstSpawn", false) end setElementData(rRoot,"maxPlayer",getMaxPlayers()) end ) addEventHandler("onResourceStop", resourceRoot, function() local players = getElementsByType("player") for k,v in ipairs(players) do set(v, "hjwalah", false) set(v, "Grove", false) set(v, "Aztecs", false) set(v, "Police", false) set(v, "Ballas", false) set(v, "noTeam", false) set(v, "Medic", false) set(v, "GameModeActive", false) end end ) addEvent("onLoadedClient", true) addEventHandler("onLoadedClient", root, function(player) versionDisplay = textCreateDisplay() local versionText = textCreateTextItem(".:[ Game Mode ]:. By MR.ONe| " .. ver .. "]:.", 0.975, 0.02, "medium", 255, 0, 0, 255, 1.1, "right") textDisplayAddText(versionDisplay, versionText) textDisplayAddObserver(versionDisplay, player) setElementData(player, "CancleFirstSpawn", true) playSoundFrontEnd(player, 16) OutPut("The download was successful|", player, 255, 255, 0) setElementData(player, "OnJoinFirstSpawn", false) end ) addEventHandler("onPlayerJoin", root, function() showTextForPlayer ( source, 6000, 255, 0, 0, 1.5, "Wlecom To Server Drift & Gang Wars") showTextForPlayer1 ( source, 6000, 255, 0, 0, 1.5, "Please wait to download all server resources....!") setCameraMatrix(source,512.2, -1263.57, 32.53,542.16, -1287.07, 17.24) end ) addEventHandler("onPlayerSpawn", root, function() checkWeapon(source) end ) function checkWeapon(player) setTimer(function(player) if isElement(player) then if getElementData(player, "Police") == true then giveWeapon(player, 3) end else takeWeapon(player, 3) end end, 800, 1, player) end addEvent("onClientWantsToSpawn", true) addEventHandler("onClientWantsToSpawn", getRootElement(), function(player, ID, TeamName) setElementData(player, "TeamName", TeamName) setElementData(player, "ID", ID) if TeamName == "Grove" then GroveTeam(player) elseif TeamName == "Aztecas" then AztecsTeam(player) elseif TeamName == "Police" then PoliceTeam(player) elseif TeamName == "Ballas" then Ballas(player) elseif TeamName == "No Team" then NoTeam(player) elseif TeamName == "Medic" then MedicTeam(player) elseif TeamName == "Drift" then hjwalah(player) end end ) function checkWeapon(player) setTimer(function(player) if isElement(player) then if getElementData(player, "Police") == true then giveWeapon(player, 3) end else takeWeapon(player, 3) end end, 800, 2, player) end function onSelectTeam(player) if not isElement(player) then return end local playerTeam = getPlayerTeam(player) showTextForPlayer(player, 5000, 255, 0, 0, 1.5, "You have been assigned to team [" .. tostring(getTeamName(playerTeam)) .. "]") OutPut("To return to spawn press["..Key.."]", player, 255, 255, 255) local playeraccount = getPlayerAccount(player) if playeraccount and not isGuestAccount(getPlayerAccount(player)) then if getElementData(player, "hjwalah") == true then return false end if getElementData(player, "wasgied") == true then return false end setElementData(player, "wasgied", true) local weap0 = getAccountData(playeraccount, "s.weap0") local weap1 = getAccountData(playeraccount, "s.weap1") local weap2 = getAccountData(playeraccount, "s.weap2") local ammo2 = getAccountData(playeraccount, "s.ammo2") local weap3 = getAccountData(playeraccount, "s.weap3") local ammo3 = getAccountData(playeraccount, "s.ammo3") local weap4 = getAccountData(playeraccount, "s.weap4") local ammo4 = getAccountData(playeraccount, "s.ammo4") local weap5 = getAccountData(playeraccount, "s.weap5") local ammo5 = getAccountData(playeraccount, "s.ammo5") local weap6 = getAccountData(playeraccount, "s.weap6") local ammo6 = getAccountData(playeraccount, "s.ammo6") local weap7 = getAccountData(playeraccount, "s.weap7") local ammo7 = getAccountData(playeraccount, "s.ammo7") local weap8 = getAccountData(playeraccount, "s.weap8") local ammo8 = getAccountData(playeraccount, "s.ammo8") local weap9 = getAccountData(playeraccount, "s.weap9") local ammo9 = getAccountData(playeraccount, "s.ammo9") local weap10 = getAccountData(playeraccount, "s.weap10") local weap11 = getAccountData(playeraccount, "s.weap11") local weap12 = getAccountData(playeraccount, "s.weap12") local wanted = getAccountData(playeraccount, "WantedLevel") if tonumber(wanted) then setPlayerWantedLevel(player, wanted) elseif tonumber(weap0) then giveWeapon(player, weap0, 1) elseif tonumber(weap1) then giveWeapon(player, weap1, 1) elseif tonumber(weap2) and tonumber(ammo2) then giveWeapon(player, weap2, ammo2) elseif tonumber(weap3) and tonumber(ammo3) then giveWeapon(player, weap3, ammo3) elseif tonumber(weap4) and tonumber(ammo4) then giveWeapon(player, weap4, ammo4) elseif tonumber(weap6) and tonumber(ammo5) then giveWeapon(player, weap5, ammo5) elseif tonumber(weap6) and tonumber(ammo6) then giveWeapon(player, weap6, ammo6) elseif tonumber(weap7) and tonumber(ammo7) then giveWeapon(player, weap7, ammo7) elseif tonumber(weap8) and tonumber(ammo8) then giveWeapon(player, weap8, ammo8) elseif tonumber(weap9) and tonumber(ammo9) then giveWeapon(player, weap9, ammo9) elseif tonumber(weap10) then giveWeapon(player, weap10, 30) elseif tonumber(weap11) then giveWeapon(player, weap11, 30) elseif tonumber(weap12) then giveWeapon(player, weap12, 10) end end checkWeapon(player) end function camera(plr) if not isElement(plr) then return end setTimer(fadeCamera, 50, 1, plr, false, 1) setTimer(fadeCamera, 100, 1, plr, true, 3) setCameraTarget(plr, plr) showChat(plr, true) end addEventHandler("onPlayerSpawn", root, function() setElementData(source, "FristTimeSpawn", false) bindKey(source, Key, "down", "changeTeame") setElementData(source, "WasChangeTeam", false) end ) Change = false addCommandHandler("changeTeame", function(plr) if getElementData(plr, "WasChangeTeam") == false then setElementData(plr, "ChangeTeam", true) OutPut("The team will change after you die", plr, 255, 0, 255) setTimer(cancleTeam, 1700, 1, plr) setElementData(plr, "WasChangeTeam", true) else OutPut("Change the team has been canceled", plr, 255, 255, 0) setElementData(plr, "ChangeTeam", false) setElementData(plr, "WasChangeTeam", false) end Change =
-
انا عندي جيم مود هجولة & حرب اول ما ادخل السيرفر ادا عندي تحميل تطلع شاشة سوداء ما يحطني في البدايةة علطول يعني ما اقدر العب وعندي تحميل انا ابي وين احط الكود في الجيم ؟
-
طيب وين احطه ؟؟
-
السلام عليكم شباب ممكن الكود الي يخلي اللاعب اول مايدخل ماتطلع له شاشة سوداء يعني علطول يصير في البداية ويقدر يلعب حتى لو ماخلص تحميله
-
اضغط على الشيء يجي لك مثال بالويكي ليه العفسه وانت طلبت كود جاهز ما طلبت مثال setVehicleHandling انا طلبت كود وادا ماعندك لاتجي تتفلسف @
-
هدا الكلام الي ينقال :@ مو كلامكم وش عرفكم اني حاولت اجرب ولا لا ؟ تحكم على الشي وانت ماتدري اصلا وش هو ادا ماعندكم شي يفيد لاتقولوه مفهوم edit : انتو حتى مثال ماعطيتوني :@
-
+ "onVehicleEnter" ابي الكود كامل
-
السلام عليكم ابي كود اول ما اخد سيارة يكون فيها وزنية
-
مشكوووووووورين وماقصرتوا الحمد لله استوا بس كان عندي خطأ ض1 يسلموووو شباب
-
ركبته بس مازبط انا ركبت الكود في ملف الكلنت أنت تبيه خط جآهز ولا خط من اللعبة ؟ إذا تبيه جاهز Font.ttf لازم تسمي ملف الخط بإسم + تضيفه إلى ملف ميتا بالشكل ذا < file src="Font.ttf" /> + الكود يصير كذآ , -- Client Side ! addEventHandler ( "onClientResourceStart", g_ResRoot, function ( ) font = guiCreateFont ( "Font.ttf", 12 ) setTimer ( function ( ) for _, button in ipairs ( getElementsByType ( "gui-button", g_ResRoot ) ) do guiSetFont ( button, font ) end end, 3000, 0 ) end ) Font.ttf أما إذا تبيه خط من اللعبة .. ما يحتاج تجيب ملف خط بإسم ولا تضيف شي بملف ميتا , بس ضيف الكود ذا بملف كلنت , addEventHandler ( "onClientResourceStart", g_ResRoot, function ( ) setTimer ( function ( ) for _, button in ipairs ( getElementsByType ( "gui-button", g_ResRoot ) ) do guiSetFont ( button, "اسم الخط" ) end end, 3000, 0 ) end ) إذا تبي تعرف أسمآء الخطوط وأشكالها ، إدخل هنا : https://wiki.multitheftauto.com/wiki/Standard_GUI_Font_Names لاكن الاف 1 عربي ياليت تسو الكود على ملف الكلنت نفسه ...
-
newFont = guiCreateFont ( "font.ttf", 12 ) function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 ) local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "FAHAD.png", relative2 ) local mainBackgroundLabel = guiCreateLabel ( 0, 0, 250, 100, titleBarText2, false, mainBackground ) guiSetFont ( mainBackgroundLabel, newFont ) guiSetEnabled ( mainBackgroundLabel, false ) return mainBackground end CONTROL_MARGIN_RIGHT = 5 LINE_MARGIN = 5 LINE_HEIGHT = 16 g_Root = getRootElement() g_ResRoot = getResourceRootElement(getThisResource()) g_Me = getLocalPlayer() server = createServerCallInterface() guiSetInputMode("no_binds_when_editing") --------------------------- -- Set skin window --------------------------- function skinInit() setControlNumber(wndSkin, 'skinid', getElementModel(g_Me)) end function showSkinID(leaf) if leaf.id then setControlNumber(wndSkin, 'skinid', leaf.id) end end function applySkin() local skinID = getControlNumber(wndSkin, 'skinid') if skinID then server.setMySkin(skinID) fadeCamera(true) end end wndSkin = { 'wnd', text = 'شخصية ', width = 250, x = -20, y = 0.3, controls = { { 'lst', id='skinlist', width=230, height=290, columns={ {text='شخصية', attr='name'} }, rows={xml='skins.xml', attrs={'id', 'name'}}, onitemclick=showSkinID, onitemdoubleclick=applySkin }, {'txt', id='skinid', text='', width=50}, {'btn', id='تعيين', onclick=applySkin}, {'btn', id='X', closeswindow=true} }, oncreate = skinInit } function setSkinCommand(cmd, skin) skin = skin and tonumber(skin) if skin then server.setMySkin(skin) fadeCamera(true) closeWindow(wndSpawnMap) closeWindow(wndSetPos) end end addCommandHandler('setskin', setSkinCommand) addCommandHandler('ss', setSkinCommand) --------------------------- --- Set animation window --------------------------- function applyAnimation(leaf) if type(leaf) ~= 'table' then leaf = getSelectedGridListLeaf(wndAnim, 'animlist') if not leaf then return end end server.setPedAnimation(g_Me, leaf.parent.name, leaf.name, true, true) end function stopAnimation() server.setPedAnimation(g_Me, false) end wndAnim = { 'wnd', text = 'حركات ', width = 250, x = -20, y = 0.3, controls = { { 'lst', id='animlist', width=230, height=290, columns={ {text='حركات', attr='name'} }, rows={xml='animations.xml', attrs={'name'}}, expandlastlevel=false, onitemdoubleclick=applyAnimation }, {'btn', id='تشغيل', onclick=applyAnimation}, {'btn', id='ايقاف', onclick=stopAnimation}, {'btn', id='X', closeswindow=true} } } addCommandHandler('anim', function(command, lib, name) server.setPedAnimation(g_Me, lib, name, true, true) end ) --------------------------- -- Weapon window --------------------------- function addWeapon(leaf, amount) if type(leaf) ~= 'table' then leaf = getSelectedGridListLeaf(wndWeapon, 'weaplist') amount = getControlNumber(wndWeapon, 'amount') if not amount or not leaf then return end end server.giveMeWeapon(leaf.id, amount) end wndWeapon = { 'wnd', text = 'أدوات ', width = 250, controls = { { 'lst', id='weaplist', width=230, height=280, columns={ {text='أدوات', attr='name'} }, rows={xml='weapons.xml', attrs={'id', 'name'}}, onitemdoubleclick=function(leaf) addWeapon(leaf, 500) end }, {'br'}, {'txt', id='amount', text='500', width=60}, {'btn', id='اضافة', onclick=addWeapon}, {'btn', id='X', closeswindow=true} } } function giveWeaponCommand(cmd, weapon, amount) weapon = tonumber(weapon) or getWeaponIDFromName(weapon) if not weapon then return end amount = amount and tonumber(amount) or 500 server.giveMeWeapon(math.floor(weapon), amount) end --addCommandHandler('give', giveWeaponCommand) --addCommandHandler('wp', giveWeaponCommand) --------------------------- -- Fighting style --------------------------- addCommandHandler('setstyle', function(cmd, style) style = style and tonumber(style) if style then server.setPedFightingStyle(g_Me, style) end end ) --------------------------- -- Clothes window --------------------------- function clothesInit() if getElementModel(g_Me) ~= 0 then errMsg('يجب ان تستخدم شخصية سي جي لكي تدخل القائمة') closeWindow(wndClothes) return end if not g_Clothes then triggerServerEvent('onClothesInit', g_Me) end end addEvent('onClientClothesInit', true) addEventHandler('onClientClothesInit', g_Root, function(clothes) g_Clothes = clothes.allClothes for i,typeGroup in ipairs(g_Clothes) do for j,cloth in ipairs(typeGroup.children) do if not cloth.name then cloth.name = cloth.model .. ' - ' .. cloth.texture end cloth.wearing = clothes.playerClothes[typeGroup.type] and clothes.playerClothes[typeGroup.type].texture == cloth.texture and clothes.playerClothes[typeGroup.type].model == cloth.model or false end table.sort(typeGroup.children, function(a, b) return a.name < b.name end) end bindGridListToTable(wndClothes, 'clothes', g_Clothes, false) end ) function clothListClick(cloth) setControlText(wndClothes, 'addremove', cloth.wearing and 'remove' or 'add') end function applyClothes(cloth) if not cloth then cloth = getSelectedGridListLeaf(wndClothes, 'clothes') if not cloth then return end end if cloth.wearing then cloth.wearing = false setControlText(wndClothes, 'addremove', 'add') server.removePlayerClothes(g_Me, cloth.parent.type) else local prevClothIndex = table.find(cloth.siblings, 'wearing', true) if prevClothIndex then cloth.siblings[prevClothIndex].wearing = false end cloth.wearing = true setControlText(wndClothes, 'addremove', 'remove') server.addPedClothes(g_Me, cloth.texture, cloth.model, cloth.parent.type) end end
-
يب سويت خط وحطيته في ملف الـ meta و اسم الخط font هو كدا في ملف الـ meta "font.ttf" />
-
ركبته بس مازبط انا ركبت الكود في ملف الكلنت
-
انا ابي كود يغير خط ازرار الفري روم فهمتني
-
+ guiSetFont ممكن تعطيني وياه كامل
-
السلام عليكم ابي كود حق الي يغير خط ازرار الفري روم (الاف 1)