Jump to content

تصحيح ذا المود=اي محترف برمجهـ يدخل بليز


Recommended Posts

السلام عليكم ورحمة الله وبركاته

لاهنتوا ابيكم تصححون ذا المود مره حاولت اصححه كذا مره ماسار شي

طبعا المود هو قيم مود حرب العصابات وهجوله حق مستر سعد

انا حاولت اسوي قيم زيادة على الحرب والهجوله

وسويت كل شي تمام

لكن فيه شي خرب المود اتمنى تصححونه

clinet

local x, y = guiGetScreenSize() 
rRoot = getResourceRootElement(getThisResource())
Music = "Other/Intro.mp3"
Anims = {"DAN_UP_A", "dnce_M_b", "DAN_Left_A", "DAN_Down_A", "DAN_Loop_A", "dance_loop"}
num = 0
local TeamNameee = ""
local Team = ""
local findskin = nil
local Text = ""
local mn = nil
Color = {255, 255, 255}
local NewTeam = 0
local ID, skin = nil, nil, nil
  TeamName = {"Grove", "Aztecas", "Police", "Ballas", "No Team", "Medic", "Drift", "War_Ballas", "War_Grove"}
local WaeponID = {5, 22, 3, 1, 32, 41, 43}
allPlayer = 0
local Weapon = 0
local NameWeap = "Fist"
GameType = {}
ColorGame = {0, 255, 255}
GameNameType = ""
Info = {}
SkinSelectMusic = nil
local foundTeam = 0
local findskin = 0
typeGame = "drift"
local foundInTeam = ""
local foundInall = ""
Ped = {}  
 
skin = {
Grove = {105, 106, 107},
Aztecas = {115, 116, 117},
Police = {283, 284, 285},
Ballas = {102, 103, 104},
["No Team"] = {29, 30, 31},
Medic = {274, 275, 276},
Drift = {46, 124, 43, 63, 64, 75, 285, 0},
WarBallas = {102, 103, 104},
WarGrove = {105, 106, 107}
}
 
AllTeamName = { --- Camera & ped -- [x] , [y] , [z], [x1], [y1], [z1] --> CameraMatrix --- [x], [y], [z] ---> position ped
Grove = {2494.96948, -1684.03101, 14.3313, 2494.98486, -1685.02856, 14.26363, 2495.38843, -1688.54297, 13.87171},
Aztecas = {1764.75586, -1928.03674, 15.2383, 1763.80432, -1928.0498, 14.93086, 1761.0708, -1928.08801, 13.57734},
Police = {1568.73779, -1695.54541, 7.0456, 1568.71582, -1694.55835, 6.8869, 1568.64075, -1691.68494, 5.89063},
Ballas = {2217.03027, -1167.91956, 27.0701, 2217.0166, -1168.89661, 26.85767, 2216.97534, -1171.77625, 25.72656},
No Team = {901.33551, -1208.65796, 18.4756, 901.27332, -1207.69299, 18.22063, 901.05676, -1204.8208, 16.98322},
Medic = {2022.72839, -1426.36877, 18.3914, 2023.34521, -1425.61548, 18.16297, 2025.20178, -1423.47644, 16.99219},
Drift = {1959.1826171875, 1342.6208496094, 16.885499954224, 1958.2171630859, 1342.6363525391, 16.625249862671, -3689.1884765625, -2997.0432128906, 65.950134277344},
WarBallas = {901.33551, -1208.65796, 18.4756, 901.27332, -1207.69299, 18.22063, 690.064087, -2679.982666, 8.608082},
WarGrove = {2022.72839, -1426.36877, 18.3914, 2023.34521, -1425.61548, 18.16297, 543.465149, -2691.799561, 8.608082}
}
 
Rot = {357.4391784668, 271.10339355469, 179.70733642578, 0, 179.01052856445, 132.08488464355,268.76651000977} -- Rotation ped
 
