SA-MP Forums Archive
What does it mean - 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: What does it mean (/showthread.php?tid=638747)



What does it mean - Suttix - 05.08.2017

INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);

Can someone explain what does it mean and what is it used for?


Re: What does it mean - Misiur - 05.08.2017

Sure.
1. INI_ParseFile is an y_ini library function for parsing ini files
2. UserPath is probably a macro/function somewhere on top of your script which provides path to user files from playerid.
3. "LoadUser_%s" is a format pattern. Assume that ini file looks like
pawn Код:
[some_random_stuff]
A = B
C = 5
Then it will call "LoadUser_som_random_stuff" public function twice, once for "A" with value of "B", then "C" with a value of "5".
4. .bExtra means that you want to pass additional parameter to your LoadUser_%s function, and
5. .extra contains the value you want to pass, playerid in this case


Re: What does it mean - Suttix - 05.08.2017

Quote:
Originally Posted by Misiur
Посмотреть сообщение
Sure.
1. INI_ParseFile is an y_ini library function for parsing ini files
2. UserPath is probably a macro/function somewhere on top of your script which provides path to user files from playerid.
3. "LoadUser_%s" is a format pattern. Assume that ini file looks like
pawn Код:
[some_random_stuff]
A = B
C = 5
Then it will call "LoadUser_som_random_stuff" public function twice, once for "A" with value of "B", then "C" with a value of "5".
4. .bExtra means that you want to pass additional parameter to your LoadUser_%s function, and
5. .extra contains the value you want to pass, playerid in this case
Thanks


Re: What does it mean - Suttix - 05.08.2017

I want to do a system with vehicles(car ownership...),can you tell me step by step what should i do first because i've never been doing script with files so i need little help