[HELP] Pickups. - 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: [HELP] Pickups. (
/showthread.php?tid=557090)
[HELP] Pickups. -
HY - 12.01.2015
Hello. So, I started again my project about Dynamic Pickups.
But, the problem it's, I wanted to save all pickups like:
But, all pickups are saved in a single file..
All pickups are saved in this file. P.S: I don't know how the hell appeared here and why.
I wanted to save them like:
Anyway, I hope you understanded my issue.
Code:
www.pastebin.com
Re: [HELP] Pickups. -
dominik523 - 12.01.2015
Shouldn't this be like this?
pawn Код:
stock PickPath(pickid)
{
new string[4];
format(string, sizeof(string), "/Pickups/%d.ini", pickid);
return string;
}
So each time you are saving, pickup's path will be different from other pickups.
EDIT: That string's size won't be enough to store the path so you should set it larger.
Re: [HELP] Pickups. -
HY - 12.01.2015
Thanks @dominik.
I have tried your variante, but gives me error.
I have a global variable for pickid, I can't define it as a global variable and use it in a stock.
It gives error.
Thanks anyway.
Anybody else?
Re: [HELP] Pickups. -
dominik523 - 12.01.2015
You didn't use anywhere pickid except in declaring it and in format.
What about this?
pawn Код:
if(sscanf(params, "ii", pickid , Tip))
new INI:File = INI_Open(PickPath(pickid ));
...
////////////////////////
stock PickPath(pickupid)
{
new string[4];
format(string, sizeof(string), "/Pickups/%d.ini", pickupid);
return string;
}
Re: [HELP] Pickups. -
HY - 12.01.2015
Anyway, tried your code. Doesn't work.
I made this very much times... but now, I don't know why doesn't work.
Can be because Y_ini it's outdated? I don't know.
Anybody else..?