فاّرس Posted July 29, 2016 Share Posted July 29, 2016 ^ سطر 7 الارقومنت الثاني هو رقم الاندكس، لازم تسوي لوب. Link to comment
Abdul KariM Posted July 29, 2016 Share Posted July 29, 2016 تم التعديل, يعطيك العافية على التنبيه <3 Link to comment
فاّرس Posted July 29, 2016 Share Posted July 29, 2016 break طيب دامك محدد قيمه استخدم عشان ماله داعي ياخذ لفه ع الجدول Link to comment
Wleed1998 Posted August 1, 2016 Author Share Posted August 1, 2016 break طيب دامك محدد قيمه استخدمعشان ماله داعي ياخذ لفه ع الجدول aTable = { } addEventHandler ( "onPlayerJoin",root,function() outputChatBox("تم بددآ المهم اذهب الى المآركه لـدخول الى المهمه",source, 50, 30, 255) outputChatBox("تم تغشيل المهمه",source, 0, 150, 255) end) --------create Marker local WarMission = createMarker(2727.24390,-1826.40039,11.84375, "cylinder", 2, 255, 150, 250, 150) --------Taple local war = { {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375},} -------- Event Marker addEventHandler( "onMarkerHit", WarMission,function (player) if getElementType(player) == "player" and not isPedInVehicle(player) then if #aTable >= 32 then return outputChatBox ( 'العدد مكتمل لايمكنك دخول المهمه', player ) end local x, y, z = unpack(war[math.random(#war)]) setElementPosition(player, x, y, z) setElementModel (player, 2) setElementDimension ( player, 6 ) giveWeapon ( player, 4, 1, true ) giveWeapon ( player, 27, 999999, true ) giveWeapon ( player, 31, 999999, true ) giveWeapon ( player, 30, 999999, true ) giveWeapon ( player, 16, 2, true ) giveWeapon ( player, 25, 999999, true ) toggleControl ( player, "fire", false ) setElementFrozen(player, true) if getPlayerTable ( player , aTable ) then return outputChatBox ( "انت بالمهمة الان" , player , 255 , 255 , 255 , true ) end; table.insert ( aTable , player ) setTimer ( toggleControl , 5000 , 1 , player , "fire" , true ) setTimer ( setElementFrozen , 5000 , 1 , player , false ) end end ) function getPlayerTable(player, Table) for i, v in ipairs (Table) do if (v == player) then return true end end end buttons = { ['F1'] = true, ['F2'] = true, ['F3'] = true, } addEventHandler( 'onClientKey', root, function (button , prees) if prees and getElementDimension(localPlayer) == 6 then if buttons[button] then outputChatBox("غير مصرح لك بفتح اللوحة الان ", source, 255, 0, 0) cancelEvent() end end end) addEventHandler( "onPlayerWasted", root, function ( ) if getPlayerTable ( player , aTable ) then for i , v in ipairs ( aTable ) do if ( v == source ) then table.remove ( aTable , i ); end if ( #aTable == 1 ) then player = aTable [ 1 ] givePlayerMoney ( player , 9999 ) killPed (player) end end end end ) addEventHandler( "onPlayerQuit", root, function() if getPlayerTable ( player , aTable ) then for i , v in ipairs ( aTable ) do if ( v == source ) then table.remove ( aTable , i ); end if ( #aTable == 1 ) then player = aTable [ 1 ] killPed ( player ) givePlayerMoney ( player , 9999 ) end end end end ) function dPlayers(player) if ( #aTable == 1 ) then player = aTable [ 1 ] killPed ( player ) givePlayerMoney ( player , 9999 ) end end مازبط Link to comment
N3xT Posted August 1, 2016 Share Posted August 1, 2016 جرب كذا Server aTable = { } function getPlayerTable(player, Table) for i, v in ipairs (Table) do if (v == player) then return true end end end addEventHandler ( "onPlayerJoin",root,function() outputChatBox("تم بددآ المهم اذهب الى المآركه لـدخول الى المهمه",source, 50, 30, 255) outputChatBox("تم تغشيل المهمه",source, 0, 150, 255) end) --------create Marker local WarMission = createMarker(2727.24390,-1826.40039,11.84375, "cylinder", 2, 255, 150, 250, 150) --------Taple local war = { {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, } -------- Event Marker addEventHandler( "onMarkerHit", WarMission,function (player) if getElementType(player) == "player" and not isPedInVehicle(player) then if #aTable >= 32 then return outputChatBox ( 'العدد مكتمل لايمكنك دخول المهمه', player ) end local x, y, z = unpack(war[math.random(#war)]) setElementPosition(player, x, y, z) setElementModel (player, 2) setElementDimension ( player, 6 ) giveWeapon ( player, 4, 1, true ) giveWeapon ( player, 27, 999999, true ) giveWeapon ( player, 31, 999999, true ) giveWeapon ( player, 30, 999999, true ) giveWeapon ( player, 16, 2, true ) giveWeapon ( player, 25, 999999, true ) toggleControl ( player, "fire", false ) setElementFrozen(player, true) if getPlayerTable ( player , aTable ) then return outputChatBox ( "انت بالمهمة الان" , player , 255 , 255 , 255 , true ) end table.insert ( aTable , player ) setTimer ( toggleControl , 5000 , 1 , player , "fire" , true ) setTimer ( setElementFrozen , 5000 , 1 , player , false ) end end ) addEventHandler( "onPlayerWasted", root, function ( ) if getPlayerTable ( source , aTable ) then for i , v in ipairs ( aTable ) do if ( v == source ) then table.remove ( aTable , i ); end if ( #aTable == 1 ) then source = aTable [ 1 ] givePlayerMoney ( source , 9999 ) killPed (source) end end end end ) addEventHandler( "onPlayerQuit", root, function() if getPlayerTable ( source , aTable ) then for i , v in ipairs ( aTable ) do if ( v == source ) then table.remove ( aTable , i ); end if ( #aTable == 1 ) then source = aTable [ 1 ] killPed ( source ) givePlayerMoney ( source , 9999 ) end end end end ) function dPlayers(player) if ( #aTable == 1 ) then player = aTable [ 1 ] killPed ( player ) givePlayerMoney ( player , 9999 ) end end Client buttons = { ['F1'] = true, ['F2'] = true, ['F3'] = true, } addEventHandler( 'onClientKey', root, function (button , prees) if prees and getElementDimension(localPlayer) == 6 then if buttons[button] then outputChatBox("غير مصرح لك بفتح اللوحة الان ", 255, 0, 0) cancelEvent() end end end) Link to comment
^iiEcoo'x_) Posted August 1, 2016 Share Posted August 1, 2016 انت تبي تدخله بالجدول ? Link to comment
Wleed1998 Posted August 1, 2016 Author Share Posted August 1, 2016 انت تبي تدخله بالجدول ? يب اخر لاعب يبقى يفوزز + لو دخل واحد بسالمهمه ما احد دخل بعد 5 دقائق يصكه كيل بيد الي يموت ينحذف من الجدول + الي يطلع بر السيرفر Link to comment
^iiEcoo'x_) Posted August 1, 2016 Share Posted August 1, 2016 بالنسبة للي يفوز ناقصك اشياء كثيرة جرب WarTable = {} function AddPlayer(player, Table) if not getPlayerTable(player, WarTable) then table.insert(Table, player) end end function RemovePlayer(player, Table) for i, v in ipairs (Table) do if (v == player) then table.remove(Table, i) end end addEventHandler ( "onPlayerJoin",root,function() outputChatBox("تم بددآ المهم اذهب الى المآركه لـدخول الى المهمه",source, 50, 30, 255) outputChatBox("تم تغشيل المهمه",source, 0, 150, 255) end) --------create Marker local WarMission = createMarker(2727.24390,-1826.40039,11.84375, "cylinder", 2, 255, 150, 250, 150) --------Taple local war = { {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375},} -------- Event Marker addEventHandler( "onMarkerHit", WarMission,function (player) if getElementType(player) == "player" and not isPedInVehicle(player) then if #WarTable >= 32 then return outputChatBox ( 'العدد مكتمل لايمكنك دخول المهمه', player ) end local x, y, z = unpack(war[math.random(#war)]) setElementPosition(player, x, y, z) setElementModel (player, 2) setElementDimension ( player, 6 ) giveWeapon ( player, 4, 1, true ) giveWeapon ( player, 27, 999999, true ) giveWeapon ( player, 31, 999999, true ) giveWeapon ( player, 30, 999999, true ) giveWeapon ( player, 16, 2, true ) giveWeapon ( player, 25, 999999, true ) toggleControl ( player, "fire", false ) setElementFrozen(player, true) if getPlayerTable ( player , WarTable ) then return outputChatBox ( "انت بالمهمة الان" , player , 255 , 255 , 255 , true ) end; table.insert ( WarTable , player ) setTimer ( toggleControl , 5000 , 1 , player , "fire" , true ) setTimer ( setElementFrozen , 5000 , 1 , player , false ) end end ) function getPlayerTable(player, Table) for i, v in ipairs (Table) do if (v == player) then return true end end end buttons = { ['F1'] = true, ['F2'] = true, ['F3'] = true, } addEventHandler( 'onClientKey', root, function (button , prees) if prees and getElementDimension(localPlayer) == 6 then if buttons[button] then outputChatBox("غير مصرح لك بفتح اللوحة الان ", source, 255, 0, 0) cancelEvent() end end end) addEventHandler("onPlayerWasted", root, function(_, killer) if getPlayerTable(source, WarTable) then if killer and getElementType(killer) == "player" then exports.guimessages:outputServer(root, getPlayerName(killer).." Killed "..getPlayerName(source).." in War Mission!", 255, 0, 255) if getPlayerTable(source, WarTable) then RemovePlayer(source, WarTable) end end) addEventHandler("onPlayerQuit", root, function() if getPlayerTable(source, WarTable) then RemovePlayer(source, WarTable) end end) Link to comment
Wleed1998 Posted August 1, 2016 Author Share Posted August 1, 2016 بالنسبة للي يفوز ناقصك اشياء كثيرة WarTable = {} function AddPlayer(player, Table) if not getPlayerTable(player, WarTable) then table.insert(Table, player) end end function RemovePlayer(player, Table) for i, v in ipairs (Table) do if (v == player) then table.remove(Table, i) end end addEventHandler ( "onPlayerJoin",root,function() outputChatBox("تم بددآ المهم اذهب الى المآركه لـدخول الى المهمه",source, 50, 30, 255) outputChatBox("تم تغشيل المهمه",source, 0, 150, 255) end) --------create Marker local WarMission = createMarker(2727.24390,-1826.40039,11.84375, "cylinder", 2, 255, 150, 250, 150) --------Taple local war = { {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375},} -------- Event Marker addEventHandler( "onMarkerHit", WarMission,function (player) if getElementType(player) == "player" and not isPedInVehicle(player) then if #WarTable >= 32 then return outputChatBox ( 'العدد مكتمل لايمكنك دخول المهمه', player ) end local x, y, z = unpack(war[math.random(#war)]) setElementPosition(player, x, y, z) setElementModel (player, 2) setElementDimension ( player, 6 ) giveWeapon ( player, 4, 1, true ) giveWeapon ( player, 27, 999999, true ) giveWeapon ( player, 31, 999999, true ) giveWeapon ( player, 30, 999999, true ) giveWeapon ( player, 16, 2, true ) giveWeapon ( player, 25, 999999, true ) toggleControl ( player, "fire", false ) setElementFrozen(player, true) if getPlayerTable ( player , WarTable ) then return outputChatBox ( "انت بالمهمة الان" , player , 255 , 255 , 255 , true ) end; table.insert ( WarTable , player ) setTimer ( toggleControl , 5000 , 1 , player , "fire" , true ) setTimer ( setElementFrozen , 5000 , 1 , player , false ) end end ) function getPlayerTable(player, Table) for i, v in ipairs (Table) do if (v == player) then return true end end end buttons = { ['F1'] = true, ['F2'] = true, ['F3'] = true, } addEventHandler( 'onClientKey', root, function (button , prees) if prees and getElementDimension(localPlayer) == 6 then if buttons[button] then outputChatBox("غير مصرح لك بفتح اللوحة الان ", source, 255, 0, 0) cancelEvent() end end end) addEventHandler("onPlayerWasted", root, function(_, killer) if getPlayerTable(source, WarTable) then if killer and getElementType(killer) == "player" then exports.guimessages:outputServer(root, getPlayerName(killer).." Killed "..getPlayerName(source).." in War Mission!", 255, 0, 255) if getPlayerTable(source, WarTable) then RemovePlayer(source, WarTable) end end) addEventHandler("onPlayerQuit", root, function() if getPlayerTable(source, WarTable) then RemovePlayer(source, WarTable) end end) ي الاخ الي فوق حق عبد الكريم زآبط انا بس ابي اضيف الي اخر واحد يفوز و بس Link to comment
N3xT Posted August 1, 2016 Share Posted August 1, 2016 onClientKey = Client Event onPlayerWasted = Server Event كيف زابط Link to comment
^iiEcoo'x_) Posted August 1, 2016 Share Posted August 1, 2016 جرب aTable = { } function getPlayerTable(player, Table) for i, v in ipairs (Table) do if (v == player) then return true end end end addEventHandler ( "onPlayerJoin",root,function() outputChatBox("تم بددآ المهم اذهب الى المآركه لـدخول الى المهمه",source, 50, 30, 255) outputChatBox("تم تغشيل المهمه",source, 0, 150, 255) end) --------create Marker local WarMission = createMarker(2727.24390,-1826.40039,11.84375, "cylinder", 2, 255, 150, 250, 150) --------Taple local war = { {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, {2485.00000,-1667.00000,13.34375}, } -------- Event Marker addEventHandler( "onMarkerHit", WarMission,function (player) if getElementType(player) == "player" and not isPedInVehicle(player) then if #aTable >= 32 then return outputChatBox ( 'العدد مكتمل لايمكنك دخول المهمه', player ) end local x, y, z = unpack(war[math.random(#war)]) setElementPosition(player, x, y, z) setElementModel (player, 2) setElementDimension ( player, 6 ) giveWeapon ( player, 4, 1, true ) giveWeapon ( player, 27, 999999, true ) giveWeapon ( player, 31, 999999, true ) giveWeapon ( player, 30, 999999, true ) giveWeapon ( player, 16, 2, true ) giveWeapon ( player, 25, 999999, true ) toggleControl ( player, "fire", false ) setElementFrozen(player, true) if getPlayerTable ( player , aTable ) then return outputChatBox ( "انت بالمهمة الان" , player , 255 , 255 , 255 , true ) end table.insert ( aTable , player ) setTimer ( toggleControl , 5000 , 1 , player , "fire" , true ) setTimer ( setElementFrozen , 5000 , 1 , player , false ) end end ) addEventHandler( "onPlayerWasted", root, function ( ) if getPlayerTable ( source , aTable ) then for i , v in ipairs ( aTable ) do if ( v == source ) then table.remove ( aTable , i ); end if ( #aTable == 1 ) then source = aTable [ 1 ] givePlayerMoney ( source , 9999 ) killPed (source) end end end end ) addEventHandler( "onPlayerQuit", root, function() if getPlayerTable ( source , aTable ) then for i , v in ipairs ( aTable ) do if ( v == source ) then table.remove ( aTable , i ); end if ( #aTable == 1 ) then source = aTable [ 1 ] killPed ( source ) givePlayerMoney ( source , 9999 ) end end end end ) function dPlayers(player) if ( #aTable == 1 ) then player = aTable [ 1 ] killPed ( player ) givePlayerMoney ( player , 9999 ) outputChatBox("بالمهمه "..getPlayerName(p).." فاز") end end Link to comment
^iiEcoo'x_) Posted August 1, 2016 Share Posted August 1, 2016 onClientKey = Client EventonPlayerWasted = Server Event كيف زابط انا استغربت كمان Link to comment
Wleed1998 Posted August 1, 2016 Author Share Posted August 1, 2016 onClientKey = Client EventonPlayerWasted = Server Event كيف زابط يب ض1 بغيره addEventHandler( "onElementClicked", getRootElement() ) ---- هذا حق السيرفر صح؟ 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