ahmad_1994 Posted December 15, 2013 Share Posted December 15, 2013 السلام عليكم و رحمة الله و بركاتة شباب اد جيم مود سعد بس ابي اخي السبون تاع التيم اكتر من واحد يعني 2 او 3 function PoliceTeam(plr) if not isElement(plr) then return end camera(plr) local data = tonumber(getElementData(plr, "ID")) or 285 spawnPlayer(plr, 1586.31616, -1690.74158, 6.21875, 0, data, 0, 0, getTeamFromName("Police")), r, g, b = getTeamColor(getPlayerTeam(plr)) setPlayerNametagColor(plr, r, g, b) giveWeapon(plr, 3) giveWeapon(plr, 31, 100) giveWeapon(plr, 24, 100) onSelectTeam(plr) set(plr, "Police", true) set(plr, "Grove", false) set(plr, "Aztecs", false) set(plr, "Ballas", false) set(plr, "noTeam", false) set(plr, "hjwalah", false) set(plr, "Medic", false) set(plr, "GameModeActive", true) end هاي السبون تاع الشرطة بس ابي تخلوها اكتر من سبوان Link to comment
PaiN^ Posted December 15, 2013 Share Posted December 15, 2013 سوي جدول و ضيف فيه الاحداثيات local spawn = { { x, y, z }, { x, y, z }, { x, y, z } } Link to comment
ahmad_1994 Posted December 15, 2013 Author Share Posted December 15, 2013 اخي سويت هيك ما بعرف اذا صح ولا لا بس الجيم بسير خربان function PoliceTeam(plr) if not isElement(plr) then return end camera(plr) local data = tonumber(getElementData(plr, "ID")) or 285 spawnPlayer ={plr, 1586.31616, -1690.74158, 6.21875, 0, data, 0, 0, getTeamFromName("Police")}, {plr, 1579.48499 -1635.17407 13.56156, 0, data, 0, 0, getTeamFromName("Police")} r, g, b = getTeamColor(getPlayerTeam(plr)) setPlayerNametagColor(plr, r, g, b) giveWeapon(plr, 3) giveWeapon(plr, 31, 100) giveWeapon(plr, 24, 100) onSelectTeam(plr) set(plr, "Police", true) set(plr, "Grove", false) set(plr, "Aztecs", false) set(plr, "Ballas", false) set(plr, "noTeam", false) set(plr, "hjwalah", false) set(plr, "Medic", false) set(plr, "GameModeActive", true) end Link to comment
PaiN^ Posted December 15, 2013 Share Posted December 15, 2013 لا غلط جرب ذا : local spawns = { { x, y, z }, { x, y, z }, { x, y, z } } function PoliceTeam( player ) if not isElement( player ) then return end camera( player ) local data = tonumber( getElementData( player, "ID" ) ) or 285 local number = spawns[math.random( #spawns )] local x, y, z = spawns[number][1], spawns[number][2], spawns[number][3] spawnPlayer( player, x, y, z, 0, data, 0, 0, getTeamFromName( "Police" ) ) r, g, b = getTeamColor( getPlayerTeam( player ) ) setPlayerNametagColor( player, r, g, b ) giveWeapon( player, 3 ) giveWeapon( player, 31, 100 ) giveWeapon( player, 24, 100 ) onSelectTeam( player ) set( player, "Police", true ) set( player, "Grove", false ) set( player, "Aztecs", false ) set( player, "Ballas", false ) set( player, "noTeam", false ) set( player, "hjwalah", false ) set( player, "Medic", false ) set( player, "GameModeActive", true ) end Link to comment
ahmad_1994 Posted December 15, 2013 Author Share Posted December 15, 2013 اخي ما اشتغل Link to comment
ahmad_1994 Posted December 15, 2013 Author Share Posted December 15, 2013 اخي لما اشغل المود بشتغل بس التيمات و اختيار الشخصية ما بطلع Link to comment
PaiN^ Posted December 15, 2013 Share Posted December 15, 2013 "debugscript 3" اكتب في اف8 و راح تطلعلك كتابة تحت في الشاشة زي الشات, دور على اسم المود و صور و جبلي الصورة Link to comment
ahmad_1994 Posted December 16, 2013 Author Share Posted December 16, 2013 اخي هاي الصورة يلي طلعت Link to comment
ahmad_1994 Posted December 16, 2013 Author Share Posted December 16, 2013 هاد الكلنت 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"} 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 = "gang" 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} } AllTeamName = { Grove = {1764.75586, -1928.03674, 15.2383, 1763.80432, -1928.0498, 14.93086, 1761.0708, -1928.08801, 13.57734}, Aztecas = {1764.75586, -1928.03674, 15.2383, 1763.80432, -1928.0498, 14.93086, 1761.0708, -1928.08801, 13.57734}, Police = {1764.75586, -1928.03674, 15.2383, 1763.80432, -1928.0498, 14.93086, 1761.0708, -1928.08801, 13.57734}, Ballas = {1764.75586, -1928.03674, 15.2383, 1763.80432, -1928.0498, 14.93086, 1761.0708, -1928.08801, 13.57734}, ["No Team"] = {1764.75586, -1928.03674, 15.2383, 1763.80432, -1928.0498, 14.93086, 1761.0708, -1928.08801, 13.57734}, Medic = {1764.75586, -1928.03674, 15.2383, 1763.80432, -1928.0498, 14.93086, 1761.0708, -1928.08801, 13.57734}, } Rot = {-90, -90, -90, -90, -90, -90, -90, -90, -90} CamGameType = { {-90, -90, -90, -90, -90, -90, -90, -90, -90} } 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 = {"Gang Wars"} Info = {"Wlecom To Gang Wars","To Spawn press [Enter]"} fadeCamera( true ) GameNameType = "Gang Wars" mn = nil showChat(false) bindKey("enter","down",SpawnGameType) l1, l2, l3, l4, l5, l6 = unpack(CamGameType[1]) info1 = Info[1] info2 = Info[2] ShowGameType() addEventHandler("onClientRender",getRootElement(),DrawGameType) end addEventHandler("onClientPlayerWasted", getLocalPlayer(), function(killer, weapon, bodypart) if getElementData(localPlayer, "WasChangeTeam") == true then showforallteam() else return false end end) function ShowGameType() ColorGame = {255,255,0} l1, l2, l3, l4, l5, l6 = unpack(CamGameType[1]) setCameraMatrix(l1, l2, l3, l4, l5, l6) SelectGame = 1 GameNameType = GameType[1] count2 = count("Grove") count3 = count("Aztecas") count4 = count("Police") count5 = count("Ballas") count6 = count("No Team") mn = count2 + count3 + count4 + count5 + count6 typeGame = "gang" end function SpawnGameType() if typeGame == "gang" then setTimer(MakeGangWars, 500, 1) end 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 elseif num == 4 then foundTeam = 2 elseif num == 7 then foundTeam = 3 elseif num == 10 then foundTeam = 4 elseif num == 13 then foundTeam = 5 elseif num == 16 then foundTeam = 6 elseif num == 19 then foundTeam = 1 num = 1 end number = foundTeam ID = skin[TeamName[number]][findskin] Team = " " .. TeamName[number] .. " " NewTeam = foundTeam TextColor(number) setElementModel(Ped[1], ID) setPedAnimation(Ped[1], "DANCING", Anims[math.random(1, 5)]) if Ped[1] then destroyElement(Ped[1]) Ped[1] = nil end local x, y, z, lx, ly, lz = foundPos(1), foundPos(2), foundPos(3), foundPos(4), foundPos(5), foundPos(6) wasFoundCamAndPed = foundTeam local pedx, pedy, pedz = foundPos(7), foundPos(8), foundPos(9) Ped[1] = createPed(ID, pedx, pedy, pedz, Rot[number]) if not isElement(Ped[1]) then Ped[1] = createPed(ID, pedx, pedy, pedz, Rot[number]) end setElementFrozen(Ped[1], true) setPedAnimation(Ped[1], "DANCING", Anims[math.random(1, 6)]) setCameraMatrix(x, y, z, lx, ly, lz) end function TextColor(numbe) if TeamName[numbe] == "Grove" then Color = {0, 255, 0} elseif TeamName[numbe] == "Aztecas" then Color = {0, 150, 255} Link to comment
ahmad_1994 Posted December 16, 2013 Author Share Posted December 16, 2013 هاد الكلنت 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"} 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 = "gang" 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} } AllTeamName = { Grove = {1764.75586, -1928.03674, 15.2383, 1763.80432, -1928.0498, 14.93086, 1761.0708, -1928.08801, 13.57734}, Aztecas = {1764.75586, -1928.03674, 15.2383, 1763.80432, -1928.0498, 14.93086, 1761.0708, -1928.08801, 13.57734}, Police = {1764.75586, -1928.03674, 15.2383, 1763.80432, -1928.0498, 14.93086, 1761.0708, -1928.08801, 13.57734}, Ballas = {1764.75586, -1928.03674, 15.2383, 1763.80432, -1928.0498, 14.93086, 1761.0708, -1928.08801, 13.57734}, ["No Team"] = {1764.75586, -1928.03674, 15.2383, 1763.80432, -1928.0498, 14.93086, 1761.0708, -1928.08801, 13.57734}, Medic = {1764.75586, -1928.03674, 15.2383, 1763.80432, -1928.0498, 14.93086, 1761.0708, -1928.08801, 13.57734}, } Rot = {-90, -90, -90, -90, -90, -90, -90, -90, -90} CamGameType = { {-90, -90, -90, -90, -90, -90, -90, -90, -90} } 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 = {"Gang Wars"} Info = {"Wlecom To Gang Wars","To Spawn press [Enter]"} fadeCamera( true ) GameNameType = "Gang Wars" mn = nil showChat(false) bindKey("enter","down",SpawnGameType) l1, l2, l3, l4, l5, l6 = unpack(CamGameType[1]) info1 = Info[1] info2 = Info[2] ShowGameType() addEventHandler("onClientRender",getRootElement(),DrawGameType) end addEventHandler("onClientPlayerWasted", getLocalPlayer(), function(killer, weapon, bodypart) if getElementData(localPlayer, "WasChangeTeam") == true then showforallteam() else return false end end) function ShowGameType() ColorGame = {255,255,0} l1, l2, l3, l4, l5, l6 = unpack(CamGameType[1]) setCameraMatrix(l1, l2, l3, l4, l5, l6) SelectGame = 1 GameNameType = GameType[1] count2 = count("Grove") count3 = count("Aztecas") count4 = count("Police") count5 = count("Ballas") count6 = count("No Team") mn = count2 + count3 + count4 + count5 + count6 typeGame = "gang" end function SpawnGameType() if typeGame == "gang" then setTimer(MakeGangWars, 500, 1) end 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 elseif num == 4 then foundTeam = 2 elseif num == 7 then foundTeam = 3 elseif num == 10 then foundTeam = 4 elseif num == 13 then foundTeam = 5 elseif num == 16 then foundTeam = 6 elseif num == 19 then foundTeam = 1 num = 1 end number = foundTeam ID = skin[TeamName[number]][findskin] Team = " " .. TeamName[number] .. " " NewTeam = foundTeam TextColor(number) setElementModel(Ped[1], ID) setPedAnimation(Ped[1], "DANCING", Anims[math.random(1, 5)]) if Ped[1] then destroyElement(Ped[1]) Ped[1] = nil end local x, y, z, lx, ly, lz = foundPos(1), foundPos(2), foundPos(3), foundPos(4), foundPos(5), foundPos(6) wasFoundCamAndPed = foundTeam local pedx, pedy, pedz = foundPos(7), foundPos(8), foundPos(9) Ped[1] = createPed(ID, pedx, pedy, pedz, Rot[number]) if not isElement(Ped[1]) then Ped[1] = createPed(ID, pedx, pedy, pedz, Rot[number]) end setElementFrozen(Ped[1], true) setPedAnimation(Ped[1], "DANCING", Anims[math.random(1, 6)]) setCameraMatrix(x, y, z, lx, ly, lz) end function TextColor(numbe) if TeamName[numbe] == "Grove" then Color = {0, 255, 0} elseif TeamName[numbe] == "Aztecas" then Color = {0, 150, 255} Link to comment
PaiN^ Posted December 16, 2013 Share Posted December 16, 2013 غير السطور 299 - 300 بهذا : { 1586.31616, -1690.74158, 6.21875 }, { 1579.48499 -1635.17407 13.56156 } Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now