Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/09/22 in all areas

  1. I made this tool for myself and a bunch of friends who wanted to split a larger map (with objects all over SA) into multiple maps easily, without having to open the .map file while looking for x and y coordinates and manually filtering potentially hundreds of objects (that's obviously a no-go). Figured that maybe some of you might find this useful. Usage is pretty straightforward, added some information in the tool to help you out. Hope it helps! https://github.com/marty000123/Marty-s-MTA-SA-Map-Cut-Tool
    1 point
  2. Tocmai ce am lansat a treia parte din primul episod! ? În această parte, discutăm despre tipurile de comunități pe care le poți întâlni și cum se diferențiază fiecare în parte. Forma completă a episodului va fi publicată separat odată cu publicarea tuturor celorlalte părți din acest episod. Inițiativa Școala Roleplay este un demers al comunității Los Santos Roleplay. Comunitatea Los Santos Roleplay reprezintă o comunitate virtuală românească de roleplay axată pe platformele jocurilor Grand Theft Auto. Comunitatea Los Santos Roleplay a luat naștere din pasiunea pentru roleplay și din dorința de a pune la dispoziția jucătorilor un mediu cât mai propice, matur și de lungă durată în care aceștia să facă roleplay. Ne dorim să oferim un mediu cât mai plăcut tuturor celor care doresc să facă roleplay la standarde cât mai înalte, într-o atmosferă relaxată și prietenoasă în care scopul și satisfacția supremă este distracția și bunăstarea. Poți afla mai multe despre proiectul nostru și comunitatea Los Santos Roleplay accesând topic-ul de prezentare aici: https://forum.multitheftauto.com/topic/123732-los-santos-roleplay-românia/
    1 point
  3. data,_add = { },addEventHandler function SColor(e,r,g,b) if getElementType(e) == 'gui-button' then guiSetProperty(e, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X",r,g,b,255)) end end dxDrawImage_ = dxDrawImage local dxDrawImage = function (...) local a = {...} if isElement( a[1] ) and getElementType( a[1] ) == 'gui-button' and guiGetVisible (a[1]) then data [ a[1] ] = true local posX, posY = guiGetPosition ( a[1] , false ) local width , Height = guiGetSize ( a[1] , false ) dxDrawImage_ (posX , posY, width,Height,a[2], a[3],a[4],a[5], a[6] , a[7]) local r, g, b = getColorFromString("#"..guiGetProperty(a[1], "NormalTextColour")) dxDrawText(guiGetText ( a[1] ) or tostring '',posX, posY, width + posX , Height + posY,SetTextcolor or tocolor(r, g, b,255),1,"default-bold","center","center",false,false,true) guiSetAlpha( a[1] , 0) end if not isElement( a[1] ) then return dxDrawImage_ (...) end end local function Enter() if data [ source ] == true then SColor(source,0 ,255, 0) end end local function Leave() if data [ source ] == true then SColor(source,255, 124,124) end end _add ( "onClientMouseEnter",resourceRoot,Enter) _add ( "onClientGUIMouseUp", resourceRoot,Enter) _add ( "onClientMouseLeave",resourceRoot,Leave) _add ( "onClientGUIMouseDown",resourceRoot,Leave) -----------------\\\\\\\\\\\\\\\\\\\\----------------- event = guiCreateButton(16, 20, 250, 40, "Take", false) guiSetVisible (event, false) addEventHandler ("onClientRender", root, function () dxDrawImage(event ,'img/event.png', 0, 0, 0,tocolor(255, 255, 255, 255), true) -- attach to Button -- dxDrawImage(160, 200, 250, 40 ,'img/event.png', 0, 0, 0,tocolor(255, 255, 255, 255), true) -- dx Image end) bindKey( "k", "down",function( ) guiSetVisible( event , not guiGetVisible( event )) showCursor( guiGetVisible( event )) end ) try this
    1 point
  4. marker1 = createMarker(2094.8940429688,-838.72570800781,52.3, "corona", 1.5, 230, 251, 3, 153) function event(el) if getElementType(el) ~= "player" then return end if el ~= localPlayer then return end -- function open a window end addEventHandler("onClientMarkerHit", resourceRoot, event)
    1 point
  5. local antiflood = { } local currentflood = { } local timer = { } mutado = false function antiFlood( mtaz ) if mutado then outputChatBox ("Você está mutado, aguarde um pouco para enviar mensagens novamente.", source, 0, 255, 0, true) cancelEvent( ) return false end plr_source = source if isTimer( timer[source] ) then killTimer( timer[source] ) end if not currentflood[source] then currentflood[source] = 0 elseif currentflood[source] <= -1 then currentflood[source] = 0 end if currentflood[source] >= 3 then setPlayerMuted( source, true ) outputChatBox ("Você foi mutado, aguarde 1 minuto para enviar mensagens novamente!", source, 0, 255, 0, true) mutado = true else if antiflood[source] == true then cancelEvent() currentflood[source] = currentflood[source] + 1 outputChatBox("Aguarde 1 segundo!", source, 255, 0, 0, true) else currentflood[source] = currentflood[source] - 1 end antiflood[source] = true timer[source] = setTimer ( function() antiflood[plr_source] = false end, 900, 1 ) end end addEventHandler( "onPlayerChat", root, antiFlood ) Você colocou um setTimer fora da função atrelada ao evento "onPlayerChat", e também, o "chatbox" não é um control em si, e sim um comando, da maneira acima, se a variável "mutado" for verdadeira, a mensagem que o player enviar será cancelada e enviará um outputChatBox o avisando que ele está mutado.
    1 point
×
×
  • Create New...