Jump to content

que esta mal en este script ?


iFoReX

Recommended Posts

Posted

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 ) 

elMota/elFoReX De Vuelta En MTA *---------*

Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3

https://www.youtube.com/user/KillersGPs

430x73_FFFFFF_FF9900_000000_000000.png
Posted

Aun no entendes como usar los argumentos ...

function markerHit(thePlayer, hitElement, matchingDimension) 

Para que pusiste thePlayer y hitElement?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Mira, no quiero que te enojes, pero solo necesitas un ARGUMENTO, borra hitElement y remplazalo en el script con thePlayer.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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 ) 

elMota/elFoReX De Vuelta En MTA *---------*

Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3

https://www.youtube.com/user/KillersGPs

430x73_FFFFFF_FF9900_000000_000000.png
Posted
getElementType(hitElement) == "Player" then 

1: No cambiaste hitElement.

2: Es "player", no "Player".

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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 ) 

elMota/elFoReX De Vuelta En MTA *---------*

Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3

https://www.youtube.com/user/KillersGPs

430x73_FFFFFF_FF9900_000000_000000.png
Posted
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 ) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
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.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

De nada.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

  • Recently Browsing   0 members

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