Suche Script fehler
bei dem
-----------------------
ist der strich zwischen den 2 scripts
Lua
g_loc_pla = getLocalPlayer ()
g_loc_root = getRootElement ()
addEvent ( "destroyTrepassor", true )
addEventHandler ( "destroyTrepassor", g_loc_root,
function ()
posX = 15.7054
posY = 1719.3632
posZ = 50.123
posX2 = 237.7176
posY2 = 1696.5727
posZ2 = 50.1087
posX3 = 354.6243
posY3 = 2028.3897
posZ3 = 50.1217
posX4 = 188.241
posY4 = 2081.3469
posZ4 = 50.1422
local isInResArea = getElementData ( g_loc_pla, "inRestrictedArea" )
rotZ = getPlayerRotation ( g_loc_pla )
if isInResArea == "true" then
timer1 = setTimer ( createProjectile, 9000, 0, g_loc_pla, 20, posX, posY, posZ, 1.0, g_loc_pla, 0, 0, rotZ, 0.1, 0.1, 0.1 )
timer2 = setTimer ( createProjectile, 9000, 0, g_loc_pla, 20, posX2, posY2, posZ2, 1.0, g_loc_pla, 0, 0, rotZ, 0.1, 0.1, 0.1 )
timer3 = setTimer ( createProjectile, 9000, 0, g_loc_pla, 20, posX3, posY3, posZ3, 1.0, g_loc_pla, 0, 0, rotZ, 0.1, 0.1, 0.1 )
timer4 = setTimer ( createProjectile, 9000, 0, g_loc_pla, 20, posX4, posY4, posZ4, 1.0, g_loc_pla, 0, 0, rotZ, 0.1, 0.1, 0.1 )
end
end
)
addEvent ( "destroyTimers", true )
addEventHandler ( "destroyTimers", g_loc_root,
function ()
local isInResArea = getElementData ( g_loc_pla, "inRestrictedArea" )
if isInResArea == "false" then
killTimer ( timer1 )
killTimer ( timer2 )
killTimer ( timer3 )
killTimer ( timer4 )
end
end
)
----------------------------------------------------------------------------------------------------
g_base_col = createColCuboid ( 97.3376, 1800.0384, -32.0937, 250, 280, 120 )
createBlip ( 193.248, 1890.01, 17.234, 47 )
g_root = getRootElement ()
--rocketOne = createMarker ( -2931.5136, 454.4492, 17.3671, "corona", 1.5, 255, 0, 0, 150 ) --test marker
--rocketTwo = createMarker ( -2931.5932, 487.1994, 17.3671, "corona", 1.5, 255, 0, 0, 150 ) --test marker
function hit ( pla, dim )
if getElementType ( pla ) == "player" then
local vehicle = getPlayerOccupiedVehicle ( pla )
if vehicle or not vehicle then
if ( getTeamName(getPlayerTeam(pla)) == "Forever" ) then
outputChatBox ( "Welcome, "..getClientName(pla).."!", pla, 0, 150, 0 )
else
setElementData ( pla, "inRestrictedArea", "true" )
triggerClientEvent ( pla, "destroyTrepassor", g_root, pla )
end
end
end
end
addEventHandler ( "onColShapeHit", g_base_col, hit )
function leave ( pla, dim )
if getElementType ( pla ) == "player" then
local vehicle = getPlayerOccupiedVehicle ( pla )
if vehicle or not vehicle then
if ( getTeamName(getPlayerTeam(pla)) == "Forever" ) then
outputChatBox ( "Good Bye!", pla, 0, 100, 0 )
else
setElementData ( pla, "inRestrictedArea", "false" )
triggerClientEvent ( pla, "destroyTimers", g_root, pla )
outputDebugString ( "*"..getClientName(pla).." has left col shape" )
end
end
end
end
addEventHandler ( "onColShapeLeave", g_base_col, leave )
Alles anzeigen
Consolen Fehler wenn man da lang fliegt
Bad argument @ 'getTeamName'
Ich schreibe es hier weil ich's in scripting base irgendwie nicht einfügen kann..
MfG