Jump to content

how to request domain when player login


Recommended Posts

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
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 by Guest
Link to comment

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...