- 
                Posts3,875
- 
                Joined
- 
                Days Won67
Everything posted by DNL291
- 
	Você não deve ter entendido o que o Ninguem quis dizer. O nome do tópico apenas com a palavra "Portao" não seria o correto para esse tutorial. Você poderia colocar um título mais formal. E colocar mais explicações fora do código. Eu concordo com o que ele disse. Grande parte do tutorial se concentra dentro do código, seria melhor colocar as explicações mais importantes fora do código, e deixar breves comentários pelas funções do código.
- 
	Try this: local rootElement = getRootElement() local sw,sh = guiGetScreenSize() local windowW = 280 local windowH = 160 local windowTitle = "" local windowTitleHeight = 40 local windowTitleColor = tocolor(0,0,0,255) local windowTitleBGColor = tocolor(0,0,0,255) local windowBGColor = tocolor(0,0,0,0) local windowX = sw - 350 - windowW local windowY = sh / 1.08 - windowH / 2 local localPlayer = getLocalPlayer ( ) function dx (thePlayer) local ping = getPlayerPing(getLocalPlayer()) local time = getRealTime() local hours = time.hour local minutes = time.minute local seconds = time.second local day = time.monthday local weekday = time.weekday local month = time.month+1 local year = time.year+1900 local playerName = getPlayerName ( getLocalPlayer() ) local money = getPlayerMoney(thePlayer) local playerX, playerY, playerZ = getElementPosition( getLocalPlayer()) local playerZoneName = getZoneName( playerX, playerY, playerZ ) local health = getElementHealth(getLocalPlayer()) dxDrawText(day.."/ "..month.."/ "..year.." ",sw/60.203, sh/1.500, sw,sh,tocolor(0,0,0,255),1.3,"default","left","top",false,false,false) dxDrawText(day.."#FF00CC/ #ffffff"..month.."#FF00CC/ #ffffff"..year.." ",sw/60.200, sh/1.505, sw,sh,tocolor(255,255,255,255),1.3,"default","left","top",false,false,false,true) dxDrawText(hours..": "..minutes..": "..seconds.." ",sw/60.203, sh/1.600, sw,sh,tocolor(0,0,0,255),1.5,"default","left","top",false,false,false) dxDrawText(hours.."#FF00CC: #ffffff"..minutes.."#FF00CC: #ffffff"..seconds.." ",sw/60.200, sh/1.605, sw,sh,tocolor(255,255,255,255),1.5,"default","left","top",false,false,false,true) local x = windowX local y = windowY + windowTitleHeight local h = windowH - windowTitleHeight dxDrawRectangle(x,y,windowW,h,windowBGColor) local veh = getPedOccupiedVehicle(localPlayer) if veh then local vehicle = getVehicleName(veh,thePlayer) else end end function HandleTheRendering () addEventHandler("onClientRender",rootElement, dx) end addEventHandler("onClientResourceStart",rootElement, HandleTheRendering)
- 
	Any error in debugscript?
- 
	local year = time.year+113
- 
	Você desativou a imagem que criou na janela? Tente usando guiSetEnabled.
- 
	Você quer dizer, se o jogador que está conduzindo o veículo matou alguém atropelado? Se for isso, use o evento onClientPlayerWasted e verifique se o elemento killer do parâmetro do evento está em um veículo. Ou use onPlayerWasted e verifique se o elemento killer é um veículo.
- 
	Is missing 'end' in your code.
- 
	O acento não causa erro, ele pode apenas bugar a palavra se o código não estiver em sua codificação correta. Use UTF-8 sem BOM como codificação nesse caso. Apenas corrigi um pequeno erro no código de manawydan. Tente isso: Client: function CancelarHeliKill(heliKiller) if heliKiller then local assasino = getVehicleController ( heliKiller ) if assasino then triggerServerEvent ( "onServerPlayerHeliKilled", assasino, assasino ) end end end addEventHandler("onClientPlayerHeliKilled", getRootElement(), CancelarHeliKill) Server: addEvent("onServerPlayerHeliKilled", true) function CancelarMHeliK(sujeito) if sujeito then kickPlayer ( sujeito, "Você foi kickado por fazer helikill" ) end end addEventHandler("onServerPlayerHeliKilled", getRootElement(), CancelarMHeliK)
