Jump to content

que esta mal en este script ?


iFoReX

Recommended Posts

que esta mal ? me dice bad argument 1 getElementType got boolean

----BKZBaseByElMota(Scripts)---- 
  
puerta = {} 
radar = {} 
radarC = {} 
marker = {} 
puerta[1] = createObject(980,-2589.69921875,1352.3994140625,8.8000001907349,0,0,224.74731445313) 
puerta[2] = createObject(980,-2811.8000488281,1490.6999511719,2.7000000476837,0,0,270) 
puerta[3] = createObject(971,-2803.7998046875,1378,3.4000000953674) 
radar[1] = createRadarArea(-2816.13550, 1390,40, -70, 0, 0, 0, 255) 
radarC[1] = createColCuboid ( -2816.13550, 1390, 1.1, 40, -70, 60 ) 
marker[1] = createMarker( -2803.85791, 1376.25159, 0, "cylinder", 3, 255,0,0,255) 
addCommandHandler("abrirbkz1",function(thePlayer) 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "bkz" ) ) then 
local abrir = moveObject(puerta[1],5000,-2589.69921875,1352.3994140625,17) 
end 
end 
) 
  
addCommandHandler("cerrarbkz1",function(thePlayer) 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "bkz" ) ) then 
local cerrar = moveObject(puerta[1],5000,-2589.69921875,1352.3994140625,8.8000001907349) 
end 
end 
) 
  
addCommandHandler("abrirbkz2",function(thePlayer) 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "bkz" ) ) then 
local abrir = moveObject(puerta[2],5000,-2811.8000488281,1490.6999511719,9) 
end 
end 
) 
  
addCommandHandler("cerrarbkz2",function(thePlayer) 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "bkz" ) ) then 
local cerrar = moveObject(puerta[2],5000,-2811.8000488281,1490.6999511719,2.7000000476837) 
end 
end 
) 
  
function enterZone(thePlayer, hitElement, matchingDimension) 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "bkz" ) ) and getElementType(hitElement) == "Player" then 
outputChatBox("bienvenido a la base BKZ "..getPlayerName(hitElement),hitElement) 
elseif not isObjectInACLGroup ("user."..accName, aclGetGroup ( "bkz" ) ) and getElementType(hitElement) == "Player" then 
killPed(hitElement) 
end 
end 
addEventHandler( "onColShapeHit", radarC[1], enterZone ) 
  
function markerHit(thePlayer, hitElement, matchingDimension) 
if source == marker[1] then 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "bkz" ) ) and getElementType(hitElement) == "Player" then 
moveObject(puerta[3],5000,-2812.19921875,1490.69921875,12) 
end 
end 
end 
addEventHandler( "onMarkerHit", root, markerHit ) 
  
function markerLeave(matchingDimension) 
if source == marker[1] then 
moveObject(puerta[3],5000,-2812.19921875,1490.69921875,6) 
end 
end 
addEventHandler( "onMarkerLeave", root, markerLeave ) 

Link to comment

ahora aparece bad argument 1 getElementType got nil

----BKZBaseByElMota(Scripts)---- 
  
puerta = {} 
radar = {} 
radarC = {} 
marker = {} 
puerta[1] = createObject(980,-2589.69921875,1352.3994140625,8.8000001907349,0,0,224.74731445313) 
puerta[2] = createObject(980,-2811.8000488281,1490.6999511719,2.7000000476837,0,0,270) 
puerta[3] = createObject(971,-2803.7998046875,1378,3.4000000953674) 
radar[1] = createRadarArea(-2816.13550, 1390,40, -70, 0, 0, 0, 255) 
radarC[1] = createColCuboid ( -2816.13550, 1390, 1.1, 40, -70, 60 ) 
marker[1] = createMarker( -2803.85791, 1376.25159, 0, "cylinder", 3, 255,0,0,255) 
addCommandHandler("abrirbkz1",function(thePlayer) 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "bkz" ) ) then 
local abrir = moveObject(puerta[1],5000,-2589.69921875,1352.3994140625,17) 
end 
end 
) 
  
addCommandHandler("cerrarbkz1",function(thePlayer) 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "bkz" ) ) then 
local cerrar = moveObject(puerta[1],5000,-2589.69921875,1352.3994140625,8.8000001907349) 
end 
end 
) 
  
addCommandHandler("abrirbkz2",function(thePlayer) 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "bkz" ) ) then 
local abrir = moveObject(puerta[2],5000,-2811.8000488281,1490.6999511719,9) 
end 
end 
) 
  
addCommandHandler("cerrarbkz2",function(thePlayer) 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "bkz" ) ) then 
local cerrar = moveObject(puerta[2],5000,-2811.8000488281,1490.6999511719,2.7000000476837) 
end 
end 
) 
  
function enterZone(thePlayer, matchingDimension) 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "bkz" ) ) and getElementType(thePlayer) == "Player" then 
outputChatBox("bienvenido a la base BKZ "..getPlayerName(thePlayer),thePlayer) 
elseif not isObjectInACLGroup ("user."..accName, aclGetGroup ( "bkz" ) ) and getElementType(thePlayer) == "Player" then 
killPed(thePlayer) 
end 
end 
addEventHandler( "onColShapeHit", radarC[1], enterZone ) 
  
function markerHit(thePlayer, matchingDimension) 
if source == marker[1] then 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "bkz" ) ) and getElementType(hitElement) == "Player" then 
moveObject(puerta[3],5000,-2812.19921875,1490.69921875,12) 
end 
end 
end 
addEventHandler( "onMarkerHit", root, markerHit ) 
  
function markerLeave(matchingDimension) 
if source == marker[1] then 
moveObject(puerta[3],5000,-2812.19921875,1490.69921875,6) 
end 
end 
addEventHandler( "onMarkerLeave", root, markerLeave ) 

Link to comment

funciona pero esto no funciona no me mata ni se escribe nada en el chat

function enterZone(thePlayer, matchingDimension) 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "bkz" ) ) and getElementType(thePlayer) == "player" then 
outputChatBox("bienvenido a la base BKZ "..getPlayerName(thePlayer),thePlayer) 
elseif not isObjectInACLGroup ("user."..accName, aclGetGroup ( "bkz" ) ) and getElementType(thePlayer) == "player" then 
killPed(thePlayer) 
end 
end 
addEventHandler( "onColShapeHit", radarC[1], enterZone ) 

Link to comment
function enterZone ( thePlayer, matchingDimension ) 
    if ( getElementType ( thePlayer ) == "player" ) then 
        local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
        if isObjectInACLGroup ( "user.".. accName, aclGetGroup ( "bkz" ) ) then 
            outputChatBox ( "bienvenido a la base BKZ ".. getPlayerName ( thePlayer ), thePlayer ) 
        else 
            killPed ( thePlayer ) 
        end 
    end 
end 
addEventHandler ( "onColShapeHit", radarC[1], enterZone ) 

Link to comment
function enterZone ( thePlayer, matchingDimension ) 
    if ( getElementType ( thePlayer ) == "player" ) then 
        local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
        if isObjectInACLGroup ( "user.".. accName, aclGetGroup ( "bkz" ) ) then 
            outputChatBox ( "bienvenido a la base BKZ ".. getPlayerName ( thePlayer ), thePlayer, 255, 255, 255, true ) 
        else 
            killPed ( thePlayer ) 
        end 
    end 
end 
addEventHandler ( "onColShapeHit", radarC[1], enterZone ) 

El 'true' al final de outputChatBox es para activar los codigos HEX.

Link to comment
  • Recently Browsing   0 members

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