Using file.inc to write and read dynamics
#1

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 ;(!
Reply
#2

Have you read this https://sampwiki.blast.hk/wiki/File_Functions ?
Reply
#3

Nice! Thanks, exactly what I was looking for
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)