16.05.2012, 14:19
Hi,I have created a registering dialog and now I have a problem,the years value is +50 than entered.
In the scriptfiles/user_name.txt the years are the one that I entered in registration dialog but when I want to see my stats over the /stats command the years are +50 than entered.
Here is the stock that I'm using to read the years from the file:
In the scriptfiles/user_name.txt the years are the one that I entered in registration dialog but when I want to see my stats over the /stats command the years are +50 than entered.
Код:
CMD:stats(playerid)
{
new string[512];
new spole[512];
switch(GetPVarInt(playerid,"Spol"))
{
case 0:(spole="musko");
case 1:(spole="zensko");
}
format(string,sizeof(string),"{FF0000}Ime i Prezime:{00FF00}%s\n\n{FF0000}E-mail:{00FF00}%s\n\n{FF0000}Spol:{00FF00}%s \n\n{FF0000}Godine:{00FF00} %i ",imei(playerid),maili(playerid),spole,gods(playerid));
ShowPlayerDialog(playerid,stats1,DIALOG_STYLE_MSGBOX,"{FF0000}Stats",string,"U redu","");
return 1;
}
Код:
stock gods(playerid)
{
new god[64];
new datoteka[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(datoteka,sizeof(datoteka),"/korisnici/%s.txt",name);
format(god,sizeof(god),dini_Get(datoteka,"Godine"));
return god;
}

