ايهاب Posted February 26, 2019 Share Posted February 26, 2019 السلام عليكم اخباركم شباب ------------ فى سكريبت مود احتلال التيمات اغضر اصفر سماوى بنفسجى حرب عصابات مشكلتى فية انا اللاعب بيحتل الارض بس مش بياخد فلوس زمان شخص عدلة ليا ضاف ان اللاعب اذا احتل ياخد فلوس لكن المود ضاع منى فاعايز حد يصححلى الخطأ مفروض اللاعب ياخد 5000- لكن اما بيحتل الارض مش بياخد اى شى بيظهر انة احتل الارض وخلاص وانا عايز ياخد فلوس ضرورى دة الكلينت local sW, sH = guiGetScreenSize( ) setElementData(localPlayer, "TeamTufrs",false) addEventHandler("onClientRender", root, function() local Tufr = getElementData(localPlayer, "TeamTufrs") if Tufr then local Team = getTeamFromName(Tufr.TeamName) local R, G, B = 0, 0, 0 if Team then R, G, B = getTeamColor(Team) end dxDrawRectangle(sW*(1064/1280), sH*(623/768), sW*(202/1280), sH*(122/768), tocolor(R, G, B, 180), false) dxDrawText("Team : "..Tufr.TeamName.."\nOccupier : %"..Tufr.occupier.."\nMoney : $"..Tufr.Money , sW*(1070/1280), sH*(622/768), sW*(1266/1280), sH*(745/768), tocolor(255, 255, 255, 255), 2.00, "default-bold", "left", "center", false, false, false, false, false) end end ) ودة السيرفر local Tufrs = { } local TufrsPos = { { 2652, -1264, 60, 60, "Ballas" , 5000 }, { 2646, -1888, 170, 215, "Ballas" , 5000 }, { 2415, -2155, 300, 95, "Grove Street" , 5000 }, { 2741, -1388, 120, 120, "Ballas" , 5000 }, { 2650, -1412, 75, 140, "Rifa" , 5000 }, { 2533, -1939, 120, 190, "Aztecas" , 5000 }, { 2742, -1495, 120, 110, "Ballas" , 5000 }, { 2646, -1664, 90, 250, "Grove Street" , 5000 }, { 2411, -1938, 120, 190, "Vagos" , 5000 }, { 2654, -1939, 50, 50, "Vagos" , 5000 } --{ X, Y, H, W, Team , Money }, } addEventHandler ( "onResourceStart", resourceRoot, function ( ) for i, v in ipairs(TufrsPos) do local ColShape = createColRectangle(v[1], v[2], v[3], v[4]) local Team = getTeamFromName(v[5]) local TeamName = "N/A" local R, G, B = 255, 255, 255 if Team then R, G, B = getTeamColor(Team) TeamName = getTeamName(Team) end Tufrs[ColShape] = { Radar = createRadarArea(v[1], v[2], v[3], v[4] , R, G, B, 180) , TeamName = TeamName , occupier = 100 , Money = v[6] , } end end ) addEventHandler("onMouseEnter",root, function(mouse) if source == BTN.Open then guiSetAlpha(BTN.Open,0.80) end end ) addEventHandler("onMouseLeave",root, function(Leave) if source == BTN.Open then guiSetAlpha(BTN.Open,1) end end ) function getColPlayerTeam (Col, Team) for i, pla in pairs(getElementsWithinColShape(Col, "player")) do if getPlayerTeam(pla) and getPlayerTeam(pla) ~= getTeamFromName("Criminals") and getTeamName(getPlayerTeam(pla)) == getTeamName(Team) then return true else exports.TopBarChat:sendClientMessage( "~Warning : You must kill the other team members in the zone~",pla ,232 ,0 ,0 ) return false end end return false end function getTeamTufrs(Team) local Tufr = { } for Col, v in pairs(Tufrs) do if v.TeamName == getTeamName(Team) then table.insert( Tufr, Col ) end end return Tufr end addEventHandler("onColShapeHit",root, function(pla) local Rader = Tufrs[source] if ( Rader ) then setElementData(pla, "TeamTufrs",Rader ) end end) addEventHandler("onColShapeLeave",root, function(pla) setElementData(pla, "TeamTufrs",false ) end) setTimer (function ( ) for Col, v in pairs(Tufrs) do for i, pla in pairs(getElementsWithinColShape(Col, "player")) do local Team = getPlayerTeam ( pla ) if Team and getColPlayerTeam (Col, Team) then if getTeamName(Team) ~= Tufrs[Col].TeamName then if Tufrs[ Col ].occupier > 1 then Tufrs[ Col ].occupier = Tufrs[ Col ].occupier - 1 setRadarAreaFlashing ( Tufrs[ Col ].Radar, true ) elseif Tufrs[ Col ].occupier == 1 then local r, g, b = getTeamColor ( getPlayerTeam ( pla ) ) setRadarAreaFlashing ( Tufrs[ Col ].Radar, false ) setRadarAreaColor ( Tufrs[ Col ].Radar, r, g, b, 150 ) Tufrs[ Col ].TeamName = getTeamName(Team) Tufrs[ Col ].occupier = 100 exports.TopBarChat:sendClientMessage( "~Your Team now controls the turf~",pla ,0 ,255 ,0 ) for i, player in ipairs(getPlayersInTeam( Team )) do local Money = Tufrs[ Col ].Money exports.TopBarChat:sendClientMessage("You won ~$~"..Money, player, 0, 255, 0) setElementData(player, "Money", getElementData(player, "Money") + Money) end end else if Tufrs[ Col ].occupier < 99 then Tufrs[ Col ].occupier = Tufrs[ Col ].occupier + 1 elseif Tufrs[ Col ].occupier == 99 then local r, g, b = getTeamColor ( getPlayerTeam ( pla ) ) setRadarAreaFlashing ( Tufrs[ Col ].Radar, false ) setRadarAreaColor ( Tufrs[ Col ].Radar, r, g, b, 150 ) Tufrs[ Col ].TeamName = getTeamName(Team) Tufrs[ Col ].occupier = 100 end end end setElementData(pla, "TeamTufrs",Tufrs[Col] ) end end end,5000, 0) المفروض انة ياخد اللاعب اذا احتل الارض 5000 لكن مش بيحصل كدة الى يقدر يساعد يساعد Link to comment
nxFairlywell Posted February 26, 2019 Share Posted February 26, 2019 (edited) أساساً دالة إضافة فلوس للاعب مو موجوده في السكربت أضفتها لك في السطر رقم 108 , تأكد الآن كود السيرفر فقط : local Tufrs = { } local TufrsPos = { { 2652, -1264, 60, 60, "Ballas" , 5000 }, { 2646, -1888, 170, 215, "Ballas" , 5000 }, { 2415, -2155, 300, 95, "Grove Street" , 5000 }, { 2741, -1388, 120, 120, "Ballas" , 5000 }, { 2650, -1412, 75, 140, "Rifa" , 5000 }, { 2533, -1939, 120, 190, "Aztecas" , 5000 }, { 2742, -1495, 120, 110, "Ballas" , 5000 }, { 2646, -1664, 90, 250, "Grove Street" , 5000 }, { 2411, -1938, 120, 190, "Vagos" , 5000 }, { 2654, -1939, 50, 50, "Vagos" , 5000 } --{ X, Y, H, W, Team , Money }, } addEventHandler ( "onResourceStart", resourceRoot, function ( ) for i, v in ipairs(TufrsPos) do local ColShape = createColRectangle(v[1], v[2], v[3], v[4]) local Team = getTeamFromName(v[5]) local TeamName = "N/A" local R, G, B = 255, 255, 255 if Team then R, G, B = getTeamColor(Team) TeamName = getTeamName(Team) end Tufrs[ColShape] = { Radar = createRadarArea(v[1], v[2], v[3], v[4] , R, G, B, 180) , TeamName = TeamName , occupier = 100 , Money = v[6] , } end end ) addEventHandler("onMouseEnter",root, function(mouse) if source == BTN.Open then guiSetAlpha(BTN.Open,0.80) end end ) addEventHandler("onMouseLeave",root, function(Leave) if source == BTN.Open then guiSetAlpha(BTN.Open,1) end end ) function getColPlayerTeam (Col, Team) for i, pla in pairs(getElementsWithinColShape(Col, "player")) do if getPlayerTeam(pla) and getPlayerTeam(pla) ~= getTeamFromName("Criminals") and getTeamName(getPlayerTeam(pla)) == getTeamName(Team) then return true else exports.TopBarChat:sendClientMessage( "~Warning : You must kill the other team members in the zone~",pla ,232 ,0 ,0 ) return false end end return false end function getTeamTufrs(Team) local Tufr = { } for Col, v in pairs(Tufrs) do if v.TeamName == getTeamName(Team) then table.insert( Tufr, Col ) end end return Tufr end addEventHandler("onColShapeHit",root, function(pla) local Rader = Tufrs[source] if ( Rader ) then setElementData(pla, "TeamTufrs",Rader ) end end) addEventHandler("onColShapeLeave",root, function(pla) setElementData(pla, "TeamTufrs",false ) end) setTimer (function ( ) for Col, v in pairs(Tufrs) do for i, pla in pairs(getElementsWithinColShape(Col, "player")) do local Team = getPlayerTeam ( pla ) if Team and getColPlayerTeam (Col, Team) then if getTeamName(Team) ~= Tufrs[Col].TeamName then if Tufrs[ Col ].occupier > 1 then Tufrs[ Col ].occupier = Tufrs[ Col ].occupier - 1 setRadarAreaFlashing ( Tufrs[ Col ].Radar, true ) elseif Tufrs[ Col ].occupier == 1 then local r, g, b = getTeamColor ( getPlayerTeam ( pla ) ) setRadarAreaFlashing ( Tufrs[ Col ].Radar, false ) setRadarAreaColor ( Tufrs[ Col ].Radar, r, g, b, 150 ) Tufrs[ Col ].TeamName = getTeamName(Team) Tufrs[ Col ].occupier = 100 exports.TopBarChat:sendClientMessage( "~Your Team now controls the turf~",pla ,0 ,255 ,0 ) for i, player in ipairs(getPlayersInTeam( Team )) do local Money = Tufrs[ Col ].Money exports.TopBarChat:sendClientMessage("You won ~$~"..Money, player, 0, 255, 0) setElementData(player, "Money", getElementData(player, "Money") + Money) givePlayerMoney(player,Money); end end else if Tufrs[ Col ].occupier < 99 then Tufrs[ Col ].occupier = Tufrs[ Col ].occupier + 1 elseif Tufrs[ Col ].occupier == 99 then local r, g, b = getTeamColor ( getPlayerTeam ( pla ) ) setRadarAreaFlashing ( Tufrs[ Col ].Radar, false ) setRadarAreaColor ( Tufrs[ Col ].Radar, r, g, b, 150 ) Tufrs[ Col ].TeamName = getTeamName(Team) Tufrs[ Col ].occupier = 100 end end end setElementData(pla, "TeamTufrs",Tufrs[Col] ) end end end,5000, 0) Edited February 26, 2019 by NX_CI Link to comment
ايهاب Posted February 27, 2019 Author Share Posted February 27, 2019 13 hours ago, NX_CI said: أساساً دالة إضافة فلوس للاعب مو موجوده في السكربت أضفتها لك في السطر رقم 108 , تأكد الآن كود السيرفر فقط : 13 hours ago, NX_CI said: أساساً دالة إضافة فلوس للاعب مو موجوده في السكربت أضفتها لك في السطر رقم 108 , تأكد الآن كود السيرفر فقط : local Tufrs = { } local TufrsPos = { { 2652, -1264, 60, 60, "Ballas" , 5000 }, { 2646, -1888, 170, 215, "Ballas" , 5000 }, { 2415, -2155, 300, 95, "Grove Street" , 5000 }, { 2741, -1388, 120, 120, "Ballas" , 5000 }, { 2650, -1412, 75, 140, "Rifa" , 5000 }, { 2533, -1939, 120, 190, "Aztecas" , 5000 }, { 2742, -1495, 120, 110, "Ballas" , 5000 }, { 2646, -1664, 90, 250, "Grove Street" , 5000 }, { 2411, -1938, 120, 190, "Vagos" , 5000 }, { 2654, -1939, 50, 50, "Vagos" , 5000 } --{ X, Y, H, W, Team , Money }, } addEventHandler ( "onResourceStart", resourceRoot, function ( ) for i, v in ipairs(TufrsPos) do local ColShape = createColRectangle(v[1], v[2], v[3], v[4]) local Team = getTeamFromName(v[5]) local TeamName = "N/A" local R, G, B = 255, 255, 255 if Team then R, G, B = getTeamColor(Team) TeamName = getTeamName(Team) end Tufrs[ColShape] = { Radar = createRadarArea(v[1], v[2], v[3], v[4] , R, G, B, 180) , TeamName = TeamName , occupier = 100 , Money = v[6] , } end end ) addEventHandler("onMouseEnter",root, function(mouse) if source == BTN.Open then guiSetAlpha(BTN.Open,0.80) end end ) addEventHandler("onMouseLeave",root, function(Leave) if source == BTN.Open then guiSetAlpha(BTN.Open,1) end end ) function getColPlayerTeam (Col, Team) for i, pla in pairs(getElementsWithinColShape(Col, "player")) do if getPlayerTeam(pla) and getPlayerTeam(pla) ~= getTeamFromName("Criminals") and getTeamName(getPlayerTeam(pla)) == getTeamName(Team) then return true else exports.TopBarChat:sendClientMessage( "~Warning : You must kill the other team members in the zone~",pla ,232 ,0 ,0 ) return false end end return false end function getTeamTufrs(Team) local Tufr = { } for Col, v in pairs(Tufrs) do if v.TeamName == getTeamName(Team) then table.insert( Tufr, Col ) end end return Tufr end addEventHandler("onColShapeHit",root, function(pla) local Rader = Tufrs[source] if ( Rader ) then setElementData(pla, "TeamTufrs",Rader ) end end) addEventHandler("onColShapeLeave",root, function(pla) setElementData(pla, "TeamTufrs",false ) end) setTimer (function ( ) for Col, v in pairs(Tufrs) do for i, pla in pairs(getElementsWithinColShape(Col, "player")) do local Team = getPlayerTeam ( pla ) if Team and getColPlayerTeam (Col, Team) then if getTeamName(Team) ~= Tufrs[Col].TeamName then if Tufrs[ Col ].occupier > 1 then Tufrs[ Col ].occupier = Tufrs[ Col ].occupier - 1 setRadarAreaFlashing ( Tufrs[ Col ].Radar, true ) elseif Tufrs[ Col ].occupier == 1 then local r, g, b = getTeamColor ( getPlayerTeam ( pla ) ) setRadarAreaFlashing ( Tufrs[ Col ].Radar, false ) setRadarAreaColor ( Tufrs[ Col ].Radar, r, g, b, 150 ) Tufrs[ Col ].TeamName = getTeamName(Team) Tufrs[ Col ].occupier = 100 exports.TopBarChat:sendClientMessage( "~Your Team now controls the turf~",pla ,0 ,255 ,0 ) for i, player in ipairs(getPlayersInTeam( Team )) do local Money = Tufrs[ Col ].Money exports.TopBarChat:sendClientMessage("You won ~$~"..Money, player, 0, 255, 0) setElementData(player, "Money", getElementData(player, "Money") + Money) givePlayerMoney(player,Money); end end else if Tufrs[ Col ].occupier < 99 then Tufrs[ Col ].occupier = Tufrs[ Col ].occupier + 1 elseif Tufrs[ Col ].occupier == 99 then local r, g, b = getTeamColor ( getPlayerTeam ( pla ) ) setRadarAreaFlashing ( Tufrs[ Col ].Radar, false ) setRadarAreaColor ( Tufrs[ Col ].Radar, r, g, b, 150 ) Tufrs[ Col ].TeamName = getTeamName(Team) Tufrs[ Col ].occupier = 100 end end end setElementData(pla, "TeamTufrs",Tufrs[Col] ) end end end,5000, 0) مش شغال @@@@@@ Link to comment
^iiEcoo'x_) Posted February 27, 2019 Share Posted February 27, 2019 اكتب باف 8 debugscript 3 وشوف ايش يطلع لك 1 1 Link to comment
ايهاب Posted February 27, 2019 Author Share Posted February 27, 2019 (edited) 1 hour ago, #_iMr,[E]coo said: اكتب باف 8 debugscript 3 وشوف ايش يطلع لك debugscript: Syntax is 'debugscript <mode>' debugscript: Your debug mode was set to 3 debugscript: Syntax is 'debugscript <mode>' debugscript: Syntax is 'debugscript <mode>' debugscript: Your debug mode is already that debugscript: Your debug mode is already that debugscript: Your debug mode is already that debugscript: Your debug mode is already that debugscript: Your debug mode is already that يسطا المود شغال بس لما يحتل مش بياخد فلوس دة كلينت local sW, sH = guiGetScreenSize( ) setElementData(localPlayer, "TeamTufrs",false) addEventHandler("onClientRender", root, function() local Tufr = getElementData(localPlayer, "TeamTufrs") if Tufr then local Team = getTeamFromName(Tufr.TeamName) local R, G, B = 0, 0, 0 if Team then R, G, B = getTeamColor(Team) end dxDrawRectangle(sW*(1064/1280), sH*(623/768), sW*(202/1280), sH*(122/768), tocolor(R, G, B, 180), false) dxDrawText("Team : "..Tufr.TeamName.."\nOccupier : %"..Tufr.occupier.."\nMoney : $"..Tufr.Money , sW*(1070/1280), sH*(622/768), sW*(1266/1280), sH*(745/768), tocolor(255, 255, 255, 255), 2.00, "default-bold", "left", "center", false, false, false, false, false) end end ) سيرفر Quote local Tufrs = { } local TufrsPos = { { 2652, -1264, 60, 60, "Ballas" , 5000 }, { 2646, -1888, 170, 215, "Ballas" , 5000 }, { 2415, -2155, 300, 95, "Grove Street" , 5000 }, { 2741, -1388, 120, 120, "Ballas" , 5000 }, { 2650, -1412, 75, 140, "Rifa" , 5000 }, { 2533, -1939, 120, 190, "Aztecas" , 5000 }, { 2742, -1495, 120, 110, "Ballas" , 5000 }, { 2646, -1664, 90, 250, "Grove Street" , 5000 }, { 2411, -1938, 120, 190, "Vagos" , 5000 }, { 2654, -1939, 50, 50, "Vagos" , 5000 } --{ X, Y, H, W, Team , Money }, } addEventHandler ( "onResourceStart", resourceRoot, function ( ) for i, v in ipairs(TufrsPos) do local ColShape = createColRectangle(v[1], v[2], v[3], v[4]) local Team = getTeamFromName(v[5]) local TeamName = "N/A" local R, G, B = 255, 255, 255 if Team then R, G, B = getTeamColor(Team) TeamName = getTeamName(Team) end Tufrs[ColShape] = { Radar = createRadarArea(v[1], v[2], v[3], v[4] , R, G, B, 180) , TeamName = TeamName , occupier = 100 , Money = v[6] , } end end ) addEventHandler("onMouseEnter",root, function(mouse) if source == BTN.Open then guiSetAlpha(BTN.Open,0.80) end end ) addEventHandler("onMouseLeave",root, function(Leave) if source == BTN.Open then guiSetAlpha(BTN.Open,1) end end ) function getColPlayerTeam (Col, Team) for i, pla in pairs(getElementsWithinColShape(Col, "player")) do if getPlayerTeam(pla) and getPlayerTeam(pla) ~= getTeamFromName("Criminals") and getTeamName(getPlayerTeam(pla)) == getTeamName(Team) then return true else exports.TopBarChat:sendClientMessage( "Warning : You must kill the other team members in the zone",pla ,232 ,0 ,0 ) return false end end return false end function getTeamTufrs(Team) local Tufr = { } for Col, v in pairs(Tufrs) do if v.TeamName == getTeamName(Team) then table.insert( Tufr, Col ) end end return Tufr end addEventHandler("onColShapeHit",root, function(pla) local Rader = Tufrs[source] if ( Rader ) then setElementData(pla, "TeamTufrs",Rader ) end end) addEventHandler("onColShapeLeave",root, function(pla) setElementData(pla, "TeamTufrs",false ) end) setTimer (function ( ) for Col, v in pairs(Tufrs) do for i, pla in pairs(getElementsWithinColShape(Col, "player")) do local Team = getPlayerTeam ( pla ) if Team and getColPlayerTeam (Col, Team) then if getTeamName(Team) ~= Tufrs[Col].TeamName then if Tufrs[ Col ].occupier > 1 then Tufrs[ Col ].occupier = Tufrs[ Col ].occupier - 1 setRadarAreaFlashing ( Tufrs[ Col ].Radar, true ) elseif Tufrs[ Col ].occupier == 1 then local r, g, b = getTeamColor ( getPlayerTeam ( pla ) ) setRadarAreaFlashing ( Tufrs[ Col ].Radar, false ) setRadarAreaColor ( Tufrs[ Col ].Radar, r, g, b, 150 ) Tufrs[ Col ].TeamName = getTeamName(Team) Tufrs[ Col ].occupier = 100 exports.TopBarChat:sendClientMessage( "Your Team now controls the turf",pla ,0 ,255 ,0 ) for i, player in ipairs(getPlayersInTeam( Team )) do local Money = Tufrs[ Col ].Money exports.TopBarChat:sendClientMessage("You won $"..Money, player, 0, 255, 0) setElementData(player, "Money", getElementData(player, "Money") + Money) givePlayerMoney(player,Money); givePlayerMoney( player, 5000 ) end end else if Tufrs[ Col ].occupier < 99 then Tufrs[ Col ].occupier = Tufrs[ Col ].occupier + 1 elseif Tufrs[ Col ].occupier == 99 then local r, g, b = getTeamColor ( getPlayerTeam ( pla ) ) setRadarAreaFlashing ( Tufrs[ Col ].Radar, false ) setRadarAreaColor ( Tufrs[ Col ].Radar, r, g, b, 150 ) Tufrs[ Col ].TeamName = getTeamName(Team) Tufrs[ Col ].occupier = 100 end end end setElementData(pla, "TeamTufrs",Tufrs[Col] ) end end end,5000, 0) Edited February 27, 2019 by ايهاب Link to comment
ايهاب Posted February 28, 2019 Author Share Posted February 28, 2019 On 27/02/2019 at 01:06, NX_CI said: مافى مبرمج عارف يساعدنى @@@@@2 Link to comment
TOUNSI |, السعأدة Posted February 28, 2019 Share Posted February 28, 2019 (edited) #حذف Edited February 28, 2019 by TOUNSI | ا̍ڸــڛۣــ؏ــٰٱ̍دہ Link to comment
Guest Posted March 6, 2019 Share Posted March 6, 2019 (edited) local Tufrs = { } local TufrsPos = { { 2652, -1264, 60, 60, "Ballas" , 5000 }, { 2646, -1888, 170, 215, "Ballas" , 5000 }, { 2415, -2155, 300, 95, "Grove Street" , 5000 }, { 2741, -1388, 120, 120, "Ballas" , 5000 }, { 2650, -1412, 75, 140, "Rifa" , 5000 }, { 2533, -1939, 120, 190, "Aztecas" , 5000 }, { 2742, -1495, 120, 110, "Ballas" , 5000 }, { 2646, -1664, 90, 250, "Grove Street" , 5000 }, { 2411, -1938, 120, 190, "Vagos" , 5000 }, { 2654, -1939, 50, 50, "Vagos" , 5000 } --{ X, Y, H, W, Team , Money }, } addEventHandler ( "onResourceStart", resourceRoot, function ( ) for i, v in ipairs(TufrsPos) do local ColShape = createColRectangle(v[1], v[2], v[3], v[4]) local Team = getTeamFromName(v[5]) local TeamName = "N/A" local R, G, B = 255, 255, 255 if Team then R, G, B = getTeamColor(Team) TeamName = getTeamName(Team) end Tufrs[ColShape] = { Radar = createRadarArea(v[1], v[2], v[3], v[4] , R, G, B, 180) , TeamName = TeamName , occupier = 100 , Money = v[6] , } end end ) addEventHandler("onMouseEnter",root, function(mouse) if source == BTN.Open then guiSetAlpha(BTN.Open,0.80) end end ) addEventHandler("onMouseLeave",root, function(Leave) if source == BTN.Open then guiSetAlpha(BTN.Open,1) end end ) function getColPlayerTeam (Col, Team) for i, pla in pairs(getElementsWithinColShape(Col, "player")) do if getPlayerTeam(pla) and getPlayerTeam(pla) ~= getTeamFromName("Criminals") and getTeamName(getPlayerTeam(pla)) == getTeamName(Team) then return true else exports.TopBarChat:sendClientMessage( "Warning : You must kill the other team members in the zone",pla ,232 ,0 ,0 ) return false end end return false end function getTeamTufrs(Team) local Tufr = { } for Col, v in pairs(Tufrs) do if v.TeamName == getTeamName(Team) then table.insert( Tufr, Col ) end end return Tufr end addEventHandler("onColShapeHit",root, function(pla) local Rader = Tufrs[source] if ( Rader ) then setElementData(pla, "TeamTufrs",Rader ) end end) addEventHandler("onColShapeLeave",root, function(pla) setElementData(pla, "TeamTufrs",false ) end) setTimer (function ( ) for Col, v in pairs(Tufrs) do for i, pla in pairs(getElementsWithinColShape(Col, "player")) do local Team = getPlayerTeam ( pla ) if Team and getColPlayerTeam (Col, Team) then if getTeamName(Team) ~= Tufrs[Col].TeamName then if Tufrs[ Col ].occupier > 1 then Tufrs[ Col ].occupier = Tufrs[ Col ].occupier - 1 setRadarAreaFlashing ( Tufrs[ Col ].Radar, true ) elseif Tufrs[ Col ].occupier == 1 then local r, g, b = getTeamColor ( getPlayerTeam ( pla ) ) setRadarAreaFlashing ( Tufrs[ Col ].Radar, false ) setRadarAreaColor ( Tufrs[ Col ].Radar, r, g, b, 150 ) Tufrs[ Col ].TeamName = getTeamName(Team) Tufrs[ Col ].occupier = 100 exports.TopBarChat:sendClientMessage( "Your Team now controls the turf",pla ,0 ,255 ,0 ) for i, player in ipairs(getPlayersInTeam( Team )) do local Money = Tufrs[ Col ].Money exports.TopBarChat:sendClientMessage("You won $"..Money, player, 0, 255, 0) setElementData(pla, "Money", getElementData(player, "Money") + Money) givePlayerMoney(pla,5000); end end else if Tufrs[ Col ].occupier < 99 then Tufrs[ Col ].occupier = Tufrs[ Col ].occupier + 1 elseif Tufrs[ Col ].occupier == 99 then local r, g, b = getTeamColor ( getPlayerTeam ( pla ) ) setRadarAreaFlashing ( Tufrs[ Col ].Radar, false ) setRadarAreaColor ( Tufrs[ Col ].Radar, r, g, b, 150 ) Tufrs[ Col ].TeamName = getTeamName(Team) Tufrs[ Col ].occupier = 100 end end end setElementData(pla, "TeamTufrs",Tufrs[Col] ) end end end,5000, 0) Edited March 6, 2019 by Guest Link to comment
ايهاب Posted March 16, 2019 Author Share Posted March 16, 2019 On 06/03/2019 at 23:03, DABL said: local Tufrs = { }local TufrsPos = { { 2652, -1264, 60, 60, "Ballas" , 5000 }, { 2646, -1888, 170, 215, "Ballas" , 5000 }, { 2415, -2155, 300, 95, "Grove Street" , 5000 }, { 2741, -1388, 120, 120, "Ballas" , 5000 }, { 2650, -1412, 75, 140, "Rifa" , 5000 }, { 2533, -1939, 120, 190, "Aztecas" , 5000 }, { 2742, -1495, 120, 110, "Ballas" , 5000 }, { 2646, -1664, 90, 250, "Grove Street" , 5000 }, { 2411, -1938, 120, 190, "Vagos" , 5000 }, { 2654, -1939, 50, 50, "Vagos" , 5000 } --{ X, Y, H, W, Team , Money },}addEventHandler ( "onResourceStart", resourceRoot,function ( ) for i, v in ipairs(TufrsPos) do local ColShape = createColRectangle(v[1], v[2], v[3], v[4]) local Team = getTeamFromName(v[5]) local TeamName = "N/A" local R, G, B = 255, 255, 255 if Team then R, G, B = getTeamColor(Team) TeamName = getTeamName(Team) end Tufrs[ColShape] = { Radar = createRadarArea(v[1], v[2], v[3], v[4] , R, G, B, 180) , TeamName = TeamName , occupier = 100 , Money = v[6] , } end end )addEventHandler("onMouseEnter",root,function(mouse)if source == BTN.Open thenguiSetAlpha(BTN.Open,0.80)endend)addEventHandler("onMouseLeave",root,function(Leave)if source == BTN.Open thenguiSetAlpha(BTN.Open,1)endend)function getColPlayerTeam (Col, Team) for i, pla in pairs(getElementsWithinColShape(Col, "player")) do if getPlayerTeam(pla) and getPlayerTeam(pla) ~= getTeamFromName("Criminals") and getTeamName(getPlayerTeam(pla)) == getTeamName(Team) then return true else exports.TopBarChat:sendClientMessage( "Warning : You must kill the other team members in the zone",pla ,232 ,0 ,0 ) return false end end return falseendfunction getTeamTufrs(Team) local Tufr = { } for Col, v in pairs(Tufrs) do if v.TeamName == getTeamName(Team) then table.insert( Tufr, Col ) end end return TufrendaddEventHandler("onColShapeHit",root,function(pla) local Rader = Tufrs[source] if ( Rader ) then setElementData(pla, "TeamTufrs",Rader ) endend)addEventHandler("onColShapeLeave",root,function(pla) setElementData(pla, "TeamTufrs",false )end)setTimer (function ( ) for Col, v in pairs(Tufrs) do for i, pla in pairs(getElementsWithinColShape(Col, "player")) do local Team = getPlayerTeam ( pla ) if Team and getColPlayerTeam (Col, Team) then if getTeamName(Team) ~= Tufrs[Col].TeamName then if Tufrs[ Col ].occupier > 1 then Tufrs[ Col ].occupier = Tufrs[ Col ].occupier - 1 setRadarAreaFlashing ( Tufrs[ Col ].Radar, true ) elseif Tufrs[ Col ].occupier == 1 then local r, g, b = getTeamColor ( getPlayerTeam ( pla ) ) setRadarAreaFlashing ( Tufrs[ Col ].Radar, false ) setRadarAreaColor ( Tufrs[ Col ].Radar, r, g, b, 150 ) Tufrs[ Col ].TeamName = getTeamName(Team) Tufrs[ Col ].occupier = 100 exports.TopBarChat:sendClientMessage( "Your Team now controls the turf",pla ,0 ,255 ,0 ) for i, player in ipairs(getPlayersInTeam( Team )) do local Money = Tufrs[ Col ].Money exports.TopBarChat:sendClientMessage("You won $"..Money, player, 0, 255, 0) setElementData(pla, "Money", getElementData(player, "Money") + Money) givePlayerMoney(pla,5000); end end else if Tufrs[ Col ].occupier < 99 then Tufrs[ Col ].occupier = Tufrs[ Col ].occupier + 1 elseif Tufrs[ Col ].occupier == 99 then local r, g, b = getTeamColor ( getPlayerTeam ( pla ) ) setRadarAreaFlashing ( Tufrs[ Col ].Radar, false ) setRadarAreaColor ( Tufrs[ Col ].Radar, r, g, b, 150 ) Tufrs[ Col ].TeamName = getTeamName(Team) Tufrs[ Col ].occupier = 100 end end end setElementData(pla, "TeamTufrs",Tufrs[Col] ) end endend,5000, 0) مش شغال يسطا الاراضى مش ظاهرة Link to comment
Guest Posted March 16, 2019 Share Posted March 16, 2019 2 hours ago, ايهاب said: مش شغال يسطا الاراضى مش ظاهرة م فهمت الأراضي ولا الفلوس ما يعطيك ؟ 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