Jump to content

LucasBaker

Members
  • Posts

    134
  • Joined

  • Last visited

Details

  • Gang
    Brazil

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

LucasBaker's Achievements

Poot-butt

Poot-butt (14/54)

0

Reputation

  1. setElementVisibleTo ( lixo1, playerTeam, true ) setElementVisibleTo ( blip, playerTeam, true ) setElementVisibleTo ( lixo1, root, false ) setElementVisibleTo ( blip, root, false ) like this ?
  2. Hello , I would like the marker to appear only for the team but who is this giving an error that I am unable to resolve the following code : lixo1 = createMarker(1516.41675, -1847.13733, 13.54688, 'cylinder', 2, 255, 0, 0, 150) function aLixeiro (source) outputChatBox("Você pegou o lixo na casa!", source, 255, 0, 0) givePlayerMoney ( source, 50 ) setElementPosition( lixo1, 0, 0, 0 ) setTimer(function() setElementPosition( lixo1, 1516.41675, -1847.13733, 13.54688 ) end,2000,1) end addEventHandler( "onMarkerHit", lixo1, aLixeiro ) function onStart(source) if getTeamName(getPlayerTeam(source)) == "Lixeiros" then local playerTeam = getPlayerTeam ( source ) local blip = createBlipAttachedTo( lixo1, 51, 2, 255, 0, 0, 255, 255, 255 ) setElementVisibleTo ( lixo1, playerTeam, true ) setElementVisibleTo ( blip, playerTeam, true ) setElementVisibleTo ( lixo1, root, false ) setElementVisibleTo ( blip, root, false ) end end addEventHandler( "onMarkerHit", getRootElement(), onStart )
  3. Tente isto: addCommandHandler( "darveiculo", function (playerSource, cmdName, ID) local px, py = getElementPosition(playerSource) local vehName = getVehicleNameFromModel(ID) if ID and type(vehName) ~= "string" then return outputChatBox("O ID do veículo é inválido", playerSource, 225, 0, 0) elseif not ID then return outputChatBox("Sintaxe: /darveiculo ID", playerSource, 225, 0, 0) end for _,Pl in ipairs(getElementsByType("player")) do local x, y, z = getElementPosition(Pl) local Distance = getDistanceBetweenPoints2D(px, py, x, y) if (Distance <= 30) then outputChatBox("Você ganhou o veículo "..vehName, Pl, 0, 255, 0) createVehicle( ID, x, y, z + 6 ) end end end ) o veículo cai em cima dele eahuyeagyusad como q faz pra ele ja entrar no carro ?
  4. marker appears again after the function is not repeated
  5. Not to create another topic How does the marker back to dps than 2 seconds ? I thought about using SetTimer but I do not do the slightest idea of how to use could help me ? lixo1 = createMarker(1516.41675, -1847.13733, 13.54688, 'cylinder', 2.0, 255, 0, 0, 150) function aLixeiro (source) if getPlayerTeam (source, Lixeiros) then outputChatBox("Você pegou o lixo na casa!", source, 255, 0, 0) givePlayerMoney ( source, 50 ) destroyElement(lixo1) else outputChatBox("Você não é lixeiro!", source, 255, 0, 0) end end addEventHandler( "onMarkerHit", lixo1, aLixeiro )
  6. column appears but not the id
  7. exports.scoreboard:addScoreboardColumn("id",getRootElement(),1) function getIDFromPlayer(player) if player then local theid players = getElementsByType("player") for id,p in ipairs(players) do if player == p then theid = i end end return theid else return false end end function getPlayerFromID(theID) if theID then theID = tonumber(theID) local theplayer players = getElementsByType("player") for id,p in ipairs(players) do if theID == id then theplayer = p end end return theplayer else return false end end why not appear on the scoreboard id?
  8. function kart(M, _, T) local x1, y1 = getElementPosition(M) for _,Pl in ipairs(getElementsByType("player")) do local x2, y2 = getElementPosition(Pl) local Distance = getDistanceBetweenPoints2D(x1, y1, x2, y2) if (Distance <= 30) then outputChatBox("#00FFFF[EVENTO] Você ganhou um Kart [571] ", Pl, 0, 255, 0, true) createVehicle ( 432, Pl + 10 ) end end end addCommandHandler("darkart", kart) o que ta errado? ah e uma dúvida tem como eu colocar para na hora de digitar /darveiculo [id] ? ( só para quem ta perto )
  9. eu to tentando criar um script de tradutor.. no java a gente usava a api do google mas como ela não ta + disponivel creio eu, achei q alguem tinha aki mas vou tentar usar isso ae. eu terei q usar acesso a alguma coisa tem algum elemento q faz isso ? no caso seria a api em php ( pra lua )
  10. function freezar(M, _, T) local x1, y1 = getElementPosition(M) for _,Pl in ipairs(getElementsByType("player")) do local x2, y2 = getElementPosition(Pl) local Distance = getDistanceBetweenPoints2D(x1, y1, x2, y2) if (Distance <= 30) then if not ( isObjectInACLGroup ( "user.".. getPlayerAccount(Pl), aclGetGroup ( "Admin" ) ) ) then -- pra não congela os adm toggleAllControls ( Pl, false ) setElementFrozen ( Pl, true ) outputChatBox("#00FFFF[EVENTO] Você foi congelado", Pl, 0, 255, 0, true) end end end end addCommandHandler("congelar", freezar) What I want the function to work for All Less admins but the error value
  11. function darVida (M, T) if T == 1 then local PlayersP = getElementByType("player")) for _,Pl in ipairs(PlayersP) do local x,y,z = getElementPosition(Pl) local x2,y2,z2 = getElementPosition(source) local Distance = getDistanceBetweenPoints2D ( x,y, x2,y2 ) if (Distance <= 10) then setElementHealth(100, Pl) outputChatBox ( "Você recebeu vida", Pl ) end end end end addCommandHandler ( "darvida", darVida ) the script would be to give life to those who have a distance of 10 but nothing happens, what error?
  12. Bad argument in line 15 to add the player in acl GV M does not appear the message to him function giveGroove (playerSource, commandName, accountName) if accountName then aclGroupAddObject (aclGetGroup("GV M"), "user."..accountName) outputChatBox ("[sERVER] Player '"..accountName.."' adicionado com sucesso na Gangue Groove Street", playerSource) outputChatBox ("[sERVER] Você foi adicionado a Gangue Groove Street.", accountName) else outputChatBox ("[sERVER] Conta não especificada.", playerSource) outputChatBox ("Correct syntax: /convidargv [accountName]", playerSource) end end addCommandHandler ("convidargv", giveGroove) could someone help me?
×
×
  • Create New...