Jump to content

about gui


SkatCh

Recommended Posts

you Can do something like this ,

- onPlayerLogin  ---- Event on ServerSide 
isGuestAccount --- if they are not logged in  then  
triggerClientEvent ( source, 'hideGUI', source ) --- to call the event on Client named hidegui  
-------------- 
ClientSide 
addEvent('hideGUI', true ) 
addEventHandler('hideGUI', root, 
function (  ) 
guiSetVisible ( windowName, false ) 
showCursor ( false ) 

--------------------------------------

Link to comment
What do you mean by "guieds"? you are talking about all GUI's? if so, then you should edit each script and add it a check to see if player is logged in.

yes bro exactly i am talking about all GUI's : example players can't use F1 , F2 , F3 ... F7 when they didn't login .

Link to comment
What do you mean by "guieds"? you are talking about all GUI's? if so, then you should edit each script and add it a check to see if player is logged in.

yes bro exactly i am talking about all GUI's : example players can't use F1 , F2 , F3 ... F7 when they didn't login .

have a look what i post ,

Link to comment

client side :

addEvent('hideGUI', true ) 
addEventHandler('hideGUI', root, 
function (  ) 
guiSetVisible (  window, false ) 
showCursor ( false ) 
end) 

server side:

  
function check() 
 sourceAccount = getPlayerAccount ( source ) 
if isGuestAccount ( sourceAccount ) then 
triggerClientEvent ( source, 'hideGUI', source )  
end 
end 
addEventHandler("onPlayerLogin", root, check) 

Link to comment
client side :
addEvent('hideGUI', true ) 
addEventHandler('hideGUI', root, 
function (  ) 
guiSetVisible (  window, false ) 
showCursor ( false ) 
end) 

server side:

  
function check() 
 sourceAccount = getPlayerAccount ( source ) 
if isGuestAccount ( sourceAccount ) then 
triggerClientEvent ( source, 'hideGUI', source )  
end 
end 
addEventHandler("onPlayerLogin", root, check) 

lol ! ?

u cheek if Account Guest when player login !! ?

Link to comment
  • Moderators
didn't work just i want when it's a guestAccount account you can't open Gui's that's all .

That is not how I can help you. I am only helping people who are trying to write the code by them self.

When they do, I will correct the code and give tips/examples.

So give it another try.

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...