novo Posted December 19, 2011 Share Posted December 19, 2011 Hi all. I don't know why this function, isn't working: function bind(source) local accountname = getAccountName(account) if (isObjectInACLGroup("user." ..accountname, aclGetGroup("Admin"))) or (isObjectInACLGroup("user." ..accountname, aclGetGroup("VIP"))) then if (guiGetVisible(iphone) == true) then if not animacion then cerrar(localPlayer) end else if not animacion then guiSetVisible(iphone, true) setElementData (localPlayer,"panel","main") addEventHandler ("onClientRender", root, sacarSXPhone) end end end end bindKey("I","down", bind) addCommandHandler ("iphone", bind) addEventHandler ("onPlayerLogin", root, bind) Plz help <3 Link to comment
myonlake Posted December 19, 2011 Share Posted December 19, 2011 (edited) Messy. Are you sure that's the full code? If not: - There is no function for 'cerrar' or 'animacion'. - You haven't defined animacion Problems: - You are using the script in client-side, this is a server-side stuff function bind() local accountname = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user." .. accountname, aclGetGroup("Admin")) or isObjectInACLGroup("user." .. accountname, aclGetGroup("VIP")) then if guiGetVisible(iphone) == true then if not animacion then cerrar(localPlayer) end else if animacion then guiSetVisible(iphone, true) setElementData(localPlayer, "panel", "main") addEventHandler("onClientRender", getRootElement(), sacarSXPhone) end end end addCommandHandler("iphone", bind) addEventHandler("onPlayerLogin", getRootElement(), bind) function bindme() for i,v in ipairs(getElementsByType("player")) do bindKey(v, "I", "down", bind) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), bindme) Edited December 19, 2011 by Guest Link to comment
novo Posted December 19, 2011 Author Share Posted December 19, 2011 (edited) Thank you :] <3 EDIT: At bind function, was missing one "end". Edited December 19, 2011 by Guest Link to comment
myonlake Posted December 19, 2011 Share Posted December 19, 2011 Thank you :] No problem Link to comment
CapY Posted December 20, 2011 Share Posted December 20, 2011 @myonlake That script is server and client side. Link to comment
myonlake Posted December 20, 2011 Share Posted December 20, 2011 @CapY: Exactly. I assume he solved it by making triggers on client/server side. Link to comment
novo Posted December 20, 2011 Author Share Posted December 20, 2011 @myonlake: Ofc. I didn't post full code, anways, thank you for help and preocupation :] 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