- 
	  -=|FaLCoN SeRvEr|=-=|MTA DayZ|=-=|24hrs|=-=|ONLINE|=-DNL291 replied to trakinikes's topic in Servidores para jogar 
- 
	  [Ajuda]Erro com MTADNL291 replied to Hugo_Matos's topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor) Tente reinstalar/atualizar o Runtime Library, ou faça uma restauração de sistema do computador.
- 
	Sim. Obviamente, não precisa enviar o MTA inteiro, apenas o server.
- 
	"onClientPlayerVehicleEnter" is client-side only.
- 
	Try this: function bmoney(thePlayer) if (getPlayerMoney(thePlayer) >= 100) then takePlayerMoney(thePlayer, 100) outputChatBox( "#FFFF00Você gastou 100$ em 1 pedra de CRACK!", thePlayer, 255, 255, 255, true ) sdrogas(thePlayer) else outputChatBox( "Você deve ter $100 ou mais para usar este comando.", thePlayer, 220, 0, 0, true ) end end addCommandHandler( "drogas", bmoney ) function sdrogas ( player ) setPedArmor ( player, 97 ) setElementHealth ( player, 30 ) outputChatBox ( "Você usou Drogas!",player, 255, 255, 255, true ) daBlockz = getElementData(player,"blockz") daAnimz = getElementData(player,"animz") if daBlockz == "crack" and daAnimz == "Bbalbat_Idle_02" then setPedAnimation(player,false) else setPedAnimation ( player, "CRACK", "Bbalbat_Idle_02") end end function onEnterVehicle ( theVehicle, seat, jacked ) setTimer ( function() toggleControl ( "accelerate", false ) -- disable the accelerate key toggleControl ( "brake_reverse", false ) -- disable the brake_reverse key toggleControl ( "handbrake", false ) -- disable the handbrake key setControlState ( "accelerate", true ) -- force the accelerate key on outputChatBox ( "Efeito das Drogas Passou" ) end, 5000, 1 ) end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), onEnterVehicle )
- 
	Para obter as coordenadas no MTA digite o comando /getpos (no gamemode Freeroam apenas).
- 1 reply
- 
	- 1
- 
					
						
					
							  
 
 
- 
	Eu uso Notepad++ com Lua highlighting e syntax check. Você pode encontrar nesse tópico: viewtopic.php?f=91&t=43141&hilit=notepad+package+for+scripters Também tem o Editor de Script feito por 50p: https://forum.multitheftauto.com/viewtopic.php?t=24834 Tem diversos compiladores de código Lua. Você pode encontrar pelo fórum. Aqui está um deles: viewtopic.php?f=108&t=33905
- 
	Qual modo de jogo você está usando? Procure por uma função exportada que altera o número de zumbis.
- 
	triggerClientEvent No one will make the script for you, we are here to help you. Also, will be difficult to someone understand what you said because his english has errors.
- 
	function math.round(number, decimals, method) decimals = decimals or 0 local factor = 10 ^ decimals if (method == "ceil" or method == "floor") then return math[method](number * factor) / factor else return tonumber(("%."..decimals.."f"):format(number)) end end
- 
	triggerServerEvent ?
- 
	Try this: function vincular(player) outputChatBox ("[Forum] O Player "..getPlayerName(player), root, 255, 255, 255, true) end addCommandHandler ( "vincular", vincular)
- 
	No description: https://community.multitheftauto.com/ind ... ls&id=7060 Stolen: https://community.multitheftauto.com/ind ... ls&id=7065 And https://community.multitheftauto.com/ind ... ls&id=7064 Ban the user, please. DONE! First one isn't being removed. Description isn't required.
- 
	De nada. Consulte bem o MTA Wiki sempre tiver alguma dúvida, principalmente, tente fazer o script por você mesmo (você pode estar sempre fazendo isso, mas procure evitar ao máximo abrir um tópico por pequenas dúvidas, abra um tópico quando realmente precisar).
- 
	getPedWeapon Retorna o ID da arma, não retorna o slot.

