-
Posts
3,875 -
Joined
-
Days Won
67
Everything posted by DNL291
-
getPedWeapon(thePed, 2) Use getPedTotalAmmo com o slot da pistola se quiser verificar a munição da arma do ped. Mas lembre-se que primeiro você deve verificar se o ped tem essa arma.
-
Por favor, baixe esse software para verificar se suas portas estão abertas e para abrir as portas para um jogo em específico. Isso pode ser muito útil para você. Você pode ver aqui como usá-lo (abaixo da descrição). Por meio disso, você pode ter certeza que as portas do MTA estão realmente abertas nas configurações de seu roteador.
-
Tente isso: local objetosItens = {} local pistolaCol = {} local pistola = { {2478.615234375, -1676.2136230469, 13.336660385132}, {2475.51953125, -1698.0883789063, 13.522142410278}, {311.80181884766, 1809.5435791016, 17.640625}, {280.9345703125, 1954.8565673828, 17.640625}, {246.69946289063, 1385.6153564453, 23.37028503418}, {-176.94442749023, 1149.9345703125, 19.598318099976}, {816.51824951172, 856.54290771484, 12.7890625}, {1207.6088867188, 2125.2395019531, 6.734375}, {2323.6633300781, 1283.0540771484, 97.438095092773}, {-1931.8199462891, 656.82000732422, 46.5625}, {2615.3359375, 1816.1739501953, 10.8203125}, {1764.2044677734, 2085.2583007813, 20.972038269043}, {-1381.1610107422, 493.40637207031, 27.694522857666}, {2383.6462402344, 2757.1452636719, 13.105983734131}, {1587.9537353516, 752.60015869141, 10.8203125}, {2820.8581542969, 2271.759765625, 14.661463737488}, {2314.1103515625, -4.8270263671875, 32.53125}, {1272.0865478516, 294.79476928711, 20.656307220459}, {187.23028564453, -90.492126464844, 8.8986940383911}, {-1123.1042480469, -924.32379150391, 129.21875}, {-2337.7961425781, -1617.6987304688, 483.71405029297}, {-2228.8112792969, -1744.6583251953, 480.88488769531}, {-2328.6296386719, 1537.9274902344, 17.328125}, {-1633.8870849609, -2237.8508300781, 31.4765625}, {2494.7124023438, -1689.0024414063, 21.675098419189}, {2244.6433105469, -1324.0946044922, 41.259601593018}, {894.87707519531, -1453.7999267578, 21.178594589233}, {1623.6677246094, -1041.9099121094, 27.201309204102}, {387.02029418945, -2029.3041992188, 22.108934402466}, {-65.270530700684, -1587.7954101563, 2.6171875}, {-656.64978027344, -2184.2194824219, 16.19390296936}, {-429.22280883789, 1405.0031738281, 17.471927642822}, {-2413.8935546875, 802.74127197266, 35.1796875}, {-1357.7237548828, -26.7275390625, 14.1484375} } function zzzz(hitElement) if (getElementType(hitElement) == "player") then if not getElementData(source, "colshapeID") then return end local colID = tonumber(getElementData(source, "colshapeID")) destroyElement(objetosItens[colID]) destroyElement(source) end end do for i=1, #pistola do objetosItens[i] = createObject(1463, pistola[i][1], pistola[i][2], pistola[i][3]-0.93) setObjectScale(objetosItens[i], 3) setElementCollisionsEnabled(objetosItens[i], false) setElementFrozen(objetosItens[i], true) pistolaCol[i] = createColCuboid(pistola[i][1], pistola[i][2], pistola[i][3], 0.1977, 0.4053, 1.0003) attachElements(pistolaCol[i], objetosItens[i], 0, 0, 0) setElementData(pistolaCol[i], "colshapeID", i, false) end addEventHandler("onColShapeHit", root, zzzz) end
-
Try this: dxDrawText ( getPlayerName(player):gsub("#%x%x%x%x%x%x", ""), sx, sy - offset, sx, sy - offset, tocolor(0,0,0,255), textscale*NAMETAG_TEXTSIZE, "bankgothic", "center", "bottom", false, false, false ) dxDrawText ( getPlayerName(player), sx, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, "bankgothic", "center", "bottom", false, false, false, true )
-
Try this: function start() PANEL2 = guiCreateWindow(201, 186, 394, 172, "", false) guiWindowSetSizable(PANEL2, false) guiSetVisible(PANEL2, false) JUGAR = guiCreateButton(32, 45, 150, 90, "Jugar con el mismo personaje", false, PANEL2) guiSetFont(JUGAR, "default-bold-small") REGRESAR = guiCreateButton(211, 45, 150, 90, "Regresar al Menú", false, PANEL2) guiSetFont(REGRESAR, "default-bold-small") addEventHandler("onClientGUIClick", JUGAR, jugarrr) addEventHandler("onClientGUIClick", REGRESAR, regresarrr) end addEventHandler("onClientResourceStart", resourceRoot, start) function ondead() if source == localPlayer then setTimer(guiSetVisible, 5000, 1, PANEL2, true) setTimer(showCursor, 5000, 1, true) end end addEventHandler("onClientPlayerWasted", localPlayer, ondead)
-
Como o script deve funcionar? Pode explicar? Se você move-lo com um comando use addCommandHandler e chame a função para fazer o movimento para fechá-lo. Faça o mesmo para move-lo para abrir, usando uma variável ou criando outra função que irá mover o objeto, chamando ela com addCommandHandler.
-
Tente isso: local objetosItens = {} local pistolaCol = {} local pistola = { {2478.615234375, -1676.2136230469, 13.336660385132}, {2475.51953125, -1698.0883789063, 13.522142410278}, {311.80181884766, 1809.5435791016, 17.640625}, {280.9345703125, 1954.8565673828, 17.640625}, {246.69946289063, 1385.6153564453, 23.37028503418}, {-176.94442749023, 1149.9345703125, 19.598318099976}, {816.51824951172, 856.54290771484, 12.7890625}, {1207.6088867188, 2125.2395019531, 6.734375}, {2323.6633300781, 1283.0540771484, 97.438095092773}, {-1931.8199462891, 656.82000732422, 46.5625}, {2615.3359375, 1816.1739501953, 10.8203125}, {1764.2044677734, 2085.2583007813, 20.972038269043}, {-1381.1610107422, 493.40637207031, 27.694522857666}, {2383.6462402344, 2757.1452636719, 13.105983734131}, {1587.9537353516, 752.60015869141, 10.8203125}, {2820.8581542969, 2271.759765625, 14.661463737488}, {2314.1103515625, -4.8270263671875, 32.53125}, {1272.0865478516, 294.79476928711, 20.656307220459}, {187.23028564453, -90.492126464844, 8.8986940383911}, {-1123.1042480469, -924.32379150391, 129.21875}, {-2337.7961425781, -1617.6987304688, 483.71405029297}, {-2228.8112792969, -1744.6583251953, 480.88488769531}, {-2328.6296386719, 1537.9274902344, 17.328125}, {-1633.8870849609, -2237.8508300781, 31.4765625}, {2494.7124023438, -1689.0024414063, 21.675098419189}, {2244.6433105469, -1324.0946044922, 41.259601593018}, {894.87707519531, -1453.7999267578, 21.178594589233}, {1623.6677246094, -1041.9099121094, 27.201309204102}, {387.02029418945, -2029.3041992188, 22.108934402466}, {-65.270530700684, -1587.7954101563, 2.6171875}, {-656.64978027344, -2184.2194824219, 16.19390296936}, {-429.22280883789, 1405.0031738281, 17.471927642822}, {-2413.8935546875, 802.74127197266, 35.1796875}, {-1357.7237548828, -26.7275390625, 14.1484375} } do for i=1, #pistola do objetosItens[i] = createObject(1463, pistola[i][1], pistola[i][2], pistola[i][3]-0.93) setObjectScale(objetosItens[i], 3) setElementCollisionsEnabled(objetosItens[i], false) setElementFrozen(objetosItens[i], true) pistolaCol[i] = createColCuboid(pistola[i][1], pistola[i][2], pistola[i][3], 0.1977, 0.4053, 1.0003) attachElements(pistolaCol[i], objetosItens[i], 0, 0, 0) setElementParent(pistolaCol[i], objetosItens[i]) addEventHandler("onColShapeHit", pistolaCol[i], zzzz) end end function zzzz(hitElement) if (getElementType(hitElement) == "player") then for i=1, #pistola do if (getElementParent(source) == objetosItens[i]) then destroyElement(objetosItens[i]) if not i == #pistola then break end end end end end
-
Certamente porque você usou a função setElementParent. Tente destruindo o elemento pai, o objeto.
-
Try this: addEventHandler("onResourceStart",resourceRoot, function ( ) setWeaponProperty(16, "pro", "damage", 1) setWeaponProperty(16, "std", "damage", 1) setWeaponProperty(16, "poor", "damage", 1) end )
-
local pistola = { {2470.7863769531, -1698.5581054688, 13.516083717346}, {2475.51953125, -1698.0883789063, 13.522142410278}, {311.80181884766, 1809.5435791016, 17.640625}, {280.9345703125, 1954.8565673828, 17.640625}, {246.69946289063, 1385.6153564453, 23.37028503418}, {-176.94442749023, 1149.9345703125, 19.598318099976}, {816.51824951172, 856.54290771484, 12.7890625}, {1207.6088867188, 2125.2395019531, 6.734375}, {2323.6633300781, 1283.0540771484, 97.438095092773}, {-1931.8199462891, 656.82000732422, 46.5625}, {2615.3359375, 1816.1739501953, 10.8203125}, {1764.2044677734, 2085.2583007813, 20.972038269043}, {-1381.1610107422, 493.40637207031, 27.694522857666}, {2383.6462402344, 2757.1452636719, 13.105983734131}, {1587.9537353516, 752.60015869141, 10.8203125}, {2820.8581542969, 2271.759765625, 14.661463737488}, {2314.1103515625, -4.8270263671875, 32.53125}, {1272.0865478516, 294.79476928711, 20.656307220459}, {187.23028564453, -90.492126464844, 8.8986940383911}, {-1123.1042480469, -924.32379150391, 129.21875}, {-2337.7961425781, -1617.6987304688, 483.71405029297}, {-2228.8112792969, -1744.6583251953, 480.88488769531}, {-2328.6296386719, 1537.9274902344, 17.328125}, {-1633.8870849609, -2237.8508300781, 31.4765625}, {2494.7124023438, -1689.0024414063, 21.675098419189}, {2244.6433105469, -1324.0946044922, 41.259601593018}, {894.87707519531, -1453.7999267578, 21.178594589233}, {1623.6677246094, -1041.9099121094, 27.201309204102}, {387.02029418945, -2029.3041992188, 22.108934402466}, {-65.270530700684, -1587.7954101563, 2.6171875}, {-656.64978027344, -2184.2194824219, 16.19390296936}, {-429.22280883789, 1405.0031738281, 17.471927642822}, {-2413.8935546875, 802.74127197266, 35.1796875}, {-1357.7237548828, -26.7275390625, 14.1484375}, } function pickupsByManawydan() for i=1, #pistola do createPickup(unpack(pistola[i]), 2, 22, 80000, 17) end end addEventHandler("onResourceStart", resourceRoot, pickupsByManawydan) O evento "onResourceStart" só será chamado quando este recurso for iniciado, ao contrário de "onClientResourceStart" que é chamado quando o jogador faz o download do client (e quando um recurso é iniciado).
-
thePlayer isn't defined. "onZombieWasted" must be a custom event because it doesn't exist.
-
local pistola = { {214.42886352539, 1866.5386962891, 13.140625}, {234.71018981934, 1935.3835449219, 33.8984375}, {311.80181884766, 1809.5435791016, 17.640625}, {280.9345703125, 1954.8565673828, 17.640625}, {246.69946289063, 1385.6153564453, 23.37028503418}, {-176.94442749023, 1149.9345703125, 19.598318099976}, {816.51824951172, 856.54290771484, 12.7890625}, {1207.6088867188, 2125.2395019531, 6.734375}, {2323.6633300781, 1283.0540771484, 97.438095092773}, {-1931.8199462891, 656.82000732422, 46.5625}, {2615.3359375, 1816.1739501953, 10.8203125}, {1764.2044677734, 2085.2583007813, 20.972038269043}, {-1381.1610107422, 493.40637207031, 27.694522857666}, {2383.6462402344, 2757.1452636719, 13.105983734131}, {1587.9537353516, 752.60015869141, 10.8203125}, {2820.8581542969, 2271.759765625, 14.661463737488}, {2314.1103515625, -4.8270263671875, 32.53125}, {1272.0865478516, 294.79476928711, 20.656307220459}, {187.23028564453, -90.492126464844, 8.8986940383911}, {-1123.1042480469, -924.32379150391, 129.21875}, {-2337.7961425781, -1617.6987304688, 483.71405029297}, {-2228.8112792969, -1744.6583251953, 480.88488769531}, {-2328.6296386719, 1537.9274902344, 17.328125}, {-1633.8870849609, -2237.8508300781, 31.4765625}, {2494.7124023438, -1689.0024414063, 21.675098419189}, {2244.6433105469, -1324.0946044922, 41.259601593018}, {894.87707519531, -1453.7999267578, 21.178594589233}, {1623.6677246094, -1041.9099121094, 27.201309204102}, {387.02029418945, -2029.3041992188, 22.108934402466}, {-65.270530700684, -1587.7954101563, 2.6171875}, {-656.64978027344, -2184.2194824219, 16.19390296936}, {-429.22280883789, 1405.0031738281, 17.471927642822}, {-2413.8935546875, 802.74127197266, 35.1796875}, {-1357.7237548828, -26.7275390625, 14.1484375}, } do for i=1, #pistola do createPickup(unpack(pistola[i]), theType, amount/weapon/model) end end Tire do se você usar o loop em uma função.
-
If the player are not in a vehicle, getPedOccupiedVehicle will return false. addEvent("GetData",true) addEventHandler("GetData",getRootElement(), function ( Player ) local element = getPlayerFromName(Player) local Nick = getPlayerName(element) local Account = getPlayerAccount(element) if (Account) then local AccountName = getAccountName(Account) else local AccountName = "Not logged in" end local IP = getPlayerIP(element) local Serial = getPlayerSerial(element) local Health = getElementHealth(element) local Armor = getPedArmor(element) local Skin = getElementModel(element) local team = getPlayerTeam(element) if (team) then local teamName = getTeamName(team) else local teamName = "N/A" end local Money = getPlayerMoney(element) local x,y,z = getElementPosition(element) local Area = getZoneName ( x,y,z ) local Dimenison = getElementDimension(element) local Interior = getElementInterior(element) local vehicle = getPedOccupiedVehicle(element) if (vehicle) then local VehicleID = getElementModel(vehicle) local VehicleName = getVehicleName(vehicle) local VehicleHealth = getElementHealth(vehicle) else local VehicleID = "N/A" local VehicleName = "N/A" local VehicleHealth = "N/A" end if ( element and Nick and AccountName and IP and Serial and Health and Armor and Skin and teamName and Money and x and y and z and Area and Dimenison and Interior ) then triggerClientEvent(source,"SetTextSelectedPlayerInfo",source,Nick,AccountName,IP,Serial,Health,Armor,Skin,teamName,Money,x,y,z,Area,Dimenison,Interior,VehicleID,VehicleName,VehicleHealth) end end ) Try it.
-
addEvent("GetData",true) addEventHandler("GetData",getRootElement(), function ( Player ) local element = getPlayerFromName(Player) local Nick = getPlayerName(element) local Account = getPlayerAccount(element) local AccountName = getAccountName(Account) or "N/A" local IP = getPlayerIP(element) local Serial = getPlayerSerial(element) local Health = getElementHealth(element) local Armor = getPedArmor(element) local Skin = getElementModel(element) local team = getPlayerTeam(element) local teamName = getTeamName(team) or "N/A" local Money = getPlayerMoney(element) local x,y,z = getElementPosition(element) local Area = getZoneName ( x,y,z ) local Dimenison = getElementDimension(element) local Interior = getElementInterior(element) local VehicleID = getElementModel(getPedOccupiedVehicle(element)) or "N/A" local VehicleName = getVehicleName(getPedOccupiedVehicle(element)) or "N/A" local VehicleHealth = getElementHealth(getPedOccupiedVehicle(element)) or "N/A" if ( element and Nick and AccountName and IP and Serial and Health and Armor and Skin and teamName and Money and x and y and z and Area and Dimenison and Interior ) then triggerClientEvent(source,"SetTextSelectedPlayerInfo",source,Nick,AccountName,IP,Serial,Health,Armor,Skin,teamName,Money,x,y,z,Area,Dimenison,Interior,VehicleID,VehicleName,VehicleHealth) end end )
-
Try this: addEvent("GetData",true) addEventHandler("GetData",getRootElement(), function ( Player ) local element = getPlayerFromName(Player) local Nick = getPlayerName(element) local Account = getPlayerAccount(element) if Account then local AccountName = getAccountName(Account) or "N/A" local IP = getPlayerIP(element) local Serial = getPlayerSerial(element) local Health = getElementHealth(element) local Armor = getPedArmor(element) local Skin = getElementModel(element) local team = getPlayerTeam(element) if team then local teamName = getTeamName(team) or "N/A" local Money = getPlayerMoney(element) local x,y,z = getElementPosition(element) local Area = getZoneName ( x,y,z ) local Dimenison = getElementDimension(element) local Interior = getElementInterior(element) if isPedInVehicle(element) then local VehicleID = getElementModel(getPedOccupiedVehicle(element)) local VehicleName = getVehicleName(getPedOccupiedVehicle(element)) local VehicleHealth = getElementHealth(getPedOccupiedVehicle(element)) end if ( element and Nick and AccountName and IP and Serial and Health and Armor and Skin and teamName and Money and x and y and z and Area and Dimenison and Interior ) then triggerClientEvent(source,"SetTextSelectedPlayerInfo",source,Nick,AccountName,IP,Serial,Health,Armor,Skin,teamName,Money,x,y,z,Area,Dimenison,Interior,VehicleID,VehicleName,VehicleHealth) end end end end )