06.07.2011, 23:52
-the dini_IntSet writes an integer (a full number w/o a dot f.ex 13337) into a file,
-first parameter "CommandFile" is (contains) the string where the file is located, (watch below)
-second param, "Akill", is a string which gets written into the file as a single line so it can be seeked for and get read,
-third param, 6, also writes it (the 6, which is an Integer) to the same line as the "Akill" directly behind it.
presuming that a filename is given, maybe
...now you got a PlayerName and the CommandFile string. the PlayerName gets added into the CommandFile string with format(), now it can be used to open a file: (to store something in the file here)
result:
inside your file...
-first parameter "CommandFile" is (contains) the string where the file is located, (watch below)
-second param, "Akill", is a string which gets written into the file as a single line so it can be seeked for and get read,
-third param, 6, also writes it (the 6, which is an Integer) to the same line as the "Akill" directly behind it.
presuming that a filename is given, maybe
Код:
new CommandFile[64]; new PlayerName[MAX_PLAYER_NAME]; GetPlayerName(playerid,PlayerName,sizeof(PlayerName)); format(CommandFile,sizeof(CommandFile),"UserData/%s.txt",PlayerName);
Код:
dini_IntSet(CommandFile, "Akill", 6); // remember: the CommandName is only a string containing "UserData/HayZatic.txt" if you are the player :)
Код:
Akill 6