CamGameType = { --- Camera
{2053.451171875, 1247.1739501953, 99.397598266602, 2053.4731445313, 1247.9654541016, 98.786827087402}, -- Cam Hajwalah
{2454.49487, -1654.69812, 26.19402, 2541.42432, -1686.7251, -11.45641}, --- Cam Gang Wars
{2454.49487, -1654.69812, 26.19402, 2541.42432, -1686.7251, -11.45641}, --- Cam War
}
 
function dxDrawColorText(str, ax, ay, bx, by, color, scale, font, alignX, alignY)
  bx, by, color, scale, font = bx or ax, by or ay, color or tocolor(255,255,255,255), scale or 1, font or "default"
  if alignX then
    if alignX == "center" then
      ax = ax + (bx - ax - dxGetTextWidth(str:gsub("#%x%x%x%x%x%x",""), scale, font))/2
    elseif alignX == "right" then
      ax = bx - dxGetTextWidth(str:gsub("#%x%x%x%x%x%x",""), scale, font)
    end
  end
  if alignY then
    if alignY == "center" then
      ay = ay + (by - ay - dxGetFontHeight(scale, font))/2
    elseif alignY == "bottom" then
      ay = by - dxGetFontHeight(scale, font)
    end
  end
  local alpha = string.format("%08X", color):sub(1,2)
  local pat = "(.-)#(%x%x%x%x%x%x)"
  local s, e, cap, col = str:find(pat, 1)
  local last = 1
  while s do
    if cap == "" and col then color = tocolor(getColorFromString("#"..col..alpha)) end
    if s ~= 1 or cap ~= "" then
      local w = dxGetTextWidth(cap, scale, font)
      dxDrawText(cap, ax, ay, ax + w, by, color, scale, font,"left", "top", false, false, true, false, false)
      ax = ax + w
      color = tocolor(getColorFromString("#"..col..alpha))
    end
    last = e + 1
    s, e, cap, col = str:find(pat, last)
  end
  if last <= #str then
    cap = str:sub(last)
    dxDrawText(cap, ax, ay, ax + dxGetTextWidth(cap, scale, font), by, color, scale, font,"left", "top", false, false, true, false, false)
  end
end
 
local function getTeam(team)
    return getTeamFromName(team)
end
 
local function count(team)
    return countPlayersInTeam(getTeamFromName(team))
end
 
function onStop()
    resetSkyGradient()
    showChat(true)
    showPlayerHudComponent("all", true)
end
addEventHandler("onClientResourceStop", resourceRoot, onStop)
 
function foundPos(nummm)
    local foundPo = AllTeamName[TeamName[NewTeam]][tonumber(nummm)]
    return foundPo
end
 
function showforallteam()
    foundInTeam = "There are Players"   
    foundInall = "all Players" 
    GameType = {"الــــــــهـــــجـــــولــــــة","حــــــرب الـــعــــصـــابــــات","الــــــــحـــــــــــــــــــرب"}
    Info = {"<-إخــتــر الـقـيـم مـود->","إضـغـط إنـتـر للإختيار"} 
    fadeCamera( true )
    GameNameType = "الــــــــهـــــجـــــولــــــة"
    typeGame = "drift"         
    mn = nil
    showChat(false)
    bindKey("arrow_r","down",ShowGameType)
    bindKey("arrow_l","down",ShowGameType)
    bindKey("enter","down",SpawnGameType)
    l1, l2, l3, l4, l5, l6 = unpack(CamGameType[1])
    info1 = Info[1]
    info2 = Info[2]
    info3 = Info[3]
    SelectGame = 2
    addEventHandler("onClientRender",getRootElement(),DrawGameType)
    setCameraMatrix(l1, l2, l3, l4, l5, l6)
end
 
addEventHandler("onClientPlayerWasted", getLocalPlayer(), function(killer, weapon, bodypart)
    if getElementData(localPlayer, "WasChangeTeam") == true then
      setElementDimension (localPlayer, 0 )
      showforallteam()
    else
      return false
    end
end)
 
