ramzi Posted January 23, 2015 Posted January 23, 2015 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 ) DZ Army Base: https://community.multitheftauto.com/index.php?p=resources&s=details&id=11101 Flyingcars script: https://community.multitheftauto.com/index.php?p=resources&s=details&id=11116
The Don Posted January 23, 2015 Posted January 23, 2015 change if getAccountName(getPlayerAccount(player)) == "shooter" then to if getAccountName(getPlayerAccount(thePlayer)) == "shooter" then آن يكون فكر المرء مختلآ , خيرآ من آن يكون فكره محتلآ ! my nick name in the game : =x=|DoN|=x= or 7eJAzZy- ( ͡° ͜ʖ ͡°) http://community.multitheftauto.com/ind ... &id=337164 my profile
ramzi Posted January 23, 2015 Author Posted January 23, 2015 thnx it works DZ Army Base: https://community.multitheftauto.com/index.php?p=resources&s=details&id=11101 Flyingcars script: https://community.multitheftauto.com/index.php?p=resources&s=details&id=11116
The Don Posted January 23, 2015 Posted January 23, 2015 Any time m8 and your welcome آن يكون فكر المرء مختلآ , خيرآ من آن يكون فكره محتلآ ! my nick name in the game : =x=|DoN|=x= or 7eJAzZy- ( ͡° ͜ʖ ͡°) http://community.multitheftauto.com/ind ... &id=337164 my profile
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now