InterEcrypt Posted August 5, 2018 Posted August 5, 2018 How do I get the alert gg to appear only once for the person? Ex: gg.alert ('hackii') I want the person to see this message for the first time and not appear for it ever again Thanks
Administrators Enyby Posted August 5, 2018 Administrators Posted August 5, 2018 Use config file on disk near your script. If in config present some flag - do not show alert. Example of config usage you can see in compiler.lua script.
Lenn1 Posted August 6, 2018 Posted August 6, 2018 I'm not a script master, just learned a little Lua and I read about the game guardian api at https://gameguardian.net/help/ xD in my opinion, you do not need a spammer alert, it will just be a boring but functional road map. and as for your doubt, Enyby replied. you "study" part of the compiler.lua code and add what you have learned to your code. so creating the function you want ... well, as I'm out of time to think straight, I thought of adding in your code, along with the script closing function or whatever function you decide, an editor that adds a new script without the alerts. I know it sucks, but that's what I thought ... the source code would be as follows:: [...] function exit()local last = gg.getFile() info = gg.prompt({'Select your script file:'}, {last}, {'file'}) last = info[1]local out = last..".UPDATE.lua" --rename filelocal file = io.open(last, 'r'); assert(file);local data = file:read('*a'); file:close();gg.toast('The binary script is saved to the file:\n'..out) d = [==["your complete script without the alert" ]==]--all source code of your script no alerts and boring things file = io.open(out,'w')file:write(d)file:close() os.exit [...] this code is an XD joke, because it does not make sense to create a function that replicates the script, but without the warnings and alerts ... because just create it without the alerts xD Sorry for bad English
Administrators Enyby Posted August 6, 2018 Administrators Posted August 6, 2018 Examples of Lua scripts (#1lj25n68)
Lenn1 Posted August 6, 2018 Posted August 6, 2018 5 hours ago, Enyby said: Examples of Lua scripts (#1lj25n68) Nice!...
Question
InterEcrypt
How do I get the alert gg to appear only once for the person?
5 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.