Jump to content

about gui


SkatCh

Recommended Posts

Posted

hi guys please i need some help how can i make players can't see guieds if they didn't login .

i'm sorry about my english

Failure is simply an opportunity to begin again more intelligently - Henry Ford

Posted

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.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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 ) 

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

- New , Kill System

- New, GameMode Intro

- Leve / Exp System

- New nametag showing style

- New , Hud For Players

- Skin Selection from SA-MP

- Money System / Buy Weapons

- Drop Weapons

- New, Flood System

- New , Group Assign

- Gun license For Weapons

- Random Rule System For Money

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

Failure is simply an opportunity to begin again more intelligently - Henry Ford

Posted
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 ,

- New , Kill System

- New, GameMode Intro

- Leve / Exp System

- New nametag showing style

- New , Hud For Players

- Skin Selection from SA-MP

- Money System / Buy Weapons

- Drop Weapons

- New, Flood System

- New , Group Assign

- Gun license For Weapons

- Random Rule System For Money

Posted

impossible , show me , your code,

- New , Kill System

- New, GameMode Intro

- Leve / Exp System

- New nametag showing style

- New , Hud For Players

- Skin Selection from SA-MP

- Money System / Buy Weapons

- Drop Weapons

- New, Flood System

- New , Group Assign

- Gun license For Weapons

- Random Rule System For Money

Posted

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) 

Failure is simply an opportunity to begin again more intelligently - Henry Ford

  • Moderators
Posted

Use onPlayerLogout.

https://wiki.multitheftauto.com/wiki/OnPlayerLogout

You don't need the isGuestAccount function with those events.

onPlayerLogin = account

onPlayerLogout = guestAccount

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted
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 !! ?

To Contact Me at Skype : [email protected]

  • Moderators
Posted
Use onPlayerLogout.

https://wiki.multitheftauto.com/wiki/OnPlayerLogout

You don't need the isGuestAccount function with those events.

onPlayerLogin = account

onPlayerLogout = guestAccount

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted

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

Failure is simply an opportunity to begin again more intelligently - Henry Ford

Posted

just Change my post form onPlayerLogin to onPlayerJoin if is GusetAccount , then triggertheHide event else triggerShow event , it's Very Easy .

- New , Kill System

- New, GameMode Intro

- Leve / Exp System

- New nametag showing style

- New , Hud For Players

- Skin Selection from SA-MP

- Money System / Buy Weapons

- Drop Weapons

- New, Flood System

- New , Group Assign

- Gun license For Weapons

- Random Rule System For Money

  • Moderators
Posted
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.

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

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