huyjvguyen Posted July 31, 2015 Share Posted July 31, 2015 i want when player login they will request and allow all domain i set. ? how. i was try this code: addEventHandler("onClientRender", root, function() requestBrowserDomains({mtasa.com},{facebook.com},{fbcdn.net}) end ) but when i connect facebook it show white page Link to comment
GTX Posted July 31, 2015 Share Posted July 31, 2015 Do not add it inside onClientRender. requestBrowserDomains({"mtasa.com", "facebook.com", "fbcdn.net"}) Link to comment
huyjvguyen Posted August 1, 2015 Author Share Posted August 1, 2015 (edited) Do not add it inside onClientRender. requestBrowserDomains({"mtasa.com", "facebook.com", "fbcdn.net"}) you mean: function request() requestBrowserDomains({"mtasa.com", "facebook.com", "fbcdn.net"}) end addEventHandler("onPlayerLogin", getPlayerLocal(), request) of just requestBrowserDomains({"mtasa.com", "facebook.com", "fbcdn.net"}) Edited August 1, 2015 by Guest Link to comment
GTX Posted August 1, 2015 Share Posted August 1, 2015 Be aware, onPlayerLogin is server side event, add requestBrowserDomains function at the top of your client side script. Link to comment
JR10 Posted August 1, 2015 Share Posted August 1, 2015 Server: addEventHandler('onPlayerLogin', root, function() triggerClientEvent(source, 'reqBrowserDom', root) end) Client: addEvent('reqBrowserDom', true) addEventHandler('reqBrowserDom', root, function() requestBrowserDomains({"mtasa.com", "facebook.com", "fbcdn.net"}) end) 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