Jump to content

Algunos Errores...


Atouk

Recommended Posts

El primer error es este:

WARNING: Bad argument @ 'getDistanceBetweenPoints3D

Script:

function createZomieForPlayer(x, y, z) 
  x, y, z = getElementPosition(source) 
  counter = 0 
  if getElementData(source, "lastzombiespawnposition") then 
    local xL, yL, zL = getElementData(source, "lastzombiespawnposition")[3] or getElementData(source, "lastzombiespawnposition")[1] or false, getElementData(source, "lastzombiespawnposition")[2] or false, false 
    if xL and getDistanceBetweenPoints3D(x, y, z, xL, yL, zL) < 50 then 
      return 
    end 
  end 

Segundo Error:

WARNING: Bad argument @ 'triggerEvent' [Expected string at argument 1, got player]

Script:

function createZomieForPlayer(x, y, z) 
  x, y, z = getElementPosition(source) 
  counter = 0 
  if getElementData(source, "lastzombiespawnposition") then 
    local xL, yL, zL = getElementData(source, "lastzombiespawnposition")[3] or getElementData(source, "lastzombiespawnposition")[1] or false, getElementData(source, "lastzombiespawnposition")[2] or false, false 
    if xL and getDistanceBetweenPoints3D(x, y, z, xL, yL, zL) < 50 then 
      return 
    end 
  end 

Si en esta parte se nesesita mas parte del script digame...

Tercer Error:

WARNING: Bad argument @ 'destroyElement' [Expected element at argument 1, got nil]

Script:

function weaponSwitchBack(previousWeaponID, currentWeaponID) 
  local weapon1 = getElementData(source, "currentweapon_1") 
  if not weapon1 then 
    return 
  end 
  local ammoData1, weapID1 = getWeaponAmmoType(weapon1) 
  local x, y, z = getElementPosition(source) 
  local rx, ry, rz = getElementRotation(source) 
  if previousWeaponID == weapID1 then 
    if elementWeaponBack[source] then 
      detachElementFromBone(elementWeaponBack[source]) 
      destroyElement(elementWeaponBack[source]) 
      elementWeaponBack[source] = false 
    end 
    elementWeaponBack[source] = createObject(getWeaponObjectID(weapID1), x, y, z) 
    setObjectScale(elementWeaponBack[source], 0.875) 
    if elementBackpack[source] then 
      attachElementToBone(elementWeaponBack[source], source, 3, 0.19, -0.31, -0.1, 0, 270, -90) 
    else 
      attachElementToBone(elementWeaponBack[source], source, 3, 0.19, -0.11, -0.1, 0, 270, 10) 
    end 
  elseif currentWeaponID == weapID1 then 
    detachElementFromBone(elementWeaponBack[source]) 
    destroyElement(elementWeaponBack[source]) 
    elementWeaponBack[source] = false 
  end 
end 

Bueno eso fue todo, Gracias!

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...