function ShowGameType()
    if SelectGame == 1 then
        mn = nil
        ColorGame = {84,100,222}
        l1, l2, l3, l4, l5, l6 = unpack(CamGameType[1])
        setCameraMatrix(l1, l2, l3, l4, l5, l6)
        SelectGame = 2
        GameNameType = GameType[1]
        typeGame = "drift"
    else
        ColorGame = {255,255,0}
        l1, l2, l3, l4, l5, l6 = unpack(CamGameType[2])
        setCameraMatrix(l1, l2, l3, l4, l5, l6)
        SelectGame = 1
        GameNameType = GameType[2]
        count2 =  count("Grove")
        count3 =  count("Aztecas")
        count4 =  count("Police")
        count5 =  count("Ballas")
        count6 =  count("No Team")
        mn = count2 + count3 + count4 + count5 + count6
        typeGame = "gang"
    else
        ColorGame = {255,0,0}
        l1, l2, l3, l4, l5, l6 = unpack(CamGameType[3])
        setCameraMatrix(l1, l2, l3, l4, l5, l6)
        SelectGame = 3
        GameNameType = GameType[3]
        count2 =  count("WarBallas")
        count3 =  count("WarGrove")
        mn = count2 + count3
        typeGame = "war"
    end
end
 
 
function SpawnGameType()
    if typeGame == "drift" then
      setTimer(MakeDrift, 500, 1)
    elseif typeGame == "gang" then
      setTimer(MakeGangWars, 500, 1)
    elseif typeGame == "war" then
      setTimer(MakeWar, 500, 1)
    end
    unbindKey("arrow_r", "down", ShowGameType)
    unbindKey("arrow_l", "down", ShowGameType)
    unbindKey("enter", "down", SpawnGameType)
    TeamNameee = "Team Name"
end
 
function MakeGangWars()
    Color = {0, 255, 0}
    Team = " " .. TeamName[1] .. " "
    allPlayer = count(TeamName[1])
    Weapon = WaeponID[1]
    NameWeap = getWeaponNameFromID(Weapon)
    NameWeap = getWeaponNameFromID(Weapon)
    NewTeam = 1
    local x, y, z, lx, ly, lz = foundPos(1), foundPos(2), foundPos(3), foundPos(4), foundPos(5), foundPos(6)
    setCameraMatrix(x, y, z, lx, ly, lz)
    removeEventHandler("onClientRender", getRootElement(), DrawGameType)
    bindKey("arrow_r", "down", Next)
    bindKey("arrow_l", "down", Next)
    bindKey("enter", "down", SpawnPlayer)
    addEventHandler("onClientRender", getRootElement(), DrawTeam)
    SkinSelectMusic = playSound(Music, true)
    local pedx, pedy, pedz = foundPos(7), foundPos(8), foundPos(9)
    findskin = math.random(1, 3)
    ID = 105
    Ped[1] = createPed(ID, pedx, pedy, pedz, Rot[1])
    if not isElement(Ped[1]) then
      Ped[1] = createPed(ID, pedx, pedy, pedz, Rot[NewTeam])
    end
    setElementFrozen(Ped[1], true)
    setPedAnimation(Ped[1], "DANCING", Anims[math.random(1, 6)])
    foundTeam = 1
    findskin = 1
end
 
function Next(key)
    if key == "arrow_l" then
      num = num - 1
    else
      num = num + 1
    end
    if key == "arrow_l" then
      findskin = findskin - 1
    else
      findskin = findskin + 1
    end
    if findskin < 1 then
      findskin = 3
    end
    if findskin > 3 then
      findskin = 1
    end
    if num < 1 then
      num = 16
      foundTeam = 6
    elseif num == 1 then
      foundTeam = 1
   
Edited by Guest
Link to comment

