Using file.inc to write and read dynamics - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Using file.inc to write and read dynamics (
/showthread.php?tid=144488)
Using file.inc to write and read dynamics -
dcmd_crash - 27.04.2010
Ok, I have a taxi system .. and have for some time. It's a filterscript I made sometime in January and released, but obviously I've now implemented it into my own gamemode. I'd like to add a feature to it (idea came to me whilst viewing a recently released taxi script).
The feature would be, the ability to add locations to the taxi system, dynamically. For example, adn Administrator would pick a place and use a command (/saveloc /savetaxi /newtaxi w/e) and it would save the location into a file which would then be called by a custom function (ReloadTaxi(); something like that) (this function would be called by the /saveloc /savetaxi w/e command) and that would then reload the taxi system with the new location.. dynamically.
However.. for this system to work I must gain some knowledge on how the file functions work, as I'm guessing that to save the location i will need fwrite with a formatted string, and to read it I would need fread?
Any information would really help
can't seem to find anything anywhere ;(!
Re: Using file.inc to write and read dynamics -
MadeMan - 27.04.2010
Have you read this
https://sampwiki.blast.hk/wiki/File_Functions ?
Re: Using file.inc to write and read dynamics -
dcmd_crash - 27.04.2010
Nice! Thanks, exactly what I was looking for