-
Posts
120 -
Joined
-
Last visited
Everything posted by JuniorMelo
-
sure ??? Client addEventHandler("onClientVehicleCollision", getRootElement(), function () localPlayer = getLocalPlayer() triggerServerEvent("Collision", getRootElement(), localPlayer) end ) Server addEvent("Collision", true) addEventHandler("Collision", getRootElement(), function (hitElement) if ( isElement ( hitElement ) and getElementType ( hitElement ) == "player" ) then local car = getPedOccupiedVehicle(hitElement) if car then local accountSource = getPlayerAccount ( hitElement ) setAccountData( accountSource,"totalkillsdeaths.Deaths",tonumber( getAccountData(accountSource,"totalkillsdeaths.Deaths") or 0 ) +1 ) setElementData( hitElement, "T/D", tonumber( getAccountData( accountSource,"totalkillsdeaths.Deaths" ) )) end end end ) addEventHandler( "onResourceStart",resourceRoot, function( ) outputDebugString( "add Total Deaths to scoreboard Return: "..tostring( call( getResourceFromName("Scoreboard"), "addScoreboardColumn", "T/D",root,3, 0.052 ) ) ) end )
-
Hello I wonder if it is possible to change the map only in dimension 1 function setNextRandomMap() local manager = exports.mapmanager local gameMode = manager:getRunningGamemode() local mapTable = {} for index, map in ipairs(manager:getMapsCompatibleWithGamemode(gameMode)) do if (map) then table.insert(mapTable, map) outputDebugString("Map found: " .. getResourceName(map)) end end if (#mapTable >= 0) then local randomMap = math.random(1, #mapTable) manager:changeGamemodeMap(mapTable[randomMap], gameMode) mapTable = {} else outputDebugString("Error loading new map. No map was found for this gamemode.") end end
-
Hello I have a problem with this script, When the player dies no account can help me ? function onVehicleExplode (hitElement) if ( isElement ( hitElement ) and getElementType ( hitElement ) == "player" ) then local car = getPedOccupiedVehicle(hitElement) if car then local accountSource = getPlayerAccount ( hitElement ) setAccountData( accountSource,"totalkillsdeaths.Deaths",tonumber( getAccountData(accountSource,"totalkillsdeaths.Deaths") or 0 ) +1 ) setElementData( hitElement, "T/D", tonumber( getAccountData( accountSource,"totalkillsdeaths.Deaths" ) )) end end end addEventHandler ( "onVehicleExplode", Cars[player], onVehicleExplode ) addEventHandler( "onResourceStart",resourceRoot, function( ) outputDebugString( "add Total Deaths to scoreboard Return: "..tostring( call( getResourceFromName("Scoreboard"), "addScoreboardColumn", "T/D",root,3, 0.052 ) ) ) end )
-
you mean it is not possible to do this?
-
then, because this line does not work ?? elseif getElementType ( source ) == "vehicle" then local source = getVehicleOccupant ( source, 0 ) if source then triggerClientEvent ( source, "exp", root ) end
-
I will test this * killer * and who kills * source * and who died right ???
-
I'm trying to do the following I and another player are using the hunter, I kill the other player but not gain EXP
-
sorry, is not what i wanted when another player is in a vehicle not count EXP function win ( ammo, killer, weapon, bodypart ) if killer then if getElementType ( killer ) == "player" then if killer ~= source then triggerClientEvent ( killer, "exp", root ) end elseif getElementType ( source ) == "vehicle" then local source = getVehicleOccupant ( source, 0 ) if source then triggerClientEvent ( source, "exp", root ) end end end end addEventHandler ( "onPlayerWasted", root, win )
-
Hello I have a problem with this script When the player dies in a car does not count EXP function win(ammo, killer, weapon, bodypart) local killer1 = getPlayerName(killer) local name = getPlayerName(source) if (killer and killer ~= source) then if (getElementType(killer) == "vehicle") then killer = getVehicleController(killer) end if (killer) then triggerClientEvent(killer, "exp", getRootElement()) end end end addEventHandler( "onPlayerWasted", getRootElement(), win) sorry my bad english
-
Entrei no servidor achei muito interessante Boa Sorte !!!! Estou trabalhando em um Multi game mode também não é la essas coisas más esta bom para um começo http://www.upload.ee/image/3604544/mta-screen_2013-09-25_23-26-25.png
-
I can not put "dxDrawText" because I'm going to use the function guiGetVisible
-
function timestart() if isTimer(timer) then timeLeft = math.ceil(getTimerDetails(timer) / 1000) if not guiGetVisible(GUIEditor_Window[1],true) then guiSetText(y,"Time :"..(tostring(convertMS(timeLeft)) or 'BUG')) end end end
-
Yes no worked '--'
-
function timestart() addEventHandler("onClientRender", getRootElement(), timestart) if isTimer(timer) then killTimer(timer) end timer = setTimer(function() removeEventHandler("onClientRender", getRootElement(), timestart) end,1000000,1) end addEventHandler( "onClientResourceStart", getRootElement(), timestart ) ????
-
if isTimer(timer) then local timeLeft = math.ceil(getTimerDetails(timer) / 1000)
-
Hello I have a problem in this script/b] the time does not work Error addEventHandler( "onClientResourceStart", getRootElement(), function() addEventHandler("onClientRender", getRootElement(), timestart) if isTimer(timer) then killTimer(timer) end timer = setTimer(function() removeEventHandler("onClientRender", getRootElement(), timestart) end,1000000,1) end) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(0.2537,0.13,0.42,0.715,"Panel Test",true) guiSetAlpha(GUIEditor_Window[1],1) y = guiCreateLabel(25,33,307,30,"Time:",false,GUIEditor_Window[1]) guiLabelSetColor(y,0,255,0) guiSetText ( y, (tostring(convertMS(timeLeft)) or 'BUG')) function timestart() if isTimer(timer) then local timeLeft = math.ceil(getTimerDetails(timer) / 1000) if guiGetVisible(GUIEditor_Window[1],true) then else guiSetText(y,"Time :"..(tostring(convertMS(timeLeft)) or 'BUG')) end end end function convertMS( timeMs ) local minutes = math.floor( timeMs / 60 ) local timeMs = timeMs - minutes * 60; local seconds = math.floor( timeMs / 60 ) local ms = timeMs - seconds * 60; return string.format( '%02d :%3d', minutes, ms ); end
-
QUEM ME PASSA UM RESOURCE ANTI-PVP URGENTE?
JuniorMelo replied to Zero.o's topic in Programação em Lua
o forum do MTA não foi criado para dar script más sim para ajudar com seus scripts caso vc queria scripts vá na camunidade https://community.multitheftauto.com/ -
You're welcome.
-
Test function hit ( pla, dim, hitElement ) if getElementType ( pla ) == "player" then local vehicle = getPedOccupiedVehicle ( pla ) if vehicle or not vehicle then Team = getPlayerTeam ( pla ) TeamName = getTeamFromName ( "Army" ) if ( Team ) == TeamName then outputChatBox ( "Tervetuloa valtion alueelle, "..getPlayerName(pla).."!", pla, 0, 150, 0 ) else setElementData ( pla, "inRestrictedArea", "true" ) triggerClientEvent ( pla, "destroyTrepassor", g_root, pla ) outputChatBox ( "***Valtion Tukikohta***", pla, 255, 0, 0 ) outputChatBox ( "* "..getPlayerName(pla).." on astunut valtion tukikohtaan, Ohjukset on laukaistu!", g_root, 255, 0, 0 ) end end end end addEventHandler ( "onColShapeHit", g_base_col, hit )
-
"Sr.zika" description="Helli Kill" type="script" version="4.0.0" /> kkkkk eu rir d + agora o script do cara o outro tem a cara de pau de colocar o nome dele como autor e ainda fazer um video e posta o script na comunidade Cara vc é o pior ladrão de script que eu já vi nesse MTA e olha que eu jogo mta a 4 anos e alguns messes Olha vou te dar um conselho para com isso se não futuramente vai ser pior para vc (a coisa só vai ficar pior e pior e pior e vc vai ficar conhecido como o pior ladrão de scripts do MTA se já não é né !!!
-
function Model() txd = engineLoadTXD("delta.txd", 15 ) engineImportTXD(txd, 15)-- dff = engineLoadDFF("delta.dff", 15 ) engineReplaceModel(dff, 15)-- end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), Model) https://wiki.multitheftauto.com/wiki/Character_Skins ID Skins