SkatCh Posted June 24, 2014 Posted June 24, 2014 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
Castillo Posted June 24, 2014 Posted June 24, 2014 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.
Max+ Posted June 24, 2014 Posted June 24, 2014 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 ) --------------------------------------
SkatCh Posted June 24, 2014 Author Posted June 24, 2014 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 .
Max+ Posted June 24, 2014 Posted June 24, 2014 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 ,
SkatCh Posted June 25, 2014 Author Posted June 25, 2014 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)
Moderators IIYAMA Posted June 25, 2014 Moderators Posted June 25, 2014 Use onPlayerLogout. https://wiki.multitheftauto.com/wiki/OnPlayerLogout You don't need the isGuestAccount function with those events. onPlayerLogin = account onPlayerLogout = guestAccount
#DRAGON!FIRE Posted June 25, 2014 Posted June 25, 2014 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 !! ?
Moderators IIYAMA Posted June 25, 2014 Moderators Posted June 25, 2014 Use onPlayerLogout.https://wiki.multitheftauto.com/wiki/OnPlayerLogout You don't need the isGuestAccount function with those events. onPlayerLogin = account onPlayerLogout = guestAccount
SkatCh Posted June 25, 2014 Author Posted June 25, 2014 didn't work just i want when it's a guestAccount account you can't open Gui's that's all .
Max+ Posted June 25, 2014 Posted June 25, 2014 just Change my post form onPlayerLogin to onPlayerJoin if is GusetAccount , then triggertheHide event else triggerShow event , it's Very Easy .
Moderators IIYAMA Posted June 26, 2014 Moderators Posted June 26, 2014 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.
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