max-mohammed Posted January 18, 2014 Posted January 18, 2014 (edited) شباب انا سويت قيم مود هجولة وحرب بس والله فيه مشكلة انه مرة مو راضي يشتغل الملف واحد بس كلنت: wnd = guiCreateStaticImage(0, 0, 1023, 767, "wnd.png", false) label = guiCreateLabel(463, 137, 525, 83, "اختر اللعبة:", false, wnd) guiLabelSetColor(label, 0, 12, 254) hajwala = guiCreateStaticImage(136, 246, 289, 281, "haj.png", false, wnd) war = guiCreateStaticImage(600, 246, 289, 281, "war.png", false, wnd) war1 = guiCreateStaticImage(600, 246, 289, 281, "war1.png", false, wnd) war2 = guiCreateStaticImage(136, 246, 289, 281, "war2.png", false, wnd) guiSetAlpha(hajwala,0.5) guiSetAlpha(war,0.5) showCursor(true) guiSetVisible(war1,false) guiSetVisible(war2,false) harb1 = createTeam ('harb1', 0, 0, 255) harb2 = createTeam ('harb2', 0, 255, 0) addEventHandler("onClientGUIClick",guiRoot, function(player) if source == hajwala then guiSetVisible(wnd,false) spawnPlayer (player, -3728.6884765625+math.random(5,9), -3000.7194824219+math.random(5,9), 144.79627990723, 0, 46, 0, 0) end end ) addEventHandler("onClientGUIClick",guiRoot, function() if source == war then guiSetVisible(hajwala,false) guiSetVisible(war,false) guiSetVisible(war1,true) guiSetVisible(war2,true) guiSetAlpha(war1,0.5) guiSetAlpha(war2,0.5) guiSetText(label, "اختر فريقك:") end end ) addEventHandler("onClientGUIClick",guiRoot, function(player) if source == war1 then setPlayerTeam(player,harb1) setTeamFriendlyFire(harb1,true) guiSetVisible(wnd,false) spawnPlayer(player, 135.27740478516+math.random(2,5), -2839.3776855469+math.random(2,5), 20.616813659668, 0, 29, 0, 900) end end ) addEventHandler("onClientGUIClick",guiRoot, function(player) if source == war2 then setPlayerTeam(player,harb2) setTeamFriendlyFire(harb2,true) guiSetVisible(wnd,false) spawnPlayer(player, 350.7763671875+math.random(2,5), -2534.1940917969+math.random(2,5), 20.61190032959, 0, 285, 0, 900) end end ) addEventHandler("onClientMouseEnter",guiRoot, function() if source == hajwala then guiSetAlpha(hajwala,1) end end ) addEventHandler("onClientMouseLeave",guiRoot, function() if source == hajwala then guiSetAlpha(hajwala,0.5) end end ) addEventHandler("onClientMouseEnter",guiRoot, function() if source == war then guiSetAlpha(war,1) end end ) addEventHandler("onClientMouseLeave",guiRoot, function() if source == war then guiSetAlpha(war,0.5) end end ) addEventHandler("onClientMouseEnter",guiRoot, function() if source == war1 then guiSetAlpha(war,1) end end ) addEventHandler("onClientMouseLeave",guiRoot, function() if source == war1 then guiSetAlpha(war,0.5) end end ) addEventHandler("onClientMouseEnter",guiRoot, function() if source == war2 then guiSetAlpha(war,1) end end ) addEventHandler("onClientMouseLeave",guiRoot, function() if source == war2 then guiSetAlpha(war,0.5) end end ) addEventHandler("onClientPlayerWasted",root, function(player) if getPlayerTeam(player) == harb1 then spawnPlayer(player, 135.27740478516+math.random(2,5), -2839.3776855469+math.random(2,5), 20.616813659668,0, 29, 0, 900) elseif getPlayerTeam(player) == harb2 then spawnPlayer(player, 350.7763671875+math.random(2,5), -2534.1940917969+math.random(2,5), 20.61190032959, 0, 285, 0, 900) else spawnPlayer (player, -3728.6884765625+math.random(5,9), -3000.7194824219+math.random(5,9), 144.79627990723, 0, 46, 0, 0) end end ) Edited January 18, 2014 by Guest
K1NG Posted January 18, 2014 Posted January 18, 2014 . شي طبيعي ما رح يشتغل، لانك مسوي كوكتيل كلنت مع سيرفر
max-mohammed Posted January 18, 2014 Author Posted January 18, 2014 طيب حدد لي الوظائف الي لازم افصلها عن كلنت واحطها في سيرفر
shwaeki Posted January 18, 2014 Posted January 18, 2014 خخخخخخ يب سوي ترفل من كلنت يا سيرفر و كل ملفات السيرفر شيلهم حطهم في ملف السيرفر
#DRAGON!FIRE Posted January 18, 2014 Posted January 18, 2014 (edited) طيب حدد لي الوظائف الي لازم افصلها عن كلنت واحطها في سيرفر spawnPlayer setPlayerTeam createTeam setTeamFriendlyFire Edited January 18, 2014 by Guest
max-mohammed Posted January 18, 2014 Author Posted January 18, 2014 الكود اشتغل تمام بس لما اضغط الحرب او الهجولة ما يبي يسوي سباون ولا يبي يسوي انتقال للتيم Server Side! harb1 = createTeam ("harb1", 0, 0, 255) harb2 = createTeam ("harb2", 0, 255, 0) addEvent( "hajspawn", true ) addEventHandler( "hajspawn", root, function(player) spawnPlayer (player, -3728.6884765625+math.random(5,9), -3000.7194824219+math.random(5,9), 144.79627990723, 0, 46, 0, 0) end ) addEvent( "war1spawn", true ) addEventHandler( "war1spawn", root, function(player) setPlayerTeam(player,harb1) setTeamFriendlyFire(harb1,true) spawnPlayer(player, 135.27740478516+math.random(2,5), -2839.3776855469+math.random(2,5), 20.616813659668, 0, 29, 0, 900) end ) addEvent( "war2spawn", true ) addEventHandler( "war2spawn", root, function(player) setPlayerTeam(player,harb2) setTeamFriendlyFire(harb2,true) spawnPlayer(player, 350.7763671875+math.random(2,5), -2534.1940917969+math.random(2,5), 20.61190032959, 0, 285, 0, 900) end ) addEventHandler("onClientPlayerWasted",root, function(player) if getPlayerTeam(player) == harb1 then spawnPlayer(player, 135.27740478516+math.random(2,5), -2839.3776855469+math.random(2,5), 20.616813659668,0, 29, 0, 900) elseif getPlayerTeam(player) == harb2 then spawnPlayer(player, 350.7763671875+math.random(2,5), -2534.1940917969+math.random(2,5), 20.61190032959, 0, 285, 0, 900) else spawnPlayer (player, -3728.6884765625+math.random(5,9), -3000.7194824219+math.random(5,9), 144.79627990723, 0, 46, 0, 0) end end ) Client Side! wnd = guiCreateStaticImage(0, 0, 1023, 767, "wnd.png", false) label = guiCreateLabel(463, 137, 525, 83, "اختر اللعبة:", false, wnd) guiLabelSetColor(label, 0, 12, 254) hajwala = guiCreateStaticImage(136, 246, 289, 281, "haj.png", false, wnd) war = guiCreateStaticImage(600, 246, 289, 281, "war.png", false, wnd) war1 = guiCreateStaticImage(600, 246, 289, 281, "war1.png", false, wnd) war2 = guiCreateStaticImage(136, 246, 289, 281, "war2.png", false, wnd) guiSetAlpha(hajwala,0.5) guiSetAlpha(war,0.5) showCursor(true) guiSetVisible(war1,false) guiSetVisible(war2,false) addEventHandler("onClientGUIClick",guiRoot, function(player) if source == hajwala then guiSetVisible(wnd,false) triggerServerEvent("hajspawn",player) showCursor(false) end end ) addEventHandler("onClientGUIClick",guiRoot, function() if source == war then guiSetVisible(hajwala,false) guiSetVisible(war,false) guiSetVisible(war1,true) guiSetVisible(war2,true) guiSetAlpha(war1,0.5) guiSetAlpha(war2,0.5) guiSetText(label, "اختر فريقك:") end end ) addEventHandler("onClientGUIClick",guiRoot, function(player) if source == war1 then guiSetVisible(wnd,false) triggerServerEvent("war1spawn",player) showCursor(false) end end ) addEventHandler("onClientGUIClick",guiRoot, function(player) if source == war2 then guiSetVisible(wnd,false) triggerServerEvent("war2spawn",player) showCursor(false) end end ) addEventHandler("onClientMouseEnter",guiRoot, function() if source == hajwala then guiSetAlpha(hajwala,1) end end ) addEventHandler("onClientMouseLeave",guiRoot, function() if source == hajwala then guiSetAlpha(hajwala,0.5) end end ) addEventHandler("onClientMouseEnter",guiRoot, function() if source == war then guiSetAlpha(war,1) end end ) addEventHandler("onClientMouseLeave",guiRoot, function() if source == war then guiSetAlpha(war,0.5) end end ) addEventHandler("onClientMouseEnter",guiRoot, function() if source == war1 then guiSetAlpha(war1,1) end end ) addEventHandler("onClientMouseLeave",guiRoot, function() if source == war1 then guiSetAlpha(war1,0.5) end end ) addEventHandler("onClientMouseEnter",guiRoot, function() if source == war2 then guiSetAlpha(war2,1) end end ) addEventHandler("onClientMouseLeave",guiRoot, function() if source == war2 then guiSetAlpha(war2,0.5) end end )
max-mohammed Posted January 18, 2014 Author Posted January 18, 2014 الكود اشتغل تمامبس لما اضغط الحرب او الهجولة ما يبي يسوي سباون ولا يبي يسوي انتقال للتيم Server Side! harb1 = createTeam ("harb1", 0, 0, 255) harb2 = createTeam ("harb2", 0, 255, 0) addEvent( "hajspawn", true ) addEventHandler( "hajspawn", root, function(player) spawnPlayer (player, -3728.6884765625+math.random(5,9), -3000.7194824219+math.random(5,9), 144.79627990723, 0, 46, 0, 0) end ) addEvent( "war1spawn", true ) addEventHandler( "war1spawn", root, function(player) setPlayerTeam(player,harb1) setTeamFriendlyFire(harb1,true) spawnPlayer(player, 135.27740478516+math.random(2,5), -2839.3776855469+math.random(2,5), 20.616813659668, 0, 29, 0, 900) end ) addEvent( "war2spawn", true ) addEventHandler( "war2spawn", root, function(player) setPlayerTeam(player,harb2) setTeamFriendlyFire(harb2,true) spawnPlayer(player, 350.7763671875+math.random(2,5), -2534.1940917969+math.random(2,5), 20.61190032959, 0, 285, 0, 900) end ) addEventHandler("onClientPlayerWasted",root, function(player) if getPlayerTeam(player) == harb1 then spawnPlayer(player, 135.27740478516+math.random(2,5), -2839.3776855469+math.random(2,5), 20.616813659668,0, 29, 0, 900) elseif getPlayerTeam(player) == harb2 then spawnPlayer(player, 350.7763671875+math.random(2,5), -2534.1940917969+math.random(2,5), 20.61190032959, 0, 285, 0, 900) else spawnPlayer (player, -3728.6884765625+math.random(5,9), -3000.7194824219+math.random(5,9), 144.79627990723, 0, 46, 0, 0) end end ) Client Side! wnd = guiCreateStaticImage(0, 0, 1023, 767, "wnd.png", false) label = guiCreateLabel(463, 137, 525, 83, "اختر اللعبة:", false, wnd) guiLabelSetColor(label, 0, 12, 254) hajwala = guiCreateStaticImage(136, 246, 289, 281, "haj.png", false, wnd) war = guiCreateStaticImage(600, 246, 289, 281, "war.png", false, wnd) war1 = guiCreateStaticImage(600, 246, 289, 281, "war1.png", false, wnd) war2 = guiCreateStaticImage(136, 246, 289, 281, "war2.png", false, wnd) guiSetAlpha(hajwala,0.5) guiSetAlpha(war,0.5) showCursor(true) guiSetVisible(war1,false) guiSetVisible(war2,false) addEventHandler("onClientGUIClick",guiRoot, function(player) if source == hajwala then guiSetVisible(wnd,false) triggerServerEvent("hajspawn",player) showCursor(false) end end ) addEventHandler("onClientGUIClick",guiRoot, function() if source == war then guiSetVisible(hajwala,false) guiSetVisible(war,false) guiSetVisible(war1,true) guiSetVisible(war2,true) guiSetAlpha(war1,0.5) guiSetAlpha(war2,0.5) guiSetText(label, "اختر فريقك:") end end ) addEventHandler("onClientGUIClick",guiRoot, function(player) if source == war1 then guiSetVisible(wnd,false) triggerServerEvent("war1spawn",player) showCursor(false) end end ) addEventHandler("onClientGUIClick",guiRoot, function(player) if source == war2 then guiSetVisible(wnd,false) triggerServerEvent("war2spawn",player) showCursor(false) end end ) addEventHandler("onClientMouseEnter",guiRoot, function() if source == hajwala then guiSetAlpha(hajwala,1) end end ) addEventHandler("onClientMouseLeave",guiRoot, function() if source == hajwala then guiSetAlpha(hajwala,0.5) end end ) addEventHandler("onClientMouseEnter",guiRoot, function() if source == war then guiSetAlpha(war,1) end end ) addEventHandler("onClientMouseLeave",guiRoot, function() if source == war then guiSetAlpha(war,0.5) end end ) addEventHandler("onClientMouseEnter",guiRoot, function() if source == war1 then guiSetAlpha(war1,1) end end ) addEventHandler("onClientMouseLeave",guiRoot, function() if source == war1 then guiSetAlpha(war1,0.5) end end ) addEventHandler("onClientMouseEnter",guiRoot, function() if source == war2 then guiSetAlpha(war2,1) end end ) addEventHandler("onClientMouseLeave",guiRoot, function() if source == war2 then guiSetAlpha(war2,0.5) end end ) صح ولا لا ردو
xX|KeMo|Xx Posted January 18, 2014 Posted January 18, 2014 wnd = guiCreateStaticImage(0, 0, 1023, 767, "wnd.png", false) label = guiCreateLabel(463, 137, 525, 83, "اختر اللعبة:", false, wnd) guiLabelSetColor(label, 0, 12, 254) hajwala = guiCreateStaticImage(136, 246, 289, 281, "haj.png", false, wnd) war = guiCreateStaticImage(600, 246, 289, 281, "war.png", false, wnd) war1 = guiCreateStaticImage(600, 246, 289, 281, "war1.png", false, wnd) war2 = guiCreateStaticImage(136, 246, 289, 281, "war2.png", false, wnd) guiSetAlpha(hajwala,0.5) guiSetAlpha(war,0.5) showCursor(true) guiSetVisible(war1,false) guiSetVisible(war2,false) addEventHandler("onClientGUIClick",root, function() if source == hajwala then guiSetVisible(wnd,false) triggerServerEvent("hajspawn",getLocalPlayer()) showCursor(false) elseif source == war then guiSetVisible(hajwala,false) guiSetVisible(war,false) guiSetVisible(war1,true) guiSetVisible(war2,true) guiSetAlpha(war1,0.5) guiSetAlpha(war2,0.5) guiSetText(label, "اختر فريقك:") elseif source == war1 then guiSetVisible(wnd,false) triggerServerEvent("war1spawn",getLocalPlayer()) showCursor(false) elseif source == war2 then guiSetVisible(wnd,false) triggerServerEvent("war2spawn",getLocalPlayer()) showCursor(false) end end ) addEventHandler("onClientMouseEnter",root, function() if source == hajwala then guiSetAlpha(hajwala,1) elseif source == war then guiSetAlpha(war,1) elseif source == war1 then guiSetAlpha(war1,1) elseif source == war2 then guiSetAlpha(war2,1) end end ) addEventHandler("onClientMouseLeave",root, function() if source == hajwala then guiSetAlpha(hajwala,0.5) elseif source == war then guiSetAlpha(war,0.5) elseif source == war1 then guiSetAlpha(war1,0.5) elseif source == war2 then guiSetAlpha(war2,0.5) end end )
max-mohammed Posted January 18, 2014 Author Posted January 18, 2014 مانفع بس الكونسول يقول Bad argument @ 'spawnPlayer' Bad argument @ 'setPlayerTeam'
#Al-Ha[J]aRii Posted January 18, 2014 Posted January 18, 2014 Server Side ! harb1 = createTeam ("harb1", 0, 0, 255) harb2 = createTeam ("harb2", 0, 255, 0) addEvent( "hajspawn", true ) addEventHandler( "hajspawn", root, function() spawnPlayer (source, -3728.6884765625+math.random(5,9), -3000.7194824219+math.random(5,9), 144.79627990723, 0, 46, 0, 0) end ) addEvent( "war1spawn", true ) addEventHandler( "war1spawn", root, function() setPlayerTeam(source,harb1) setTeamFriendlyFire(harb1,true) spawnPlayer(source, 135.27740478516+math.random(2,5), -2839.3776855469+math.random(2,5), 20.616813659668, 0, 29, 0, 900) end ) addEvent( "war2spawn", true ) addEventHandler( "war2spawn", root, function() setPlayerTeam(source,harb2) setTeamFriendlyFire(harb2,true) spawnPlayer(source, 350.7763671875+math.random(2,5), -2534.1940917969+math.random(2,5), 20.61190032959, 0, 285, 0, 900) end )
</Mr.Tn6eL> Posted January 18, 2014 Posted January 18, 2014 كودات السيرفر = برتقالي كودات الكلنت = احمر كودات الكلنت والسيرفر = ازرق للمعلوميه فقط
max-mohammed Posted January 21, 2014 Author Posted January 21, 2014 طيب انا عدلت كود الريسباون حطيت له تايمر بس مانفع function wasted() if getPlayerTeam(source) == harb1 then spawnPlayer(source, 135.27740478516+math.random(2,5), -2839.3776855469+math.random(2,5), 20.616813659668,0, 29, 0, 900) elseif getPlayerTeam(source) == harb2 then spawnPlayer(source, 350.7763671875+math.random(2,5), -2534.1940917969+math.random(2,5), 20.61190032959, 0, 285, 0, 900) else spawnPlayer (source, -3728.6884765625+math.random(5,9), -3000.7194824219+math.random(5,9), 144.79627990723, 0, 46, 0, 0) end end addEventHandler("onPlayerWasted",root, setTimer(wasted,3000,1,source))
#DRAGON!FIRE Posted January 21, 2014 Posted January 21, 2014 طيب انا عدلت كود الريسباونحطيت له تايمر بس مانفع function wasted() if getPlayerTeam(source) == harb1 then spawnPlayer(source, 135.27740478516+math.random(2,5), -2839.3776855469+math.random(2,5), 20.616813659668,0, 29, 0, 900) elseif getPlayerTeam(source) == harb2 then spawnPlayer(source, 350.7763671875+math.random(2,5), -2534.1940917969+math.random(2,5), 20.61190032959, 0, 285, 0, 900) else spawnPlayer (source, -3728.6884765625+math.random(5,9), -3000.7194824219+math.random(5,9), 144.79627990723, 0, 46, 0, 0) end end addEventHandler("onPlayerWasted",root, setTimer(wasted,3000,1,source)) الكود عفسة .. وش تبي تسوي انت ؟
max-mohammed Posted January 21, 2014 Author Posted January 21, 2014 ابي لو مات يسوي رسباون بعد 3 ثواني الي هو الفنكشن wasted
#DRAGON!FIRE Posted January 21, 2014 Posted January 21, 2014 ابي لو مات يسوي رسباون بعد 3 ثواني الي هو الفنكشن wasted addEventHandler( "onPlayerWasted", root, function ( ) if ( getPlayerTeam( source ) and getPlayerTeam( source ) == harb1 ) then setTimer( spawnPlayer, 3000, 1, source, 135.27740478516+math.random(2,5), -2839.3776855469+math.random(2,5), 20.616813659668,0, 29, 0, 900 )0) elseif ( getPlayerTeam( source ) and getPlayerTeam( source ) == harb2 ) then setTimer( spawnPlayer, 3000, 1, source, 350.7763671875+math.random(2,5), -2534.1940917969+math.random(2,5), 20.61190032959, 0, 285, 0, 900 ) else setTimer( spawnPlayer, 3000, 1, -3728.6884765625+math.random(5,9), -3000.7194824219+math.random(5,9), 144.79627990723, 0, 46, 0, 0) end end )
max-mohammed Posted January 22, 2014 Author Posted January 22, 2014 طيب ممكن اسئلك حاجة في خارج هذا الموضوع السؤال ايش الكومند والفنكشن الي ما يخلون الزر mange acl موشغال يعني مثلا رتبة موديتور تقدر تشغل مود وتخش التب حق المودات بس الزر mange acl مقفول مايمديه يخش function.????????? command.?????????
K1NG Posted January 22, 2014 Posted January 22, 2014 طيب ممكن اسئلك حاجة في خارج هذا الموضوعالسؤال ايش الكومند والفنكشن الي ما يخلون الزر mange acl موشغال يعني مثلا رتبة موديتور تقدر تشغل مود وتخش التب حق المودات بس الزر mange acl مقفول مايمديه يخش function.????????? command.????????? https://forum.multitheftauto.com/viewtopic.php?f=119&t=49133#p481948
max-mohammed Posted January 22, 2014 Author Posted January 22, 2014 طيب ممكن فنكشن يجيب عدد الاعبين في التيم
K1NG Posted January 22, 2014 Posted January 22, 2014 طيب ممكن فنكشنيجيب عدد الاعبين في التيم countPlayersInTeam
max-mohammed Posted January 22, 2014 Author Posted January 22, 2014 جرب بس مانفع مع ان الكود ينفع على كلنت وسيرفر label2 = guiCreateLabel(699, 541, 336, 39, "يوجد " .. countPlayersInTeam ("harb2") .. " في الفريق:", false, wnd) guiLabelSetColor(label2, 120, 254, 0) label3 = guiCreateLabel(249, 537, 336, 39, "يوجد " .. countPlayersInTeam ("harb1") .. " في الفريق", false, wnd)
al-Kobra Posted January 22, 2014 Posted January 22, 2014 (edited) جرب بس مانفع مع ان الكود ينفع على كلنت وسيرفر label2 = guiCreateLabel(699, 541, 336, 39, "يوجد " .. countPlayersInTeam ("harb2") .. " في الفريق:", false, wnd) guiLabelSetColor(label2, 120, 254, 0) label3 = guiCreateLabel(249, 537, 336, 39, "يوجد " .. countPlayersInTeam ("harb1") .. " في الفريق", false, wnd) local t1 = getTeamFromName ( "harb1" ) local t2 = getTeamFromName ( "harb2" ) local team1 = countPlayersInTeam (t1) local team2 = countPlayersInTeam (t2) label2 = guiCreateLabel(699, 541, 336, 39, "يوجد "..team1.." في الفريق:", false, wnd) guiLabelSetColor(label2, 120, 254, 0) label3 = guiCreateLabel(249, 537, 336, 39, "يوجد "..team2.." في الفريق", false, wnd) جرب Edited January 22, 2014 by Guest
max-mohammed Posted January 22, 2014 Author Posted January 22, 2014 جرب بس مانفع مع ان الكود ينفع على كلنت وسيرفر label2 = guiCreateLabel(699, 541, 336, 39, "يوجد " .. countPlayersInTeam ("harb2") .. " في الفريق:", false, wnd) guiLabelSetColor(label2, 120, 254, 0) label3 = guiCreateLabel(249, 537, 336, 39, "يوجد " .. countPlayersInTeam ("harb1") .. " في الفريق", false, wnd) local t1 = getTeamFromName ( "harb1" ) local t2 = getTeamFromName ( "harb2" ) local team1 = countPlayersInTeam (t1) local team1 = countPlayersInTeam (t2) label2 = guiCreateLabel(699, 541, 336, 39, "يوجد "..team1.." في الفريق:", false, wnd) guiLabelSetColor(label2, 120, 254, 0) label3 = guiCreateLabel(249, 537, 336, 39, "يوجد "..team2.." في الفريق", false, wnd) جرب ماضبط
max-mohammed Posted January 22, 2014 Author Posted January 22, 2014 مشكووووور نفع بعد التعديل الغلط انك كررت team1 مريتين بس مشكووور
al-Kobra Posted January 22, 2014 Posted January 22, 2014 مشكووووور نفع بعد التعديلالغلط انك كررت team1 مريتين بس مشكووور حياك
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