Jump to content

KingSCR

Members
  • Posts

    24
  • Joined

  • Last visited

About KingSCR

  • Birthday 05/01/1994

Details

  • Location
    Goiânia - GO

Recent Profile Visitors

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

KingSCR's Achievements

Civilian

Civilian (7/54)

0

Reputation

  1. Meu amigooo.. que mudança... agora cabe a mim a aprender cada argumento que você usou! Obrigado de coração ? Como funciona o hitElement e o matchingDimension na função? function entrar1(hitElement, matchingDimension) if isElement(hitElement) and matchingDimension then if getElementType(hitElement) == "player" and not isPedInVehicle(hitElement) then
  2. function entrar1 (thePlayer) if isElement(thePlayer) and getElementType(thePlayer) == "player" then local acc = getPlayerAccount(thePlayer) if acc and not isGuestAccount(acc) then local accName = getAccountName(acc) if isObjectInACLGroup ("user."..accName, aclGetGroup ( Grupo ) ) then setElementInterior(thePlayer, 10, 246.39647, 110.09633, 1003.22571) setElementDimension(thePlayer, 2) else --outputChatBox( "Você não tem permissão!", thePlayer, 200, 0, 0, false ) dxMsg(thePlayer, "Você não tem permissão para entrar aqui!", "error") end end end end addEventHandler ("onMarkerHit", entrar, entrar1)
  3. me retornou um erro 'then' expected ear linha 111: if isElement(thePlayer) and getElementType(thePlayer) == "player" then
  4. @MainSCR" Porque usou o parâmetro thePlayer em todos argumentos das funções e não usou no argumento do isPedInVehicle?" Resposta: Estou aprendendo cara kk -' Vou tentar com getElementType(thePlayer) == "player"..
  5. Olá amigos da comunidade, estou aprendendo um pouco de programação e estou com uma duvida no meu teleporte. Estou tentando usar o "isPedInVehicle" como faço isso? Meu código está assim: local entrar = createMarker(2033.91504, -1402.85449, 16, "cylinder", 2, 255, 0, 0, 50) function entrar1 (thePlayer) local acc = getPlayerAccount(thePlayer) if acc and not isGuestAccount(acc) then local accName = getAccountName (acc) if isObjectInACLGroup ("user."..accName, aclGetGroup ( Grupo ) ) then setElementInterior(thePlayer, 10, 246.39647, 110.09633, 1003.22571) setElementDimension(thePlayer, 2) else --outputChatBox( "Você não tem permissão!", thePlayer, 200, 0, 0, false ) dxMsg(thePlayer, "Você não tem permissão para entrar aqui!", "error") end end end addEventHandler ("onMarkerHit", entrar, entrar1) Estou tentando bloquear a teleporte com o veiculo usando um if com o "isPedInVehicle" function entrar1 (thePlayer) if not isPedInVehicle ( thePlayer ) then local acc = getPlayerAccount(thePlayer) if acc and not isGuestAccount(acc) then local accName = getAccountName (acc) if isObjectInACLGroup ("user."..accName, aclGetGroup ( Grupo ) ) then setElementInterior(thePlayer, 10, 246.39647, 110.09633, 1003.22571) setElementDimension(thePlayer, 2) else --outputChatBox( "Você não tem permissão!", thePlayer, 200, 0, 0, false ) dxMsg(thePlayer, "Você não tem permissão para entrar aqui!", "error") end end end end addEventHandler ("onMarkerHit", entrar, entrar1) Assim penso eu que iria funcionar, mais nãaoo. O que estou fazendo de errado? ?
  6. Resolved local Vida = math.floor( getElementHealth ( localPlayer ) or 0 )
  7. Hi, I'm in need of help. I'm trying to show the player's life on the screen, however getElementhealth returns me a number like this "96.657466574" Can I convert it to integer? type: Life: 96 Sorry for my english, I'm using the translator. local Vida = getElementHealth ( localPlayer ) or 0 dxDrawText("Vida: "..Vida, x*932, y*62, x*1072, y*87, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
  8. Eu fiz a seguinte modificação e funcionou! function Dar_VIP_AirNewSCR ( source, cmd, player, VIP, Dinheiro ) if player and VIP and tonumber(Dinheiro) and (isObjectInACLGroup("user." ..getAccountName(getPlayerAccount(source)), aclGetGroup("Console"))) then local Jogador = getPlayerFromPartialName ( player ) if Jogador then if not isGuestAccount ( getPlayerAccount ( Jogador ) ) then local Conta = getAccountName ( getPlayerAccount ( Jogador ) ) if VIP == "Alpha" then if isObjectInACLGroup ("user."..Conta, aclGetGroup ( "Alpha" ) ) then return outputChatBox ( "* Erro: Esse Jogador já é VIP Alpha", source, 255, 255, 255, true ) end elseif VIP == "Epsylon" then if isObjectInACLGroup ("user."..Conta, aclGetGroup ( "Epsylon" ) ) then return outputChatBox ( "* Erro: Esse Jogador já é VIP Epsylon", source, 255, 255, 255, true ) end Está tudo certo? Vou concertar tudo logo mais. Obrigado pela dica, estamos juntos.
  9. Seguir todo seu curso! aprendi usar Arrays e o loop for. Obrigado
  10. Thank you, stayed like this. Correct? function onWasted(totalAmmo, killer, killerWeapon, bodypart, stealth) if not( isGuestAccount (getPlayerAccount(source)) ) then fadeCamera (source, false) setTimer (spawnPlayer, 1000, 1, source, 2036.1735839844, -1413.0563964844, 16.9921875, 0, getPedSkin (source), 0, 0, getPlayerTeam(source)) setTimer (setCameraTarget, 1250, 1, source, source) setTimer (fadeCamera, 2000, 1, source, true) takeAllWeapons (player) end end addEventHandler ("onPlayerWasted", getRootElement(), onWasted)
  11. Thanks, I'll try to add it to my save system. function onWasted(totalAmmo, killer, killerWeapon, bodypart, stealth) if not( isGuestAccount (getPlayerAccount(source)) ) then local theWeapon = getPedWeapon (source) local weaponAmmo = getPedTotalAmmo (source) fadeCamera (source, false) setTimer (spawnPlayer, 1000, 1, source, 2036.1735839844, -1413.0563964844, 16.9921875, 0, getPedSkin (source), 0, 0, getPlayerTeam(source)) setTimer (setCameraTarget, 1250, 1, source, source) setTimer (fadeCamera, 2000, 1, source, true) setTimer (giveWeapon, 2000, 1, source, theWeapon, weaponAmmo, true) takeAllWeapons (player) end end addEventHandler ("onPlayerWasted", getRootElement(), onWasted) How does it work?
  12. Hello my friends, I need to edit my Gamemode, as I do for when a player dies he loses all guns? Can someone help me? Sorry, I'm using the translator. : D
  13. Hello my friends, I need to edit my Gamemode so when a player dies he loses all guns. Can someone help me? Sorry, I'm using the translator. : D
  14. Olá meus amigos, estou precisando editar meu Gamemode para quando um player morrer ele perca todas as armas. Alguém pode me ajudar?
×
×
  • Create New...