
Hamza Elsayed
Members-
Posts
119 -
Joined
-
Last visited
Everything posted by Hamza Elsayed
-
شكلك مش واخد بالك هوا بيقولي --هنا تكمل أكوادك في فنكشن واحد
-
لو كل الأكواد صارت في فنكشن bobuao وين أودي باقي التريقرات
-
تقصد هيك ؟؟ function bobuaou(remaining) addEventHandler ( "onClientRender", source, bobuao ) end addEvent("moka", true) addEventHandler("moka", getRootElement(), bobuaou) function bobuao(remaining) dxDrawText("Time : "..remaining/60000, 574, 543, 790, 590, tocolor(255, 187, 23, 255), 1.50, "beckett", "left", "top", false, false, false, false, false) end
-
ممكن توضحلي علي الكود الي أنا كتبته
-
أخي لما سويت هيك سيرفر addEventHandler('onPlayerDamage',root,function(attacker,weapon) if attacker and attacker ~= source and getElementType(attacker) == 'player' and getPlayerTeam(attacker) and getTeamName(getPlayerTeam(attacker)) == 'Police' then if getPlayerWantedLevel(source) > 0 and getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) ~= 'Police' then if ( weapon == 3 ) then setElementPosition (source, unpack(jaja[math.random( #jaja )])) if getPlayerWantedLevel(source) == 6 then ngo = setTimer ( setElementPosition, 360000, 1,source , 1572.9000244141, -1635.4000244141, 13.60000038147) remaining, executesRemaining, totalExecutes = getTimerDetails(ngo) triggerClientEvent (source,"moka",getRootElement(), remaining) elseif getPlayerWantedLevel(source) == 5 then ngo1 = setTimer ( setElementPosition, 300000, 1,source , 1572.9000244141, -1635.4000244141, 13.60000038147) remaining, executesRemaining, totalExecutes = getTimerDetails(ngo1) triggerClientEvent (source,"moka1",getRootElement(), remaining) elseif getPlayerWantedLevel(source) == 4 then ngo2 = setTimer ( setElementPosition, 240000, 1,source , 1572.9000244141, -1635.4000244141, 13.60000038147) remaining, executesRemaining, totalExecutes = getTimerDetails(ngo2) triggerClientEvent (source,"moka2",getRootElement(), remaining) elseif getPlayerWantedLevel(source) <= 3 then ngo3 = setTimer ( setElementPosition, 180000, 1,source , 1572.9000244141, -1635.4000244141, 13.60000038147) remaining, executesRemaining, totalExecutes = getTimerDetails(ngo3) triggerClientEvent (source,"moka3",getRootElement(), remaining) end end end end end ) وكلينت function bobuao(remaining) dxDrawText("Time : "..remaining/1000, 574, 543, 790, 590, tocolor(255, 187, 23, 255), 1.50, "beckett", "left", "top", false, false, false, false, false) end addEvent("moka", true) addEventHandler("moka", getRootElement(), bobuao) function bobuao1(remaining) dxDrawText("Time : "..remaining/1000, 574, 543, 790, 590, tocolor(255, 187, 23, 255), 1.50, "beckett", "left", "top", false, false, false, false, false) end addEvent("moka1", true) addEventHandler("moka1", getRootElement(), bobuao1) function bobuao2(remaining) dxDrawText("Time : "..remaining/1000, 574, 543, 790, 590, tocolor(255, 187, 23, 255), 1.50, "beckett", "left", "top", false, false, false, false, false) end addEvent("moka2", true) addEventHandler("moka2", getRootElement(), bobuao2) function bobuao3(remaining) dxDrawText("Time : "..remaining/1000, 574, 543, 790, 590, tocolor(255, 187, 23, 255), 1.50, "beckett", "left", "top", false, false, false, false, false) end addEvent("moka3", true) addEventHandler("moka3", getRootElement(), bobuao3) يظهر الـ DxDrawText ويختفي في حينها ما المشكلة ؟؟
-
أخي جاري التجربة بس علي ما أظن الوقت ما راح يقل
-
السلام عليكم أريد كود يحول الوقت من milliseconds إلي ثواني لأني أريد أن يظهر الوقت المتبقي للسجين في مود السجن بالثواني أرجو الناس تكون فهمتني وشكراً
-
هههههههههههههه فعلاً وتم حل المشكلة الحمدلله
-
أيه هيا السكور بورد score = سكور board = بورد = scoreboard شكراااااااااااااً تم حل المشكلة
-
أيه هيا السكور بورد
-
سويت هيك وبرضو ما أشتغل addEventHandler("onPlayerWasted", getRootElement(), function() if isElement( source ) and getElementType( source ) == "player" then local iad = getElementModel ( source ) local x, y, z = getElementPosition ( source ) local city = getZoneName ( x, y, z, true ) local tma = getPlayerTeam(source) local Ballaso = getTeamFromName ("Ballas") local NoTeamo = getTeamFromName ("NoTeam") local Aztecaso = getTeamFromName ("Aztecas") local Groveo = getTeamFromName ("Grove") local Medico = getTeamFromName ("Medic") local Policeo = getTeamFromName ("Police") if tma == NoTeamo or tma == Ballaso or tma == Aztecaso or tma == Groveo then if (city == "Los Santos") then local xne, yne, zne = unpack(rnd[math.random(1, 6)]) spawnPlayer (source, xne, yne, zne, 0, iad, 0, 0 ) elseif (city == "Las Venturas") then local xna, yna, zna = unpack(rnd[math.random(6, 12)]) spawnPlayer (source, xna, yna, zna, 0, iad, 0, 0) elseif (city == "San Fierro") then local xnc, ync, znc = unpack(rnd[math.random(12, 18)]) spawnPlayer (source, xnc, ync, znc, 0, iad, 0, 0) end elseif (tma == Medico) then if (city == "Los Santos") then local xme, yme, zme = unpack(rmd[math.random(1, 2)]) spawnPlayer (source, xme, yme, zme, 0, iad, 0, 0 ) elseif (city == "Las Venturas") then local xma, yma, zma = unpack(rmd[math.random(3, 3)]) spawnPlayer (source, xma, yma, zma, 0, iad, 0, 0) elseif (city == "San Fierro") then local xmc, ymc, zmc = unpack(rmd[math.random(4, 4)]) spawnPlayer (source, xmc, ymc, zmc, 0, iad, 0, 0) end elseif (tma == Policeo) then local xp, yp, zp = unpack(rpd[math.random(1,6)]) spawnPlayer(source, xp, yp, zp, 0, iad, 0, 0) end end end )
-
حذفته وما أشتغل
-
السلام عليكم سويت كود لعمل سباون للاعب عندما يموت لكن ما يعمل Grove = createTeam("Grove", 0, 255, 0) Ballas = createTeam("Ballas", 255, 0, 255) Medic = createTeam("Medic", 0, 255, 255) Police = createTeam("Police", 0, 0, 255) Aztecas = createTeam("Aztecas", 0, 204, 204) NoTeam = createTeam("NoTeam", 255, 0, 0) local rnd = { -- los {2047.8, -1899.8, 14.5}, {958.1, -1356.7, 14.3}, {1128.7, -1490.5, 23.8}, {2144.1, -1803.2, 17.1}, {1716.9, -1682.1, 21.2}, {1975.6, -1284.7, 29.5}, -- las {2027, 1916.7, 13.3}, {2565.1, 1212.8, 15.3}, {2535.5, 997.8, 15.3}, {2542.3, 2213.5, 15.1}, {2261.4, 2333.3, 11.8}, {1954.2, 2323.9, 11.8}, -- san {-1838.9, 1085, 46.1 }, {-1685.6, 1109.7, 54.7}, {-1951.5, 692.7, 46.6}, {-2055, 457, 35.2}, {-1812.3, 574.3, 35.2}, {-2563, 220, 13}, } local rmd = { {1178.1999511719, -1323.8000488281, 15.10000038147}, {2040, -1417.3000488281, 18.200000762939}, {1607.1999511719, 1822.3000488281, 11.800000190735}, {-2643.3999023438, 603.09997558594, 15.5}, } local rpd = { {1572.9000244141, -1635.4000244141, 13.60000038147}, {1563.9000244141, -1635.1999511719, 13.60000038147}, {1555.5999755859, -1635.0999755859, 13.60000038147}, {1572.8000488281, -1620.3000488281, 13.5}, {1564.4000244141, -1620.4000244141, 13.5}, {1557.9000244141, -1620.1999511719, 13.5}, } addEventHandler("onPlayerWasted", getRootElement(), function( source ) if isElement( source ) and getElementType( source ) == "player" then local iad = getElementModel ( source ) local x, y, z = getElementPosition ( source ) local city = getZoneName ( x, y, z, true ) local tma = getPlayerTeam(source) if (tma == "NoTeam") or (tma == "Ballas") or (tma == "Aztecas") or (tma == "Grove") then if (city == "Los Santos") then local xne, yne, zne = unpack(rnd[math.random(1, 6)]) spawnPlayer (source, xne, yne, zne, 0, iad, 0, 0 ) elseif (city == "Las Venturas") then local xna, yna, zna = unpack(rnd[math.random(6, 12)]) spawnPlayer (source, xna, yna, zna, 0, iad, 0, 0) elseif (city == "San Fierro") then local xnc, ync, znc = unpack(rnd[math.random(12, 18)]) spawnPlayer (source, xnc, ync, znc, 0, iad, 0, 0) end elseif (tma == "Medic") then if (city == "Los Santos") then local xme, yme, zme = unpack(rmd[math.random(1, 2)]) spawnPlayer (source, xme, yme, zme, 0, iad, 0, 0 ) elseif (city == "Las Venturas") then local xma, yma, zma = unpack(rmd[math.random(3, 3)]) spawnPlayer (source, xma, yma, zma, 0, iad, 0, 0) elseif (city == "San Fierro") then local xmc, ymc, zmc = unpack(rmd[math.random(4, 4)]) spawnPlayer (source, xmc, ymc, zmc, 0, iad, 0, 0) end elseif (tma == "Police") then local xp, yp, zp = unpack(rpd[math.random(1,6)]) spawnPlayer(source, xp, yp, zp, 0, iad, 0, 0) end end end ) ما بيظهر شئ بالدي بق وما يحدث سباون للاعب مرة أخري وتستمر الكاميرا في الصعود أرجو الحل
-
مشكوووووووووووووور تم حل المشكلة أسف علي كل التعب هذا
-
أخواني طيب سؤال تاني ما رضيت أضيفه في موضوضع جديد لأنه نفس السكربت الكود هذا Grove = createTeam ("Grove", 0, 255, 0) Ballas = createTeam ("Ballas", 255, 0, 255) Medic = createTeam ("Medic", 0, 255, 255) Police = createTeam ("Police", 0, 0, 255) Aztecas = createTeam ("Aztecas", 0, 204, 204) NoTeam = createTeam ("NoTeam", 255, 0, 0) local rnd = { n1 = {2047.8000488281, -1899.8000488281, 13.5}, n2 = {958.09997558594, -1356.6999511719, 13.300000190735}, n3 = {1128.6999511719, -1490.5, 22.799999237061}, n4 = {2144.1000976563, -1803.1999511719, 16.10000038147}, n5 = {1716.9000244141, -1682.0999755859, 20.200000762939}, n6 = {1975.5999755859, -1284.6999511719, 28.5}, n7 = {2027, 1916.6999511719, 12.300000190735}, n8 = {2565.1000976563, 1212.8000488281, 14.300000190735}, n9 = {2535.5, 997.79998779297, 14.300000190735}, n10 = {2542.3000488281, 2213.5, 14.10000038147}, n11 = {2261.3999023438, 2333.3000488281, 10.800000190735}, n12 = {1954.1999511719, 2323.8999023438, 10.800000190735}, } local teamSpawn = { ["Grove"] = {2498.6701660156, -1684.5754394531, 13.416213035583}, ["Aztecas"] = {2498.6701660156, -1684.5754394531, 13.416213035583}, ["Police"] = {2498.6701660156, -1684.5754394531, 13.416213035583}, ["Ballas"] = {2498.6701660156, -1684.5754394531, 13.416213035583}, ["NoTeam"] = {2498.6701660156, -1684.5754394531, 13.416213035583}, ["Medic"] = {2498.6701660156, -1684.5754394531, 13.416213035583}, } function SpawnNoTe (SkinID,team) setPlayerTeam(source,getTeamFromName(team)) setPlayerNametagColor ( source, 255, 0, 0 ) if (team == "NoTeam") then local xn,yn,zn = unpack ( rnd [ math.random ( 1, 12 ) ] ) spawnPlayer (source, xn,yn,zn, 0, SkinID, 0, 0) else local x,y,z = unpack(teamSpawn[team]) spawnPlayer (source, x,y,z, 0, SkinID, 0, 0) end fadeCamera(source, true) setCameraTarget(source, source) exports ["guimessages"] : outputServer (root,"أنت الأن في فريق "..team, 255, 0, 0) end addEvent("Client:Spawn", true) addEventHandler("Client:Spawn",root,SpawnNoTe) عندما أشغله الكود وأختار شخصية من فريق NoTeam ما يعمل سباون ولما جربت الدي بق طلعلي هيك .... أرجو الحل
-
تم الحل بفضل الله تعالي وبفضل Al W7sh & Tapl شكراً لكم
-
أخي غيرت أسم المتغير والمشكلة زي ما هيا بالدي بق
-
هههههههههههه انا قولت كدة برضه جاري التجربة
-
علي ما أظن ما في شي أسمه table.foreach
-
أخي الكود لا يعمل سباون وهذه صورة من الدي بق الكود من السطر 246 table.foreach(teams, function(teamName,sTable) table.foreach(sTable, function(_,id) if id == skin then local Team = teamName end end) end) أرجو حل المشكلة وشكراً
-
أخي أنا ضايف تيمات ومخليه كدة تجريبياً ....... Grove = createTeam ("Grove", 0, 255, 0) Ballas = createTeam ("Ballas", 255, 0, 255) Medic = createTeam ("Medic", 0, 255, 255) Police = createTeam ("Police", 0, 0, 255) Aztecas = createTeam ("Aztecas", 0, 204, 204) NoTeam = createTeam ("NoTeam", 255, 0, 0) function SpawnNoTe (SkinID) setPlayerTeam(source,NoTeam) setPlayerNametagColor ( source, 255, 0, 0 ) spawnPlayer (source, -2523.3408203125, -619.9560546875, 132.5625, 0, SkinID, 0, 0) fadeCamera(source, true) setCameraTarget(source, source) exports ["guimessages"] : outputServer (root, "أنت الأن في فريق No Team" , 255, 0, 0) end addEvent("spawnNT", true) addEventHandler("spawnNT",root,SpawnNoTe) function SpawnGro (SkinID) setPlayerTeam(source,Grove) setPlayerNametagColor ( source, 0, 255, 0 ) spawnPlayer (source, -2523.3408203125, -619.9560546875, 132.5625, 0, SkinID, 0, 0) fadeCamera(source, true) setCameraTarget(source, source) exports ["guimessages"] : outputServer (root, "أنت الأن في فريق Grove Street" , 0, 255, 0) end addEvent("spawnGR", true) addEventHandler("spawnGR",root,SpawnGro) function SpawnAzt ( ) setPlayerTeam(source,Aztecas) setPlayerNametagColor ( source, 0, 204, 204 ) spawnPlayer (source, -2523.3408203125, -619.9560546875, 132.5625, 0, ID, 0, 0) fadeCamera(source, true) setCameraTarget(source, source) exports ["guimessages"] : outputServer (root, "أنت الأن في فريق Aztecas" , 0, 204, 204) end addEvent("spawnAZ", true) addEventHandler("spawnAZ",root,SpawnAzt) function SpawnPol ( ) setPlayerTeam(source,Police) setPlayerNametagColor ( source, 0, 0, 255 ) spawnPlayer (source, -2523.3408203125, -619.9560546875, 132.5625, 0, ID, 0, 0) fadeCamera(source, true) setCameraTarget(source, source) exports ["guimessages"] : outputServer (root, "أنت الأن شرطي" , 0, 0, 255) end addEvent("spawnPO", true) addEventHandler("spawnPO",root,SpawnPol) function SpawnMed ( ) setPlayerTeam(source,Medic) setPlayerNametagColor ( source, 0, 255, 255 ) spawnPlayer (source, -2523.3408203125, -619.9560546875, 132.5625, 0, ID, 0, 0) fadeCamera(source, true) setCameraTarget(source, source) exports ["guimessages"] : outputServer (root, "أنت الأن طبيب" , 0, 255, 255) end addEvent("spawnME", true) addEventHandler("spawnME",root,SpawnMed) function SpawnBal ( ) setPlayerTeam(source,Medic) setPlayerNametagColor ( source, 255, 0, 255 ) spawnPlayer (source, -2523.3408203125, -619.9560546875, 132.5625, 0, ID, 0, 0) fadeCamera(source, true) setCameraTarget(source, source) exports ["guimessages"] : outputServer (root, "أنت الأن في فريق Ballas" , 255, 0, 255) end addEvent("spawnBA", true) addEventHandler("spawnBA",root,SpawnBal) المشكلة هيا إني لما بعمل حالة الشرط في كلينت أي نعم بيعمل سباون للشخصية الي أختارها الاعب لكن بينفذ إيفينت التريقر الأول الي هوا تريقر النو تيم ويظهر للاعب عندما يدخل في الـ Guimessages "أنت الان في فريق No Team " مثل ما هوا واضح في إيفنت spawnNT
-
أنا سويت هيك وبعدين ؟؟ local table = { Grove = {105, 106, 107}, Aztecas = {109,110,108,115,116}, Police = {283, 284, 285,163,164,165,166,265,266,267,280,281,282,283,284,285,286,287,288,312}, Ballas = {102, 103, 104}, NoTeam = {0,1,2,7,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,32,33,34,35,37,43,44,45,46,47,48,50,51,52,57,59,60,83,84,96,97}, Medic = {274, 275, 276} }
-
أخي ممكن مثال يوضح أكتر ؟؟
-
ياريت حد يفيدني
-
ولكن أخي عندما أصنع التيمات ستختلط التيمات مع بعضها ممكن تقولي كيف أخلي التريقر إذا كان الاعب قد إختار شخصيات محددة ؟؟