iMr.G[7]A Posted March 22, 2014 Share Posted March 22, 2014 سويت تيم شرطة وحطيت سكنآت يطلع لي 3 بس عدلوة تكفون local x, y = guiGetScreenSize() rRoot = getResourceRootElement(getThisResource()) Music = "Other/Intro.mp3" Anims = {"dnce_M_b", "dnce_M_b", "dnce_M_b", "dnce_M_b", "dnce_M_b", "dnce_M_b"} 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,311}, Aztecas = {115,116,114}, ["Police"] = {280,281,282, 283,284,285,286,288}, Ballas = {102,103,104}, ["No Team"] = {118,120,294,1,7,45,34, 146,144,240,247,248,33,32,44,111,112,113,118,120,121,122,123,124,125,126,127,128,132,133,134,135,136,84,82,83,137,158,159,160,161,162,170,171,173,174,175,176,98,177,179,180,181,182,183,184,185,186,187,188,189,209,212,220,224,211,221,223,229,230,241,62,292,296,293,242,249,250,261,264,43,46,47,48,49,50,51,52,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30,301,300,270,269,310,311,108,109,110,114,312,163,164,165,166,71,287,}, Medic = {274, 275, 276}, } AllTeamName = { Grove = {-687.7373046875,939.58288574219,14.707300186157,-686.75378417969,939.59674072266,14.527041435242,-684.25769042969,939.37127685547,13.6328125}, Aztecas = {-687.7373046875,939.58288574219,14.707300186157,-686.75378417969,939.59674072266,14.527041435242,-684.25769042969,939.37127685547,13.6328125}, ["Police"] = {-687.7373046875,939.58288574219,14.707300186157,-686.75378417969,939.59674072266,14.527041435242,-684.25769042969,939.37127685547,13.6328125}, Ballas = {-687.7373046875,939.58288574219,14.707300186157,-686.75378417969,939.59674072266,14.527041435242,-684.25769042969,939.37127685547,13.6328125}, ["No Team"] = {-687.7373046875,939.58288574219,14.707300186157,-686.75378417969,939.59674072266,14.527041435242,-684.25769042969,939.37127685547,13.6328125}, Medic = {-687.7373046875,939.58288574219,14.707300186157,-686.75378417969,939.59674072266,14.527041435242,-684.25769042969,939.37127685547,13.6328125}, } Rot = {-687.7373046875,939.58288574219,14.707300186157,-686.75378417969,939.59674072266,14.527041435242,-684.25769042969,939.37127685547,13.6328125} CamGameType = { {-687.7373046875,939.58288574219,14.707300186157,-686.75378417969,939.59674072266,14.527041435242} } 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() fadeCamera( true ) showChat(false) SpawnGameType() --[[ foundInTeam = "There are Players" foundInall = "all Players" GameType = {"Gang Wars"} Info = {"Wlecom To Gang Wars","To Spawn press [Enter]"} GameNameType = "Gang Wars" mn = nil 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() setTimer(MakeGangWars, 500, 1) TeamNameee = "اسم العصابة" 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 TeamName[number] and TeamName[number] == "No Team" then if findskin > #skin["No Team"] then findskin = 1 end else if findskin > 3 then findskin = 1 end end if num < 1 then num = 12+#skin["No Team"]+#skin['Medic'] foundTeam = 6 end if num == 1 or num == 3 then foundTeam = 1 end if num == 4 or num == 6 then foundTeam = 2 end if num == 7 or num == 9 then foundTeam = 3 end if num == 10 or num == 12 then foundTeam = 4 end if num == 13 or num == 12+#skin["No Team"] then foundTeam = 5 end if num == 12+#skin["No Team"]+1 or num == 12+#skin["No Team"] + #skin['Medic'] then foundTeam = 6 end if num > 12+#skin["No Team"] + #skin['Medic'] 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 Link to comment
G.KinG Posted March 22, 2014 Share Posted March 22, 2014 عدل من السطر 192 - 251 ترى القيم مود ذا لحسه ههههه Link to comment
iMr.G[7]A Posted March 22, 2014 Author Share Posted March 22, 2014 وش دراني وكيف اعدل عدله لي ~ Link to comment
shwaeki Posted March 23, 2014 Share Posted March 23, 2014 هاد الموضوع في نفس طلبك viewtopic.php?f=160&t=72943 بعدين حطهم كلهم في موضوع واحد مو ضروري كل طلب موضوع 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