' A F . Posted January 6, 2016 Share Posted January 6, 2016 setTimer ( function ( ) for k,v in ipairs (getElementsByType("player")) do if ( getElementInterior ( v ) == 15 ) then setElementPosition(v,2202.63672,1846.10718,10.82031) outputChatBox("The Mission End|المهمة انتهت",v,250,255,0) end end end,600000,1) Link to comment
Ja[B]er[X]Pro Posted January 6, 2016 Author Share Posted January 6, 2016 setTimer ( function ( ) for k,v in ipairs (getElementsByType("player")) do if ( getElementInterior ( v ) == 15 ) then setElementPosition(v,2202.63672,1846.10718,10.82031) outputChatBox("The Mission End|المهمة انتهت",v,250,255,0) end end end,600000,1) شكراً لك على المساعدة Link to comment
Ja[B]er[X]Pro Posted January 7, 2016 Author Share Posted January 7, 2016 باقي اخر شي وهو اخر لاعب يبقى ياخد 1مليون وش استخدم؟؟؟؟ Link to comment
' A F . Posted January 7, 2016 Share Posted January 7, 2016 إنتَ بـَ شنؤ مسستخَدم المهمة , الجدآول او التيمات Link to comment
Ja[B]er[X]Pro Posted January 7, 2016 Author Share Posted January 7, 2016 إنتَ بـَ شنؤ مسستخَدم المهمة , الجدآول او التيمات المهمة تقنل كل المشاركين لتيم واحد ضد بعض اها نسيت اخلي الاعب يخرج من التيم Link to comment
' A F . Posted January 7, 2016 Share Posted January 7, 2016 خلي يوم الاعب يموت يطلعه من التيم + سو تايمر كل 5 ثواني اذا التيم مافيه غير 1 يطلعه من التيم ويعطيه فلوس Link to comment
Ja[B]er[X]Pro Posted January 7, 2016 Author Share Posted January 7, 2016 وش الفنكشن الي استخدمه حتى يطلعه من التيم +كيف اتحقق اذا في 1 او لا؟ Link to comment
' A F . Posted January 7, 2016 Share Posted January 7, 2016 عشان تطلعه من التيم setPlayerTeam -- nil عشان تسوي تحقق كم فيه التيم countPlayersInTeam Link to comment
Ja[B]er[X]Pro Posted January 7, 2016 Author Share Posted January 7, 2016 عشان تطلعه من التيم setPlayerTeam -- nil عشان تسوي تحقق كم فيه التيم countPlayersInTeam thank you|شكراً لك Link to comment
Ja[B]er[X]Pro Posted January 7, 2016 Author Share Posted January 7, 2016 محاولاتي 1-الاخراج من التيم عند الموت addEventHandler("onPlayerWasted", function() if getTeamName (Mission) then setPlayerTeam ( source, nil ) end end) 2-اذا كان عدد الاعبين 1 ينتقل وياخد فلوس setTimer( function() getPlayerTeam (Mission) if countPlayersInTeam = 1 then setElementPosition(2202.63672,1846.10718,10.82031) givePlayerMoney(source,1000000) outputChatBox("You Win In Mission|انت الفائز في المهمة") end end) Link to comment
' A F . Posted January 7, 2016 Share Posted January 7, 2016 جرب مأني متأكد local teamName = "team name" addEventHandler( "onPlayerWasted", root, function ( _,killer ) if ( killer and killer ~= source and getElementType ( killer ) == "player" ) then if ( getPlayerTeam ( killer ) and getPlayerTeam ( killer ) == getTeamFromName ( teamName ) and getPlayerTeam ( source ) and getPlayerTeam ( source ) == getTeamFromName ( teamName ) ) then givePlayerMoney ( killer, 1000 ) setPlayerTeam ( source , nil ) end end end ) Timer = setTimer ( function ( ) for i,v in ipairs ( getPlayersInTeam(teamName) ) do if ( #getPlayersInTeam ( teamName ) <= 1 ) then givePlayerMoney ( v , 50000 ) killTimer ( Timer ) end end end,5000,0) Link to comment
Ja[B]er[X]Pro Posted January 7, 2016 Author Share Posted January 7, 2016 لما اموت ما يخرجني من التيم local Marker, Started = createMarker( 2226.77954,1838.84619,9.82031, "cylinder", 1.5, 255, 250, 0, 100 ) local Positions = { { 2220.82104, -1152.29944, 1025.79688 }, { 2223.53076, -1146.58630, 1025.79688 }, { 2228.42969, -1140.57678, 1029.79688 }, { 2231.60132, -1150.41760, 1029.79688 }, { 2237.60278, -1159.64636, 1029.79688 }, { 2245.54712, -1189.38806, 1029.80432 }, { 2240.68823, -1189.95288, 1033.79688 }, { 2226.09644, -1181.82043, 1029.79688 }, { 2209.90698, -1192.10559, 1029.79688 }, { 2229.25854, -1188.43433, 1029.79688 }, { 2241.62891, -1189.13782, 1029.79688 }, { 2231.00024, -1170.52417, 1029.79688 }, { 2203.62476, -1144.56409, 1033.71802 } } addEventHandler( "onMarkerHit", Marker, function( HitElement ) if ( getElementType( HitElement ) == "player" ) then if ( Started ) then setElementInterior( HitElement, 15, unpack( Positions[math.random( #Positions )] ) ) end outputChatBox( Started and "تم الدخول للمهمة|You Enter To Mission" or " The Mission Dont Started|لم تبدأ المهمة بعد", HitElement ) setPlayerTeam ( HitElement, getTeamFromName ( "Mission" ) ) end end ) function StartMission() Started = true if ( isTimer( DisablingMission ) ) then killTimer( DisablingMission ) end if ( isTimer( RestartMission ) ) then killTimer( RestartMission ) end DisablingMission = setTimer( function() Started = false RestartMission = setTimer( StartMission, 1200000, 1 ) end, 120000, 1 ) end addCommandHandler( "start1mission", function( Player ) StartMission() outputChatBox("The Mission Started|المهمة بدأت", root, 255, 0, 0) end ) local Mission = "Mission" addEventHandler( "onPlayerWasted", root, function ( _,killer ) if ( killer and killer ~= source and getElementType ( killer ) == "player" ) then if ( getPlayerTeam ( killer ) and getPlayerTeam ( killer ) == getTeamFromName ( Mission ) and getPlayerTeam ( source ) and getPlayerTeam ( source ) == getTeamFromName ( Mission ) ) then givePlayerMoney ( killer, 1000 ) end end end ) createTeam ( Mission ,255,250,0) setTimer ( function ( ) for k,v in ipairs (getElementsByType("player")) do if ( getElementInterior ( v ) == 15 ) then setElementPosition(v,2202.63672,1846.10718,10.82031) outputChatBox("The Mission End|المهمة انتهت",v,250,255,0) end end end,600000,1) local teamName = "Mission" addEventHandler( "onPlayerWasted", root, function ( _,killer ) if ( killer and killer ~= source and getElementType ( killer ) == "player" ) then if ( getPlayerTeam ( killer ) and getPlayerTeam ( killer ) == getTeamFromName ( teamName ) and getPlayerTeam ( source ) and getPlayerTeam ( source ) == getTeamFromName ( teamName ) ) then givePlayerMoney ( killer, 1000 ) setPlayerTeam ( source , nil ) end end end ) Timer = setTimer ( function ( ) for i,v in ipairs ( getPlayersInTeam(teamName) ) do if ( #getPlayersInTeam ( teamName ) <= 1 ) then givePlayerMoney ( v , 50000 ) killTimer ( Timer ) end end end,5000,0) ERROR: mission\server.lua:77: bad argument #1 to 'iparirs' (tabel expected, got boolean) Link to comment
' A F . Posted January 7, 2016 Share Posted January 7, 2016 local Marker, Started = createMarker( 2226.77954,1838.84619,9.82031, "cylinder", 1.5, 255, 250, 0, 100 ) local Positions = { { 2220.82104, -1152.29944, 1025.79688 }, { 2223.53076, -1146.58630, 1025.79688 }, { 2228.42969, -1140.57678, 1029.79688 }, { 2231.60132, -1150.41760, 1029.79688 }, { 2237.60278, -1159.64636, 1029.79688 }, { 2245.54712, -1189.38806, 1029.80432 }, { 2240.68823, -1189.95288, 1033.79688 }, { 2226.09644, -1181.82043, 1029.79688 }, { 2209.90698, -1192.10559, 1029.79688 }, { 2229.25854, -1188.43433, 1029.79688 }, { 2241.62891, -1189.13782, 1029.79688 }, { 2231.00024, -1170.52417, 1029.79688 }, { 2203.62476, -1144.56409, 1033.71802 } } addEventHandler( "onMarkerHit", Marker, function( HitElement ) if ( getElementType( HitElement ) == "player" ) then if ( Started ) then setElementInterior( HitElement, 15, unpack( Positions[math.random( #Positions )] ) ) end outputChatBox( Started and "تم الدخول للمهمة|You Enter To Mission" or " The Mission Dont Started|لم تبدأ المهمة بعد", HitElement ) setPlayerTeam ( HitElement, getTeamFromName ( "Mission" ) ) end end ) function StartMission() Started = true if ( isTimer( DisablingMission ) ) then killTimer( DisablingMission ) end if ( isTimer( RestartMission ) ) then killTimer( RestartMission ) end DisablingMission = setTimer( function() Started = false RestartMission = setTimer( StartMission, 1200000, 1 ) end, 120000, 1 ) end addCommandHandler( "start1mission", function( Player ) StartMission() outputChatBox("The Mission Started|المهمة بدأت", root, 255, 0, 0) end ) local Mission = "Mission" addEventHandler( "onPlayerWasted", root, function ( _,killer ) if ( killer and killer ~= source and getElementType ( killer ) == "player" ) then if ( getPlayerTeam ( killer ) and getPlayerTeam ( killer ) == getTeamFromName ( Mission ) and getPlayerTeam ( source ) and getPlayerTeam ( source ) == getTeamFromName ( Mission ) ) then givePlayerMoney ( killer, 1000 ) end end setPlayerTeam ( source , nil ) end ) createTeam ( Mission ,255,250,0) setTimer ( function ( ) for k,v in ipairs (getElementsByType("player")) do if ( getElementInterior ( v ) == 15 ) then setElementPosition(v,2202.63672,1846.10718,10.82031) outputChatBox("The Mission End|المهمة انتهت",v,250,255,0) end end end,600000,1) Timer = setTimer ( function ( ) for i,v in ipairs ( getPlayersInTeam(getTeamFromName('Mission')) ) do if ( #getPlayersInTeam ( getTeamFromName('Mission') ) <= 1 ) then givePlayerMoney ( v , 50000 ) killTimer ( Timer ) end end end,5000,0) جرب Link to comment
Ja[B]er[X]Pro Posted January 7, 2016 Author Share Posted January 7, 2016 local Marker, Started = createMarker( 2226.77954,1838.84619,9.82031, "cylinder", 1.5, 255, 250, 0, 100 ) local Positions = { { 2220.82104, -1152.29944, 1025.79688 }, { 2223.53076, -1146.58630, 1025.79688 }, { 2228.42969, -1140.57678, 1029.79688 }, { 2231.60132, -1150.41760, 1029.79688 }, { 2237.60278, -1159.64636, 1029.79688 }, { 2245.54712, -1189.38806, 1029.80432 }, { 2240.68823, -1189.95288, 1033.79688 }, { 2226.09644, -1181.82043, 1029.79688 }, { 2209.90698, -1192.10559, 1029.79688 }, { 2229.25854, -1188.43433, 1029.79688 }, { 2241.62891, -1189.13782, 1029.79688 }, { 2231.00024, -1170.52417, 1029.79688 }, { 2203.62476, -1144.56409, 1033.71802 } } addEventHandler( "onMarkerHit", Marker, function( HitElement ) if ( getElementType( HitElement ) == "player" ) then if ( Started ) then setElementInterior( HitElement, 15, unpack( Positions[math.random( #Positions )] ) ) end outputChatBox( Started and "تم الدخول للمهمة|You Enter To Mission" or " The Mission Dont Started|لم تبدأ المهمة بعد", HitElement ) setPlayerTeam ( HitElement, getTeamFromName ( "Mission" ) ) end end ) function StartMission() Started = true if ( isTimer( DisablingMission ) ) then killTimer( DisablingMission ) end if ( isTimer( RestartMission ) ) then killTimer( RestartMission ) end DisablingMission = setTimer( function() Started = false RestartMission = setTimer( StartMission, 1200000, 1 ) end, 120000, 1 ) end addCommandHandler( "start1mission", function( Player ) StartMission() outputChatBox("The Mission Started|المهمة بدأت", root, 255, 0, 0) end ) local Mission = "Mission" addEventHandler( "onPlayerWasted", root, function ( _,killer ) if ( killer and killer ~= source and getElementType ( killer ) == "player" ) then if ( getPlayerTeam ( killer ) and getPlayerTeam ( killer ) == getTeamFromName ( Mission ) and getPlayerTeam ( source ) and getPlayerTeam ( source ) == getTeamFromName ( Mission ) ) then givePlayerMoney ( killer, 1000 ) end end setPlayerTeam ( source , nil ) end ) createTeam ( Mission ,255,250,0) setTimer ( function ( ) for k,v in ipairs (getElementsByType("player")) do if ( getElementInterior ( v ) == 15 ) then setElementPosition(v,2202.63672,1846.10718,10.82031) outputChatBox("The Mission End|المهمة انتهت",v,250,255,0) end end end,600000,1) Timer = setTimer ( function ( ) for i,v in ipairs ( getPlayersInTeam(getTeamFromName('Mission')) ) do if ( #getPlayersInTeam ( getTeamFromName('Mission') ) <= 1 ) then givePlayerMoney ( v , 50000 ) killTimer ( Timer ) end end end,5000,0) جرب شغاال شكراًًً لك على المساعدة Link to comment
Ja[B]er[X]Pro Posted January 7, 2016 Author Share Posted January 7, 2016 ابي فنكشن يمنع الاعب من اخراج سلاح اخر طلب Link to comment
Ja[B]er[X]Pro Posted January 7, 2016 Author Share Posted January 7, 2016 وانا اسوي اضافات للمهمة اجاني خطأأ local Marker, Started = createMarker( 2226.77954,1838.84619,9.82031, "cylinder", 1.5, 255, 250, 0, 100 ) local Positions = { { 2220.82104, -1152.29944, 1025.79688 }, { 2223.53076, -1146.58630, 1025.79688 }, { 2228.42969, -1140.57678, 1029.79688 }, { 2231.60132, -1150.41760, 1029.79688 }, { 2237.60278, -1159.64636, 1029.79688 }, { 2245.54712, -1189.38806, 1029.80432 }, { 2240.68823, -1189.95288, 1033.79688 }, { 2226.09644, -1181.82043, 1029.79688 }, { 2209.90698, -1192.10559, 1029.79688 }, { 2229.25854, -1188.43433, 1029.79688 }, { 2241.62891, -1189.13782, 1029.79688 }, { 2231.00024, -1170.52417, 1029.79688 }, { 2203.62476, -1144.56409, 1033.71802 } } addEventHandler( "onMarkerHit", Marker, function( HitElement ) if ( getElementType( HitElement ) == "player" ) then if ( Started ) then setElementInterior( HitElement, 15, unpack( Positions[math.random( #Positions )] ) ) end outputChatBox( Started and "تم الدخول للمهمة|You Enter To Mission" or " The Mission Dont Started|لم تبدأ المهمة بعد", HitElement ) setPlayerTeam ( HitElement, getTeamFromName ( "Mission" ) ) end end ) function StartMission() Started = true if ( isTimer( DisablingMission ) ) then killTimer( DisablingMission ) end if ( isTimer( RestartMission ) ) then killTimer( RestartMission ) end DisablingMission = setTimer( function() Started = false RestartMission = setTimer( StartMission, 1200000, 1 ) end, 120000, 1 ) end addCommandHandler( "start1mission", function( Player ) StartMission() outputChatBox("The Mission Started|بدأت مهمة الاست مان اشارة الرجل الاصفر فالخريطة", root, 255, 0, 0) end ) local Mission = "Mission" addEventHandler( "onPlayerWasted", root, function ( _,killer ) if ( killer and killer ~= source and getElementType ( killer ) == "player" ) then if ( getPlayerTeam ( killer ) and getPlayerTeam ( killer ) == getTeamFromName ( Mission ) and getPlayerTeam ( source ) and getPlayerTeam ( source ) == getTeamFromName ( Mission ) ) then givePlayerMoney ( killer, 1000 ) end end setPlayerTeam ( source , nil ) end ) createTeam ( Mission ,255,250,0) setTimer ( function ( ) for k,v in ipairs (getElementsByType("player")) do if ( getElementInterior ( v ) == 15 ) then setElementPosition(v,2202.63672,1846.10718,10.82031) outputChatBox("The Mission End|المهمة انتهت",v,250,255,0) end end end,600000,1) Timer = setTimer ( function ( ) for i,v in ipairs ( getPlayersInTeam(getTeamFromName('Mission')) ) do if ( #getPlayersInTeam ( getTeamFromName('Mission') ) <= 1 ) then givePlayerMoney ( v , 50000 ) killTimer ( Timer ) end end end,5000,0) createBlip(2221.13159,1841.59302,10.82031,60) text = { {"Mission Last Man",2224.30151,1838.87183,10.82031, -- x,y,z pos 255,0,255},-- r,g,b color } addEventHandler ( "onClientRender", root, function (v) for _,v in ipairs (text) do local x,y,z = getElementPosition ( localPlayer ) if ( getDistanceBetweenPoints3D (v[2],v[3],v[4], x,y,z ) ) < 50 then local pos = { getScreenFromWorldPosition ( v[2],v[3],v[4]) } if (isLineOfSightClear (v[2],v[3],v[4], x,y,z, true, true, false, true)) then if pos[1] and pos[2] then dxDrawText (v[1], pos[1],pos[2],pos[1],pos[2], tocolor(v[5],v[6],v[7]), 2, "default-bold" ) end end end end end) addEventHandler("onResourceStart",root, function() setTimer( outputChatBox("The Mission Started|بدأت مهمة الاست مان اشارة الرجل الاصفر فالخريطة",root,250,0,0) end,1200000,1) ) المشاكل 1-dxDrawText وش الخطأ بها ما تيجي؟ 2-ERROR: Loading script failed: mission\server.lua:101:')' expected (to colse '(' at line 99) near 'end' Link to comment
nxFairlywell Posted January 7, 2016 Share Posted January 7, 2016 وانا اسوي اضافات للمهمة اجاني خطأأ local Marker, Started = createMarker( 2226.77954,1838.84619,9.82031, "cylinder", 1.5, 255, 250, 0, 100 ) local Positions = { { 2220.82104, -1152.29944, 1025.79688 }, { 2223.53076, -1146.58630, 1025.79688 }, { 2228.42969, -1140.57678, 1029.79688 }, { 2231.60132, -1150.41760, 1029.79688 }, { 2237.60278, -1159.64636, 1029.79688 }, { 2245.54712, -1189.38806, 1029.80432 }, { 2240.68823, -1189.95288, 1033.79688 }, { 2226.09644, -1181.82043, 1029.79688 }, { 2209.90698, -1192.10559, 1029.79688 }, { 2229.25854, -1188.43433, 1029.79688 }, { 2241.62891, -1189.13782, 1029.79688 }, { 2231.00024, -1170.52417, 1029.79688 }, { 2203.62476, -1144.56409, 1033.71802 } } addEventHandler( "onMarkerHit", Marker, function( HitElement ) if ( getElementType( HitElement ) == "player" ) then if ( Started ) then setElementInterior( HitElement, 15, unpack( Positions[math.random( #Positions )] ) ) end outputChatBox( Started and "تم الدخول للمهمة|You Enter To Mission" or " The Mission Dont Started|لم تبدأ المهمة بعد", HitElement ) setPlayerTeam ( HitElement, getTeamFromName ( "Mission" ) ) end end ) function StartMission() Started = true if ( isTimer( DisablingMission ) ) then killTimer( DisablingMission ) end if ( isTimer( RestartMission ) ) then killTimer( RestartMission ) end DisablingMission = setTimer( function() Started = false RestartMission = setTimer( StartMission, 1200000, 1 ) end, 120000, 1 ) end addCommandHandler( "start1mission", function( Player ) StartMission() outputChatBox("The Mission Started|بدأت مهمة الاست مان اشارة الرجل الاصفر فالخريطة", root, 255, 0, 0) end ) local Mission = "Mission" addEventHandler( "onPlayerWasted", root, function ( _,killer ) if ( killer and killer ~= source and getElementType ( killer ) == "player" ) then if ( getPlayerTeam ( killer ) and getPlayerTeam ( killer ) == getTeamFromName ( Mission ) and getPlayerTeam ( source ) and getPlayerTeam ( source ) == getTeamFromName ( Mission ) ) then givePlayerMoney ( killer, 1000 ) end end setPlayerTeam ( source , nil ) end ) createTeam ( Mission ,255,250,0) setTimer ( function ( ) for k,v in ipairs (getElementsByType("player")) do if ( getElementInterior ( v ) == 15 ) then setElementPosition(v,2202.63672,1846.10718,10.82031) outputChatBox("The Mission End|المهمة انتهت",v,250,255,0) end end end,600000,1) Timer = setTimer ( function ( ) for i,v in ipairs ( getPlayersInTeam(getTeamFromName('Mission')) ) do if ( #getPlayersInTeam ( getTeamFromName('Mission') ) <= 1 ) then givePlayerMoney ( v , 50000 ) killTimer ( Timer ) end end end,5000,0) createBlip(2221.13159,1841.59302,10.82031,60) text = { {"Mission Last Man",2224.30151,1838.87183,10.82031, -- x,y,z pos 255,0,255},-- r,g,b color } addEventHandler ( "onClientRender", root, function (v) for _,v in ipairs (text) do local x,y,z = getElementPosition ( localPlayer ) if ( getDistanceBetweenPoints3D (v[2],v[3],v[4], x,y,z ) ) < 50 then local pos = { getScreenFromWorldPosition ( v[2],v[3],v[4]) } if (isLineOfSightClear (v[2],v[3],v[4], x,y,z, true, true, false, true)) then if pos[1] and pos[2] then dxDrawText (v[1], pos[1],pos[2],pos[1],pos[2], tocolor(v[5],v[6],v[7]), 2, "default-bold" ) end end end end end) addEventHandler("onResourceStart",root, function() setTimer( outputChatBox("The Mission Started|بدأت مهمة الاست مان اشارة الرجل الاصفر فالخريطة",root,250,0,0) end,1200000,1) ) المشاكل 1-dxDrawText وش الخطأ بها ما تيجي؟ 2-ERROR: Loading script failed: mission\server.lua:101:')' expected (to colse '(' at line 99) near 'end' اخر حدث , حط وظيفة للتايمر يصير كذا addEventHandler("onResourceStart",root, function() setTimer(function() outputChatBox("The Mission Started|بدأت مهمة الاست مان اشارة الرجل الاصفر فالخريطة",root,250,0,0) end,1200000,1) ) جربه و رد لي خبر Link to comment
SycroX Posted January 7, 2016 Share Posted January 7, 2016 وانا اسوي اضافات للمهمة اجاني خطأأ local Marker, Started = createMarker( 2226.77954,1838.84619,9.82031, "cylinder", 1.5, 255, 250, 0, 100 ) local Positions = { { 2220.82104, -1152.29944, 1025.79688 }, { 2223.53076, -1146.58630, 1025.79688 }, { 2228.42969, -1140.57678, 1029.79688 }, { 2231.60132, -1150.41760, 1029.79688 }, { 2237.60278, -1159.64636, 1029.79688 }, { 2245.54712, -1189.38806, 1029.80432 }, { 2240.68823, -1189.95288, 1033.79688 }, { 2226.09644, -1181.82043, 1029.79688 }, { 2209.90698, -1192.10559, 1029.79688 }, { 2229.25854, -1188.43433, 1029.79688 }, { 2241.62891, -1189.13782, 1029.79688 }, { 2231.00024, -1170.52417, 1029.79688 }, { 2203.62476, -1144.56409, 1033.71802 } } addEventHandler( "onMarkerHit", Marker, function( HitElement ) if ( getElementType( HitElement ) == "player" ) then if ( Started ) then setElementInterior( HitElement, 15, unpack( Positions[math.random( #Positions )] ) ) end outputChatBox( Started and "تم الدخول للمهمة|You Enter To Mission" or " The Mission Dont Started|لم تبدأ المهمة بعد", HitElement ) setPlayerTeam ( HitElement, getTeamFromName ( "Mission" ) ) end end ) function StartMission() Started = true if ( isTimer( DisablingMission ) ) then killTimer( DisablingMission ) end if ( isTimer( RestartMission ) ) then killTimer( RestartMission ) end DisablingMission = setTimer( function() Started = false RestartMission = setTimer( StartMission, 1200000, 1 ) end, 120000, 1 ) end addCommandHandler( "start1mission", function( Player ) StartMission() outputChatBox("The Mission Started|بدأت مهمة الاست مان اشارة الرجل الاصفر فالخريطة", root, 255, 0, 0) end ) local Mission = "Mission" addEventHandler( "onPlayerWasted", root, function ( _,killer ) if ( killer and killer ~= source and getElementType ( killer ) == "player" ) then if ( getPlayerTeam ( killer ) and getPlayerTeam ( killer ) == getTeamFromName ( Mission ) and getPlayerTeam ( source ) and getPlayerTeam ( source ) == getTeamFromName ( Mission ) ) then givePlayerMoney ( killer, 1000 ) end end setPlayerTeam ( source , nil ) end ) createTeam ( Mission ,255,250,0) setTimer ( function ( ) for k,v in ipairs (getElementsByType("player")) do if ( getElementInterior ( v ) == 15 ) then setElementPosition(v,2202.63672,1846.10718,10.82031) outputChatBox("The Mission End|المهمة انتهت",v,250,255,0) end end end,600000,1) Timer = setTimer ( function ( ) for i,v in ipairs ( getPlayersInTeam(getTeamFromName('Mission')) ) do if ( #getPlayersInTeam ( getTeamFromName('Mission') ) <= 1 ) then givePlayerMoney ( v , 50000 ) killTimer ( Timer ) end end end,5000,0) createBlip(2221.13159,1841.59302,10.82031,60) text = { {"Mission Last Man",2224.30151,1838.87183,10.82031, -- x,y,z pos 255,0,255},-- r,g,b color } addEventHandler ( "onClientRender", root, function (v) for _,v in ipairs (text) do local x,y,z = getElementPosition ( localPlayer ) if ( getDistanceBetweenPoints3D (v[2],v[3],v[4], x,y,z ) ) < 50 then local pos = { getScreenFromWorldPosition ( v[2],v[3],v[4]) } if (isLineOfSightClear (v[2],v[3],v[4], x,y,z, true, true, false, true)) then if pos[1] and pos[2] then dxDrawText (v[1], pos[1],pos[2],pos[1],pos[2], tocolor(v[5],v[6],v[7]), 2, "default-bold" ) end end end end end) addEventHandler("onResourceStart",root, function() setTimer( outputChatBox("The Mission Started|بدأت مهمة الاست مان اشارة الرجل الاصفر فالخريطة",root,250,0,0) end,1200000,1) ) المشاكل 1-dxDrawText وش الخطأ بها ما تيجي؟ 2-ERROR: Loading script failed: mission\server.lua:101:')' expected (to colse '(' at line 99) near 'end' كيف تباها تشتغل و انتا حاطت حدث onClientRender في ملف سيرفر شيلو من ملف سيرفر و حطو كلنت text = { {"Mission Last Man",2224.30151,1838.87183,10.82031, -- x,y,z pos 255,0,255},-- r,g,b color } addEventHandler ( "onClientRender", root, function (v) for _,v in ipairs (text) do local x,y,z = getElementPosition ( localPlayer ) if ( getDistanceBetweenPoints3D (v[2],v[3],v[4], x,y,z ) ) < 50 then local pos = { getScreenFromWorldPosition ( v[2],v[3],v[4]) } if (isLineOfSightClear (v[2],v[3],v[4], x,y,z, true, true, false, true)) then if pos[1] and pos[2] then dxDrawText (v[1], pos[1],pos[2],pos[1],pos[2], tocolor(v[5],v[6],v[7]), 2, "default-bold" ) end end end end end) Link to comment
Ja[B]er[X]Pro Posted January 7, 2016 Author Share Posted January 7, 2016 وانا اسوي اضافات للمهمة اجاني خطأأ local Marker, Started = createMarker( 2226.77954,1838.84619,9.82031, "cylinder", 1.5, 255, 250, 0, 100 ) local Positions = { { 2220.82104, -1152.29944, 1025.79688 }, { 2223.53076, -1146.58630, 1025.79688 }, { 2228.42969, -1140.57678, 1029.79688 }, { 2231.60132, -1150.41760, 1029.79688 }, { 2237.60278, -1159.64636, 1029.79688 }, { 2245.54712, -1189.38806, 1029.80432 }, { 2240.68823, -1189.95288, 1033.79688 }, { 2226.09644, -1181.82043, 1029.79688 }, { 2209.90698, -1192.10559, 1029.79688 }, { 2229.25854, -1188.43433, 1029.79688 }, { 2241.62891, -1189.13782, 1029.79688 }, { 2231.00024, -1170.52417, 1029.79688 }, { 2203.62476, -1144.56409, 1033.71802 } } addEventHandler( "onMarkerHit", Marker, function( HitElement ) if ( getElementType( HitElement ) == "player" ) then if ( Started ) then setElementInterior( HitElement, 15, unpack( Positions[math.random( #Positions )] ) ) end outputChatBox( Started and "تم الدخول للمهمة|You Enter To Mission" or " The Mission Dont Started|لم تبدأ المهمة بعد", HitElement ) setPlayerTeam ( HitElement, getTeamFromName ( "Mission" ) ) end end ) function StartMission() Started = true if ( isTimer( DisablingMission ) ) then killTimer( DisablingMission ) end if ( isTimer( RestartMission ) ) then killTimer( RestartMission ) end DisablingMission = setTimer( function() Started = false RestartMission = setTimer( StartMission, 1200000, 1 ) end, 120000, 1 ) end addCommandHandler( "start1mission", function( Player ) StartMission() outputChatBox("The Mission Started|بدأت مهمة الاست مان اشارة الرجل الاصفر فالخريطة", root, 255, 0, 0) end ) local Mission = "Mission" addEventHandler( "onPlayerWasted", root, function ( _,killer ) if ( killer and killer ~= source and getElementType ( killer ) == "player" ) then if ( getPlayerTeam ( killer ) and getPlayerTeam ( killer ) == getTeamFromName ( Mission ) and getPlayerTeam ( source ) and getPlayerTeam ( source ) == getTeamFromName ( Mission ) ) then givePlayerMoney ( killer, 1000 ) end end setPlayerTeam ( source , nil ) end ) createTeam ( Mission ,255,250,0) setTimer ( function ( ) for k,v in ipairs (getElementsByType("player")) do if ( getElementInterior ( v ) == 15 ) then setElementPosition(v,2202.63672,1846.10718,10.82031) outputChatBox("The Mission End|المهمة انتهت",v,250,255,0) end end end,600000,1) Timer = setTimer ( function ( ) for i,v in ipairs ( getPlayersInTeam(getTeamFromName('Mission')) ) do if ( #getPlayersInTeam ( getTeamFromName('Mission') ) <= 1 ) then givePlayerMoney ( v , 50000 ) killTimer ( Timer ) end end end,5000,0) createBlip(2221.13159,1841.59302,10.82031,60) text = { {"Mission Last Man",2224.30151,1838.87183,10.82031, -- x,y,z pos 255,0,255},-- r,g,b color } addEventHandler ( "onClientRender", root, function (v) for _,v in ipairs (text) do local x,y,z = getElementPosition ( localPlayer ) if ( getDistanceBetweenPoints3D (v[2],v[3],v[4], x,y,z ) ) < 50 then local pos = { getScreenFromWorldPosition ( v[2],v[3],v[4]) } if (isLineOfSightClear (v[2],v[3],v[4], x,y,z, true, true, false, true)) then if pos[1] and pos[2] then dxDrawText (v[1], pos[1],pos[2],pos[1],pos[2], tocolor(v[5],v[6],v[7]), 2, "default-bold" ) end end end end end) addEventHandler("onResourceStart",root, function() setTimer( outputChatBox("The Mission Started|بدأت مهمة الاست مان اشارة الرجل الاصفر فالخريطة",root,250,0,0) end,1200000,1) ) المشاكل 1-dxDrawText وش الخطأ بها ما تيجي؟ 2-ERROR: Loading script failed: mission\server.lua:101:')' expected (to colse '(' at line 99) near 'end' كيف تباها تشتغل و انتا حاطت حدث onClientRender في ملف سيرفر شيلو من ملف سيرفر و حطو كلنت text = { {"Mission Last Man",2224.30151,1838.87183,10.82031, -- x,y,z pos 255,0,255},-- r,g,b color } addEventHandler ( "onClientRender", root, function (v) for _,v in ipairs (text) do local x,y,z = getElementPosition ( localPlayer ) if ( getDistanceBetweenPoints3D (v[2],v[3],v[4], x,y,z ) ) < 50 then local pos = { getScreenFromWorldPosition ( v[2],v[3],v[4]) } if (isLineOfSightClear (v[2],v[3],v[4], x,y,z, true, true, false, true)) then if pos[1] and pos[2] then dxDrawText (v[1], pos[1],pos[2],pos[1],pos[2], tocolor(v[5],v[6],v[7]), 2, "default-bold" ) end end end end end) شكراً لك Link to comment
Ja[B]er[X]Pro Posted January 7, 2016 Author Share Posted January 7, 2016 وانا اسوي اضافات للمهمة اجاني خطأأ local Marker, Started = createMarker( 2226.77954,1838.84619,9.82031, "cylinder", 1.5, 255, 250, 0, 100 ) local Positions = { { 2220.82104, -1152.29944, 1025.79688 }, { 2223.53076, -1146.58630, 1025.79688 }, { 2228.42969, -1140.57678, 1029.79688 }, { 2231.60132, -1150.41760, 1029.79688 }, { 2237.60278, -1159.64636, 1029.79688 }, { 2245.54712, -1189.38806, 1029.80432 }, { 2240.68823, -1189.95288, 1033.79688 }, { 2226.09644, -1181.82043, 1029.79688 }, { 2209.90698, -1192.10559, 1029.79688 }, { 2229.25854, -1188.43433, 1029.79688 }, { 2241.62891, -1189.13782, 1029.79688 }, { 2231.00024, -1170.52417, 1029.79688 }, { 2203.62476, -1144.56409, 1033.71802 } } addEventHandler( "onMarkerHit", Marker, function( HitElement ) if ( getElementType( HitElement ) == "player" ) then if ( Started ) then setElementInterior( HitElement, 15, unpack( Positions[math.random( #Positions )] ) ) end outputChatBox( Started and "تم الدخول للمهمة|You Enter To Mission" or " The Mission Dont Started|لم تبدأ المهمة بعد", HitElement ) setPlayerTeam ( HitElement, getTeamFromName ( "Mission" ) ) end end ) function StartMission() Started = true if ( isTimer( DisablingMission ) ) then killTimer( DisablingMission ) end if ( isTimer( RestartMission ) ) then killTimer( RestartMission ) end DisablingMission = setTimer( function() Started = false RestartMission = setTimer( StartMission, 1200000, 1 ) end, 120000, 1 ) end addCommandHandler( "start1mission", function( Player ) StartMission() outputChatBox("The Mission Started|بدأت مهمة الاست مان اشارة الرجل الاصفر فالخريطة", root, 255, 0, 0) end ) local Mission = "Mission" addEventHandler( "onPlayerWasted", root, function ( _,killer ) if ( killer and killer ~= source and getElementType ( killer ) == "player" ) then if ( getPlayerTeam ( killer ) and getPlayerTeam ( killer ) == getTeamFromName ( Mission ) and getPlayerTeam ( source ) and getPlayerTeam ( source ) == getTeamFromName ( Mission ) ) then givePlayerMoney ( killer, 1000 ) end end setPlayerTeam ( source , nil ) end ) createTeam ( Mission ,255,250,0) setTimer ( function ( ) for k,v in ipairs (getElementsByType("player")) do if ( getElementInterior ( v ) == 15 ) then setElementPosition(v,2202.63672,1846.10718,10.82031) outputChatBox("The Mission End|المهمة انتهت",v,250,255,0) end end end,600000,1) Timer = setTimer ( function ( ) for i,v in ipairs ( getPlayersInTeam(getTeamFromName('Mission')) ) do if ( #getPlayersInTeam ( getTeamFromName('Mission') ) <= 1 ) then givePlayerMoney ( v , 50000 ) killTimer ( Timer ) end end end,5000,0) createBlip(2221.13159,1841.59302,10.82031,60) text = { {"Mission Last Man",2224.30151,1838.87183,10.82031, -- x,y,z pos 255,0,255},-- r,g,b color } addEventHandler ( "onClientRender", root, function (v) for _,v in ipairs (text) do local x,y,z = getElementPosition ( localPlayer ) if ( getDistanceBetweenPoints3D (v[2],v[3],v[4], x,y,z ) ) < 50 then local pos = { getScreenFromWorldPosition ( v[2],v[3],v[4]) } if (isLineOfSightClear (v[2],v[3],v[4], x,y,z, true, true, false, true)) then if pos[1] and pos[2] then dxDrawText (v[1], pos[1],pos[2],pos[1],pos[2], tocolor(v[5],v[6],v[7]), 2, "default-bold" ) end end end end end) addEventHandler("onResourceStart",root, function() setTimer( outputChatBox("The Mission Started|بدأت مهمة الاست مان اشارة الرجل الاصفر فالخريطة",root,250,0,0) end,1200000,1) ) المشاكل 1-dxDrawText وش الخطأ بها ما تيجي؟ 2-ERROR: Loading script failed: mission\server.lua:101:')' expected (to colse '(' at line 99) near 'end' اخر حدث , حط وظيفة للتايمر يصير كذا addEventHandler("onResourceStart",root, function() setTimer(function() outputChatBox("The Mission Started|بدأت مهمة الاست مان اشارة الرجل الاصفر فالخريطة",root,250,0,0) end,1200000,1) ) جربه و رد لي خبر يصير في 2 function() هنا في function() addEventHandler("onResourceStart",root,function() وبعد التايمر setTimer(function() Link to comment
Ja[B]er[X]Pro Posted January 7, 2016 Author Share Posted January 7, 2016 ابي عند الانتقال بالماركر يتجمد الاعب لدقيقتين ناقصني فنكشنات تخلي الاعب يتجمد 'onMrkerHit' --فنكشنات التجميد الناقصة setTimer ممكن الفنكشنات الناقصة؟ Link to comment
Ja[B]er[X]Pro Posted January 7, 2016 Author Share Posted January 7, 2016 setElementFrozen شكراً لك يجيني الخطأ دا ERROR: Loading script failed: mission\server.lua:79: ')' expected (to close '(' at line 77) near 'end' بالكود local Marker, Started = createMarker( 2226.77954,1838.84619,9.82031, "cylinder", 1.5, 255, 250, 0, 100 ) local Positions = { { 2220.82104, -1152.29944, 1025.79688 }, { 2223.53076, -1146.58630, 1025.79688 }, { 2228.42969, -1140.57678, 1029.79688 }, { 2231.60132, -1150.41760, 1029.79688 }, { 2237.60278, -1159.64636, 1029.79688 }, { 2245.54712, -1189.38806, 1029.80432 }, { 2240.68823, -1189.95288, 1033.79688 }, { 2226.09644, -1181.82043, 1029.79688 }, { 2209.90698, -1192.10559, 1029.79688 }, { 2229.25854, -1188.43433, 1029.79688 }, { 2241.62891, -1189.13782, 1029.79688 }, { 2231.00024, -1170.52417, 1029.79688 }, { 2203.62476, -1144.56409, 1033.71802 } } addEventHandler( "onMarkerHit", Marker, function( HitElement ) if ( getElementType( HitElement ) == "player" ) then if ( Started ) then setElementInterior( HitElement, 15, unpack( Positions[math.random( #Positions )] ) ) end outputChatBox( Started and "تم الدخول للمهمة|You Enter To Mission" or " The Mission Dont Started|لم تبدأ المهمة بعد", HitElement ) setPlayerTeam ( HitElement, getTeamFromName ( "Mission" ) ) end end ) function StartMission() Started = true if ( isTimer( DisablingMission ) ) then killTimer( DisablingMission ) end if ( isTimer( RestartMission ) ) then killTimer( RestartMission ) end DisablingMission = setTimer( function() Started = false RestartMission = setTimer( StartMission, 1200000, 1 ) end, 120000, 1 ) end addCommandHandler( "start1mission", function( Player ) StartMission() outputChatBox("The Mission Started|بدأت مهمة الاست مان اشارة تنين اصفر بالخريطة", root, 255, 0, 0) end ) local Mission = "Mission" addEventHandler( "onPlayerWasted", root, function ( _,killer ) if ( killer and killer ~= source and getElementType ( killer ) == "player" ) then if ( getPlayerTeam ( killer ) and getPlayerTeam ( killer ) == getTeamFromName ( Mission ) and getPlayerTeam ( source ) and getPlayerTeam ( source ) == getTeamFromName ( Mission ) ) then givePlayerMoney ( killer, 1000 ) end end setPlayerTeam ( source , nil ) end ) createTeam ( Mission ,255,250,0) setTimer ( function ( ) for k,v in ipairs (getElementsByType("player")) do if ( getElementInterior ( v ) == 15 ) then setElementPosition(v,2202.63672,1846.10718,10.82031) outputChatBox("The Mission End|المهمة انتهت",v,250,255,0) end end end,600000,1) Timer = setTimer ( function ( ) for i,v in ipairs ( getPlayersInTeam(getTeamFromName('Mission')) ) do if ( #getPlayersInTeam ( getTeamFromName('Mission') ) <= 1 ) then givePlayerMoney ( v , 50000 ) killTimer ( Timer ) end end end,5000,0) createBlip(2221.13159,1841.59302,10.82031,44) addEventHandler("onResourceStart",root, function() setTimer( outputChatBox("The Mission Started|بدأت مهمة الاست مان اشارة الرجل الاصفر فالخريطة",root,250,0,0) end,1200000,1) ) 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