Jump to content

Gate problem.


ramzi

Recommended Posts

hey guys i have this gate code over here,i wanted it to open for my acc name.

error msg:

[2015-01-22 19:03:47] WARNING: desert\gate2.lua:12: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean]

[2015-01-22 19:03:49] WARNING: desert\gate2.lua:5: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got nil]

Lua code:

gate1 = createObject (980, -13.60, 2067.30,19, 0,0,90 ) 
    gatecol =  createColCircle (-13.60,   2067.30, -- s8) -->
                     
function OpenGates (thePlayer) 
if getAccountName(getPlayerAccount(player)) == "shooter" then 
    moveObject (gate1,2000,-13.60,2067.30, 24.799 ) 
    end 
    end 
    addEventHandler( "onColShapeHit", gatecol, OpenGates ) 
              
function CloseGates (thePlayer) 
if getAccountName(getPlayerAccount(player)) == "shooter" then 
    moveObject (gate1,2000,-13.60, 2067.30,19 ) 
    end 
    end 
    addEventHandler( "onColShapeLeave", gatecol, CloseGates ) 

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