What Does This Mean?
#10

Quote:
Originally Posted by Babul
Посмотреть сообщение
-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
Код:
new CommandFile[64];
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
format(CommandFile,sizeof(CommandFile),"UserData/%s.txt",PlayerName);
...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)
Код:
dini_IntSet(CommandFile, "Akill", 6); // remember: the CommandName is only a string containing "UserData/HayZatic.txt" if you are the player :)
result:
Код:
Akill 6
inside your file...
Great thanks And one More thing, gCommands[LOGIN] = dini_Int(CommandFile, "Login"); Im Trying To Beat This Problem i have and i go learn all of this, i can probally fix it
Reply


Messages In This Thread
What Does This Mean? - by HayZatic - 06.07.2011, 23:09
Re: What Does This Mean? - by Backwardsman97 - 06.07.2011, 23:11
Re: What Does This Mean? - by HayZatic - 06.07.2011, 23:14
Re: What Does This Mean? - by Luis- - 06.07.2011, 23:18
Re: What Does This Mean? - by HayZatic - 06.07.2011, 23:21
Re: What Does This Mean? - by Luis- - 06.07.2011, 23:23
Re: What Does This Mean? - by Shadoww5 - 06.07.2011, 23:23
Re: What Does This Mean? - by HayZatic - 06.07.2011, 23:26
Re: What Does This Mean? - by Babul - 06.07.2011, 23:52
Re: What Does This Mean? - by HayZatic - 07.07.2011, 00:06

Forum Jump:


Users browsing this thread: 1 Guest(s)