Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 21/05/18 in all areas

  1. السلام عليكم ورحمة الله تعالى وبركاته, كيف الحال؟ إن شاء الله بخير اليوم معنا الفيديو الخاص بالسيرفر فخامة :- الاهدائات@Ahmed_Negm@Master_MTA@iiKhaled@!#NssoR_)@#ibrahim@*[email protected]@[email protected]@#StrOnG_,)@Abu-Solo@#Soking@The Killer@#[K]aTakuRI-,?@Sha67@Ahmed Ly@TAPL @MrKAREEM فأمان الله
    2 points
  2. Hi everyone. I want to share some of my resources. For almost 8 years I have been working on various projects in the MTA and over the years there has been an archive of resources and scripts. Maybe for someone it will be useful and interesting. Consists: •Terrain editor(in two editions). In-game terrain editing system. Video •Dynamic grass. Video •Light baking and rendering system(with DFF or distributed) Video •Models loader(DFF/TXD/COL) that can download and stream-in only those that are within a certain radius from the player •Two version of the TEDERIs Construction Tools(with FlowGraph or Wire) Video •Particle system(natively DFF or through dxDraw* fns) Video •Blank for RP gamemode and more •And more All this can be found on GitHub Notice! Many resources have been created for a long time and likely they require some adaptation for the new version of the MTA.
    1 point
  3. 1 point
  4. متشوقين لإبداعاتك كالعــادة بالإنتظار
    1 point
  5. dbExec(ваше подключение, "SET CHARACTER SET utf8")
    1 point
  6. customBoundaries = { -- this boundary is between the big brown building(s) and the skatepark on the road in LS ["test"] = { {x = 1842.2908935547, y = -1412.469360351}, {x = 1856.8596191406, y = -1412.555664062}, {x = 1851.5925292969, y = -1436.5225830078}, {x = 1842.0438232422, y = -1424.5217285156}, }, } local colorOfBounds = tocolor(255, 0, 0) bindKey("e", "down", function () if isElementWithinBoundary(localPlayer, "test") then colorOfBounds = tocolor(0, 255, 0) else colorOfBounds = tocolor(255, 0, 0) end end ) addEventHandler("onClientRender", getRootElement(), function () local localX, localY, localZ = getElementPosition(localPlayer) local boundary = "test" for i = 1, #customBoundaries[boundary] do local currentPoint = customBoundaries[boundary][i] local nextPoint = customBoundaries[boundary][i + 1] if currentPoint then if i == #customBoundaries[boundary] then nextPoint = customBoundaries[boundary][1] dxDrawLine3D(currentPoint.x, currentPoint.y, localZ, nextPoint.x, nextPoint.y, localZ, colorOfBounds, 3) end dxDrawLine3D(currentPoint.x, currentPoint.y, localZ, nextPoint.x, nextPoint.y, localZ, colorOfBounds, 3) end end end ) function isElementWithinBoundary(element, boundary) if isElement(element) and boundary and customBoundaries[boundary] and #customBoundaries[boundary] >= 3 then local pointX, pointY, pointZ = getElementPosition(element) local intersections = 0 for i = 1, #customBoundaries[boundary] do local currentPoint = customBoundaries[boundary][i] if currentPoint then local nextPoint = customBoundaries[boundary][i + 1] local previousPoint = customBoundaries[boundary][i - 1] if i == 1 then previousPoint = customBoundaries[boundary][1] elseif i == #customBoundaries[boundary] then nextPoint = customBoundaries[boundary][1] end if areIntersecting(pointX, pointY, previousPoint.x, previousPoint.y, currentPoint.x, currentPoint.y, nextPoint.x, nextPoint.y) then intersections = intersections + 1 end end end if intersections > 0 then return true end end return false end function sign(x1, y1, x2, y2, x3, y3) return (x1 - x3) * (y2 - y3) - (x2 - x3) * (y1 - y3) end function areIntersecting(pointX, pointY, x1, y1, x2, y2, x3, y3) local b1 = sign(pointX, pointY, x1, y1, x2, y2) < 0 local b2 = sign(pointX, pointY, x2, y2, x3, y3) < 0 local b3 = sign(pointX, pointY, x3, y3, x1, y1) < 0 return b1 == b2 and b2 == b3 end Tested. Works with 3 or more points. Yes, you can check the element within the the polygon.
    1 point
  7. 1 point
  8. Vc criou várias funções com o mesmo nome, isso não pode. No evento onResourceStart, vc não deve usar getRootElement() como elemento ativador, pois irá executar quando qualquer resource for iniciado, não só este. Na Wiki ele diz qual o elemento ativador usar para que só ative ao iniciar este resource. Só saber ler o início da página.
    1 point
  9. Já lhe avisamos mais de 3 vezes que vc precisa usar o botão <> quando for postar código. Se colar direto como texto, não consigo interpretar o código. Não posso lhe ajudar enquanto não postar da maneira legível o código. https://prntscr.com/itiqv9
    1 point
  10. setPedTargetingMarkerEnabled
    1 point
  11. Só vc criar as Teams no script e adicionar uma função que coloca os players no Team correto quando eles logam no servidor dependendo da ACL Group que eles estiverem. createTeam (cria o time) onPlayerLogin (executa o evento quando alguém faz login) isObjectInACLGroup (verifica se um objeto está em determinada ACL Group) setPlayerTeam (coloca alguém em determinado Team) Para evitar o bug, vc pode fazer uma verificação ao iniciar o resource, para que ele coloque os players que já estão logados nos times corretos. Dai vc precisa obter todos os players online, verificar quais deles estão logados e verificar se eles estão na ACL Group correta. onResourceStart (executa o evento quando um resource é iniciado) getElementsByType (obtém todos os elementos do servidor daquele tipo, neste caso use o tipo "player" e ele vai obter todos os jogadores online) isGuestAccount (verifica se uma conta é Guest ou não, usa-se isso para verificar se um player está logado ou não.) Outra coisa que vc deve fazer, é tirar os jogadores do Team se eles deslogarem (sem sair do servidor). Dai basta setar Team nulo neles quando eles fizerem logout. onPlayerLogout (executa o evento quando alguém faz logout) setPlayerTeam (coloca alguém em determinado Team, neste caso coloque nil, no parâmetro do Team para remover o jogador de um Team.)
    1 point
×
×
  • Create New...