my item problem ?
#1

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
Reply
#2

http://forum.sa-mp.com/index.php?topic=170229.0

Last reply
Reply
#3

how do i add the format thing?
Reply
#4

What is the file name you are trying to save in and where is it located?
Reply
#5

PlayerInfo[playerid][Juua] = dini_Int(file, "PlastmassPudeleid");



dini_IntSet(file,"Juua", 0);
Reply
#6

i think he don't mean this, he mean something like this

/Accounts/%s ...

Code:
format(file,sizeof(file),"Accounts/%s.ini",name);
Reply
#7

i have
format(file,sizeof(file),"%s.ini",name);
Reply
#8

so i think we need bit more of code
Reply
#9

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));
?
Reply
#10

So you need this:

pawn Code:
new file[64], name[24];
GetPlayerName(playerid, name, sizeof(name));
format(file,sizeof(file),"%s.ini",name);
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)