my item problem ? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: my item problem ? (
/showthread.php?tid=144865)
my item problem ? -
hardstop - 29.04.2010
Code:
if(listitem == 1) //beer
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_BEER);
GivePlayerMoney(playerid, -60);
SendClientMessage(playerid, ROLLIMANGU_TEKST, "* bought a beer");
dini_IntSet(file,"Beer", 1);
}
but it doesnt add 1 beer to my acccoutn when i do /stats
Re: my item problem ? -
MadeMan - 29.04.2010
http://forum.sa-mp.com/index.php?topic=170229.0
Last reply
Re: my item problem ? -
hardstop - 29.04.2010
how do i add the format thing?
Re: my item problem ? -
MadeMan - 29.04.2010
What is the file name you are trying to save in and where is it located?
Re: my item problem ? -
hardstop - 29.04.2010
PlayerInfo[playerid][Juua] = dini_Int(file, "PlastmassPudeleid");
dini_IntSet(file,"Juua", 0);
Re: my item problem ? -
Lajko1 - 29.04.2010
i think he don't mean this, he mean something like this
/Accounts/%s ...
Code:
format(file,sizeof(file),"Accounts/%s.ini",name);
Re: my item problem ? -
hardstop - 29.04.2010
i have
format(file,sizeof(file),"%s.ini",name);
Re: my item problem ? -
Lajko1 - 29.04.2010
so i think we need bit more of code
Re: my item problem ? -
hardstop - 29.04.2010
Code:
format(file,sizeof(file),"%s.ini",name);
if(!fexist(file))
{
dini_Create(file);
dini_IntSet(file, "Password", udb_hash(tmp));
dini_IntSet(file,"AdminLevel", 0);
dini_IntSet(file,"Raha", 5455);
dini_IntSet(file,"Riided", 170);
dini_IntSet(file,"Juhiload", 0);
dini_IntSet(file,"Relvaload", 0);
dini_IntSet(file,"Suitsud", 0);
dini_IntSet(file,"Juua", 0);
dini_IntSet(file,"Fraktsioon", 0);
dini_IntSet(file,"Registreeritud", 1);
dini_IntSet(file,"GlaasPudeleid", 0);
dini_IntSet(file,"PlastmassPudeleid", 0);
SendClientMessage(playerid, eadmin, "Kasutaja registreeritud!");
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
GetPlayerName(playerid, name, sizeof(name));
?
Re: my item problem ? -
MadeMan - 29.04.2010
So you need this:
pawn Code:
new file[64], name[24];
GetPlayerName(playerid, name, sizeof(name));
format(file,sizeof(file),"%s.ini",name);