Anubhav Posted March 15, 2014 Share Posted March 15, 2014 (edited) I need to make a Memo Save. I have update button. For leaders/founder and it will set to editable for them only but how to update it again? I want to save it also. Edited March 17, 2014 by Guest Link to comment
Karuzo Posted March 15, 2014 Share Posted March 15, 2014 What do you mean with save it ? To update it : you could use a timer or onClientRender. Link to comment
Anubhav Posted March 15, 2014 Author Share Posted March 15, 2014 i mean it will not be empty or change it until some leader or founder does. How will i do it? Link to comment
pa3ck Posted March 15, 2014 Share Posted March 15, 2014 guiMemoSetReadOnly Are you using SQL / MySQL or account data to save things? Link to comment
Anubhav Posted March 16, 2014 Author Share Posted March 16, 2014 account data. EDIT : I want this for a group system Link to comment
Dealman Posted March 16, 2014 Share Posted March 16, 2014 Could you try to be a bit more detailed? I am greatly confused as to what you're trying to do here Link to comment
WASSIm. Posted March 16, 2014 Share Posted March 16, 2014 you can make group system and you can't make this ? Link to comment
Anubhav Posted March 16, 2014 Author Share Posted March 16, 2014 WASSIm i know how to make that things. I WANT TO SAVE A MEMO FOR GANG. Gang information. Fucking someone can help me? WASSIm u noob. You are giving negative reply. If you want to help me just tell how to save it. Link to comment
Dealman Posted March 16, 2014 Share Posted March 16, 2014 Ah, I get it now. Then if I were you, I'd probably use the File functions; fileCreate -- Create a file, for example GangInfo.txt fileOpen -- Open it fileWrite -- Write the text to it fileClose -- Close the file (This automatically saves it) fileRead -- Use this to read the file, and put the text into the memo. (Needs fileOpen) Link to comment
WASSIm. Posted March 16, 2014 Share Posted March 16, 2014 WASSIm i know how to make that things. I WANT TO SAVE A MEMO FOR GANG. Gang information. someone can help me? WASSIm u noob. You are giving negative reply. If you want to help me just tell how to save it. if you want help respect please and i will not help you and is better if anyone don't help you Link to comment
Dealman Posted March 16, 2014 Share Posted March 16, 2014 if you want help respect please and i will not help you and is better if anyone don't help you Then help him instead of mocking him. You did nothing other than make yourself look like a jerk just now. Link to comment
Spajk Posted March 16, 2014 Share Posted March 16, 2014 Dealman, if he already has a group system that uses SQL then why would he store it inside files? Link to comment
Dealman Posted March 16, 2014 Share Posted March 16, 2014 Dealman, if he already has a group system that uses SQL then why would he store it inside files? I believe it would be more efficient to just have a server-side text file for it, rather than having to pull it from the database. That said, there are more than one way to accomplish what he wants. I simply put out one way of doing it, and the way I would have done it. Link to comment
Anubhav Posted March 16, 2014 Author Share Posted March 16, 2014 First of i am not so good in SQL/MySQL. I used tables and account data for my group system. Dealman thanks. I will use file function's instead of XML. XML is laggy shit. Link to comment
Karuzo Posted March 16, 2014 Share Posted March 16, 2014 What? why should XML files be laggy? Link to comment
Noki Posted March 16, 2014 Share Posted March 16, 2014 XML is laggy when you use it to save large chunks of data. It doesn't lag when it's one memo. Link to comment
Anubhav Posted March 16, 2014 Author Share Posted March 16, 2014 Man its for group. Many people create groups and do things. It will be laggy then. Link to comment
Anubhav Posted March 16, 2014 Author Share Posted March 16, 2014 I need help how to set text of memo only for one group? Please help me . Link to comment
Spajk Posted March 16, 2014 Share Posted March 16, 2014 Just add another field in the groups table in the SQL named "memo" with type "TEXT". Link to comment
Anubhav Posted March 16, 2014 Author Share Posted March 16, 2014 I am not using SQL. I am using DEFAULT tables and using account data. For memo using file functions.. Someone can please show example also please? Link to comment
Saml1er Posted March 16, 2014 Share Posted March 16, 2014 SQL is the best but anyway I'm too lazy to write examples from my mobile So I found a script in one pf my old post: local mesg = "" addCommandHandler("say", function (thePlayer,_,msg) local time = getRealTime() local hours = time.hour local minutes = time.minute mesg = mesg.." [:"..hours..":"..minutes.."] "..getPlayerName ( thePlayer )..": "..msg end ) function LogTimer () if mesg ~= "" then File = fileOpen ("logs.txt") if File then fileWrite (File, mesg ) else fileCreate ("logs.txt") File = fileOpen ("logs.txt") fileWrite (File, mesg ) end fileClose (File) mesg = "" end end setTimer (LogTimer, 30000, 0 ) I haven't tested This but I hope this will help you. Link to comment
Anubhav Posted March 16, 2014 Author Share Posted March 16, 2014 Hmm no it din't. I need for each group one file. Its memo will be thier. the memo text depends on the gang.. Something like that? Link to comment
Saml1er Posted March 16, 2014 Share Posted March 16, 2014 Hmm no it din't. I need for each group one file. Its memo will be thier. the memo text depends on the gang.. Something like that? Then use xml, I'll post an example of xml functions within 2 hours. Link to comment
Recommended Posts