![]() |
Hooking and file accessing
Hi,
|
Savestring + Loadstring might be what you want:
http://wiki.graal.net/index.php/Crea...Output_Methods |
No, i search direct file access functions, so i can save things into levels/ and the subfolders of levels/
that doesnt seem to work with savestring or savevars edit: OT: btw is graal.net down? doesnt load for me lol |
I'm pretty sure there is no traditional hooking in gscript. but the onCreated() event is called when a weapon is saved serverside.
|
for every weapon? i guess only the weapon that got saved or? xD
|
Yay for wasting my post.
I don't know what you mean by 'directly accessing a file.' It's possible to load the file as raw text, the way it would appear in wordpad, by using loadlines() and savelines(). All of the 'save<whatever>' functions require a full path. The syntax is save<whatever>(path,append?) If you want to save text to a file 'zomg.txt' in levels/, you need to do object.savelines("levels/zomg.txt",false); In the case of savelines, it expects the object to be an array. Each array member is one line. PHP Code:
PHP Code:
Finally, savestring is pretty much the same thing as savelines but it saves the text in a single line. The object it expects is just a string, float, integer, ect. PHP Code:
|
Quote:
|
well i found out that it actually saved, but didn't show up on the File Browse until doing /refreshfilelist ¬_¬
|
| All times are GMT +2. The time now is 08:49 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.