crismar Posted April 10, 2014 Share Posted April 10, 2014 function openSniperGate(thePlayer) if tostring(getPlayerAccount(thePlayer)) == "crismar" then moveObject (gate3, 3000, -2772.7, 233.5, 6.3) end end addCommandHandler("openpaty", openSniperGate, false) I have this code, trying to make the command restricted only to account 'crismar' but it won't work. It's relaly annoying, I tried everything, the script IS serversided, still no result Link to comment
Baseplate Posted April 10, 2014 Share Posted April 10, 2014 You're comparing an account element to a string, use this instead. function openSniperGate(thePlayer) if (getAccountName(getPlayerAccount(thePlayer)) == "crismar") then moveObject (gate3, 3000, -2772.7, 233.5, 6.3) end end addCommandHandler("openpaty", root, openSniperGate) Link to comment
crismar Posted April 10, 2014 Author Share Posted April 10, 2014 You're comparing an account element to a string, use this instead. function openSniperGate(thePlayer) if (getAccountName(getPlayerAccount(thePlayer)) == "crismar") then moveObject (gate3, 3000, -2772.7, 233.5, 6.3) end end addCommandHandler("openpaty", root, openSniperGate) worked, cheers Link to comment
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