إيهـــ موجود وش فيكـــ مآتشوف

  
function showforallteam() 
    foundInTeam = "There are Players"    
    foundInall = "all Players"   
    GameType = {"الــــــــهـــــجـــــولــــــة","حــــــرب الـــعــــصـــابــــات","الــــــــحـــــــــــــــــــرب"} 
    Info = {"<-إخــتــر الـقـيـم مـود->","إضـغـط إنـتـر للإختيار"}   
    fadeCamera( true ) 
    GameNameType = "الــــــــهـــــجـــــولــــــة" 
    typeGame = "drift"           
    mn = nil 
    showChat(false) 
    bindKey("arrow_r","down",ShowGameType) 
    bindKey("arrow_l","down",ShowGameType) 
    bindKey("enter","down",SpawnGameType) 
    l1, l2, l3, l4, l5, l6 = unpack(CamGameType[1]) 
    info1 = Info[1] 
    info2 = Info[2] 
    SelectGame = 3 
    addEventHandler("onClientRender",getRootElement(),DrawGameType) 
    setCameraMatrix(l1, l2, l3, l4, l5, l6) 
end 

هذا بعد ماتسجل دخول يظهر حق إختيار القيمات

لكن الخطأ الي في المود خلى القيمات ماتظهر

فجاء هذا الخطأ اللي في

debugscript 3

أتمنى مستر سعد يدخل لإنهـ صاحب المود هو يعرفلهـ هه

Link to comment

المود مافيه الا تريقر واحد ذذ

وهو

  
    triggerServerEvent("onClientWantsToSpawn", getLocalPlayer(), getLocalPlayer(), ID, TeamName[NewTeam]) 
    setTime(12, 0) 
    unbindKey("arrow_r", "down", Nextd) 
    unbindKey("arrow_l", "down", Nextd) 
    unbindKey("arrow_r", "down", Next) 
    unbindKey("arrow_l", "down", Next) 
    unbindKey("enter", "down", SpawnPlayer)  
    if Ped[1] then 
      destroyElement(Ped[1]) 
      Ped[1] = nil 
    end 
  

+

وآسف إذا غلطت عليكــــــــــــ

Link to comment

اسمع ما أضن انه التريقير حق تسجيل الدخول بيأثر لانه في. اية لوحة لتسجيل الدخول

مو بس حقت القيم مود

يجي الخطا

وعلى العموم. هذي التريقر

function loginPlayer(username,password) 
  
        if not (username == "") then 
  
                if not (password == "") then 
  
                        local account = getAccount ( username, password ) 
  
                        if ( account ~= false ) then 
  
                                logIn (source, account, password) 
  
                                triggerClientEvent (source,"hideLoginWindow",getRootElement()) 
  
                        else 
  
                                OutPut( "user name or paassward is wrong",source,255,255,0) 
  
                        end 
  
                else 
  
                        OutPut( "enter password",source,255,255,0) 
  
                end 
  
        else 
  
                OutPut( "enter user name",source,255,255,0) 
  
        end 
  
end 

+

المود بدون اضافة قيم حرب

شغال تمام

يعني بعد التعديل خرب

احسكم تضنون انه كله خطأ بدون تعديل والله بتعديل

Edited by Guest
Link to comment

اها قول حق الحدث

  
function hideLoginWindow() 
  
        guiSetInputEnabled(false) 
  
        guiSetVisible(mainWindow, false) 
  
        guiSetVisible(registerWindow, false) 
  
        showforallteam() 
  
end 
  
addEvent("hideLoginWindow", true) 
  
addEventHandler("hideLoginWindow", getRootElement(), hideLoginWindow) 

Link to comment

اسمع القيم من دون اضافة شغال حتى لوحة تسجيل الدخول

بس انا ضفت قيم ثالث اللي هو حرب وضفت گودات اللي هي نفس الهججولة وحرب العصابات

وعدلت على اسمائها وكذا

بس ماجات شاشة اخيار القيم مود وبس

Link to comment

انا جربت اخذ الاكواد واشوف الديبق اخطاء كثير

كله ناقص end و زيها من ذي الاشياء

عشان كذا

عيد اضافتك للقيم الثالث

ونصيحه استخدم برنامج MTA script editor

لأنه فيه ديبق

ولو سويت شي خطأ بيقولك انه خطأ ووش الخطأ

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...