Miika Posted October 16, 2014 Share Posted October 16, 2014 (edited) Server does not outpt chatbox and Nikotuz can't open garage. And debugscript does not say anything. What is the problem? [server] function garage1() if (getAccountName == "Nikotuz") then if (not isGarageOpen(20)) then setGarageOpen(20, true) else if (isGarageOpen(20)) then setGarageOpen(20, false) else outputChatBox("You don't have permission to use this garage.", source, 255, 0, 255) end end end end addCommandHandler("talli1", garage1) Edited October 17, 2014 by Guest Link to comment
n3wage Posted October 16, 2014 Share Posted October 16, 2014 function garage1(thePlayer) if (getAccountName(getPlayerAccount(thePlayer)) == "Nikotuz") then if (not isGarageOpen(20)) then setGarageOpen(20, true) else if (isGarageOpen(20)) then setGarageOpen(20, false) else outputChatBox("You don't have permission to use this garage.", thePlayer, 255, 0, 255) end end end end addCommandHandler("talli1", garage1) Link to comment
Miika Posted October 16, 2014 Author Share Posted October 16, 2014 function garage1(thePlayer) if (getAccountName(getPlayerAccount(thePlayer)) == "Nikotuz") then if (not isGarageOpen(20)) then setGarageOpen(20, true) else if (isGarageOpen(20)) then setGarageOpen(20, false) else outputChatBox("You don't have permission to use this garage.", thePlayer, 255, 0, 255) end end end end addCommandHandler("talli1", garage1) Not working, same problem Link to comment
TAPL Posted October 16, 2014 Share Posted October 16, 2014 function garage1(player) if getAccountName(getPlayerAccount(player)) == "Nikotuz" then if isGarageOpen(20) then setGarageOpen(20, false) outputChatBox("Garage closed.", player, 255, 255, 255) else setGarageOpen(20, true) outputChatBox("Garage opened.", player, 255, 255, 255) end else outputChatBox("You don't have permission to use this garage.", player, 255, 0, 255) end end addCommandHandler("talli1", garage1) Link to comment
Miika Posted October 16, 2014 Author Share Posted October 16, 2014 function garage1(player) if getAccountName(getPlayerAccount(player)) == "Nikotuz" then if isGarageOpen(20) then setGarageOpen(20, false) outputChatBox("Garage closed.", player, 255, 255, 255) else setGarageOpen(20, true) outputChatBox("Garage opened.", player, 255, 255, 255) end else outputChatBox("You don't have permission to use this garage.", player, 255, 0, 255) end end addCommandHandler("talli1", garage1) It works perfectly! Thank you tapl! 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