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 Failure is simply an opportunity to begin again more intelligently - Henry Ford
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. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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 ) -------------------------------------- - 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
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 . Failure is simply an opportunity to begin again more intelligently - Henry Ford
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 , - 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
SkatCh Posted June 24, 2014 Author Posted June 24, 2014 didn't work . Failure is simply an opportunity to begin again more intelligently - Henry Ford
Max+ Posted June 24, 2014 Posted June 24, 2014 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
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) Failure is simply an opportunity to begin again more intelligently - Henry Ford
Et-win Posted June 25, 2014 Posted June 25, 2014 He wants to hide ALL GUI's in whole MTA, I guess? ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
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 Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
#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 !! ? To Contact Me at Skype : [email protected]
SkatCh Posted June 25, 2014 Author Posted June 25, 2014 how can i fix it please . Failure is simply an opportunity to begin again more intelligently - Henry Ford
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 Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
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 . Failure is simply an opportunity to begin again more intelligently - Henry Ford
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 . - 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
SkatCh Posted June 25, 2014 Author Posted June 25, 2014 :fp: didn't work . Failure is simply an opportunity to begin again more intelligently - Henry Ford
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. Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
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