Jump to content

Whats wrong?


Recommended Posts

hey , when i add

if ( getTeamName(getPlayerTeam(player)) == "Blahblah")then 

whenever i add it here:

setTimer(function() 
            if ( getTeamName(getPlayerTeam(player)) == "Blahblah")then 
                setElementAlpha(marker, 70); 
                outputChatBox("#00ff00[system]: #ff0000Stay in the marker, do not leave the marker or the progress wont continue!", player, 255, 255, 255, true); 
                isMarerHidden = false; 
            end, 10000, 1); 
        end, 5000, 1); 
    end 
end); 

it gets an error in script editor, the error i get is this 4 errors:

unexpected symbol near ','

'' expected near 'end'

'' expected near 'end'

'' expected near 'end'

any one can help? thanks.

Link to comment

if ( getTeamName(getPlayerTeam(player)) == "Blahblah")then 
setTimer(function() 
setElementAlpha(marker, 70); 
outputChatBox("#00ff00[system]: #ff0000Stay in the marker, do not leave the marker or the progress wont continue!",player, 255, 255, 255, true); 
isMarerHidden = false; 
setTimer(setElementAlpha,1000,1,marker,255); 
end, 5000, 1,player); 
end 
Link to comment

still not solved and is it possible if onmarkerhit can work on this code?

local spots = { 
    { 2487.6398925781, -1666.7453613281, 13.34375 }, 
    { 2487.6398925781, -1666.7453613281, 13.34375 } 
} 
  
for k,v in ipairs( spots ) do 
    createMarker ( v[1],v[2],v[3], kind, size, r, g, b, a ) 
end 

Edited by Guest
Link to comment

try this

marker = createMarker (2487.6398925781, -1666.7453613281, 13.34375,'cylinder',2,255,255,0,255) 
-- 
addEventHandler( "onMarkerHit",marker,function (player)  
if (getTeamName(getPlayerTeam(player)) == "Blahblah") then 
setElementAlpha(marker, 70); 
setTimer(function() 
outputChatBox("#00ff00[system]: #ff0000Stay in the marker, do not leave the marker or the progress wont continue!",player, 255, 255, 255, true); 
isMarerHidden = false; 
setElementAlpha(marker,255); 
end, 5000, 1,player); 
end 
end); 
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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