SA-MP Forums Archive
How to save a simple string with Y_INI, SSCANF and ZCMD - 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)
+--- Thread: How to save a simple string with Y_INI, SSCANF and ZCMD (/showthread.php?tid=577977)



How to save a simple string with Y_INI, SSCANF and ZCMD - shocktheripper - 15.06.2015

The title says it all, I have been looking around for a while, but I can't still find anything.

Here's a simple example:

PHP код:
CMD:
/
savetext [text1] [text2
FILE INI:
text1
text2 
Yes, I am willing to give some rep points.


Re: How to save a simple string with Y_INI, SSCANF and ZCMD - bgedition - 15.06.2015

@shocktheripper '/save' already exists by default from SA:MP Client to save positions on-foot and in-vehicle. One more thing you don't need to use y_ini for this command. You can use the simplest codes by the sa-mp team. (I mean fopen, fclose etc.)


Re: How to save a simple string with Y_INI, SSCANF and ZCMD - shocktheripper - 15.06.2015

Quote:
Originally Posted by bgedition
Посмотреть сообщение
@shocktheripper '/save' already exists by default from SA:MP Client to save positions on-foot and in-vehicle.
That's just an example.


Re: How to save a simple string with Y_INI, SSCANF and ZCMD - DarkLouis - 16.06.2015

You can do this:
new txt[50], txt2[50];
SSCANF CODE WITH PARAMS
s [50], s [50]

format (text1, sizeof text1, txt);
format (text2, sizeof text2, txt2);

I'm from smartphone so...